Signed-off-by: Netanel Belgazal <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
(cherry picked from commit 3e5d6897176d38b54124da56183810abbd68c8bc)
Signed-off-by: Kamal Mostafa <email address hidden>
9b864a1...
by
Netanel Belgazal <email address hidden>
net/ena: change condition for host attribute configuration
Move the host info config to be the first admin command that is executed.
This change require the driver to remove the 'feature check'
from host info configuration flow.
The check is removed since the supported features bitmask field
is retrieved only after calling ENA_ADMIN_DEVICE_ATTRIBUTES admin command.
If set host info is not supported an error will be returned by the device.
Signed-off-by: Netanel Belgazal <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
(cherry picked from commit dd8427a78ffccbacf166a2d5d5eae55b586e1afe)
Signed-off-by: Kamal Mostafa <email address hidden>
a36cae5...
by
Netanel Belgazal <email address hidden>
The timeouts were too agressive and sometimes cause false alarms.
Signed-off-by: Netanel Belgazal <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
(cherry picked from commit 7102a18ac3f323805e3cd8f3dc64907644608c1e)
Signed-off-by: Kamal Mostafa <email address hidden>
c54d043...
by
Netanel Belgazal <email address hidden>
Signed-off-by: Netanel Belgazal <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
(cherry picked from commit 5add6e4a222f2eb437992af6b39c8a9c9a28604a)
Signed-off-by: Kamal Mostafa <email address hidden>
8a8143e...
by
Netanel Belgazal <email address hidden>
net/ena: use READ_ONCE to access completion descriptors
Completion descriptors are accessed from the driver and from the device.
To avoid reading the old value, use READ_ONCE macro.
Signed-off-by: Netanel Belgazal <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
(cherry picked from commit a8496eb81342393e4c8280a5ec27e1872a3fb9fd)
Signed-off-by: Kamal Mostafa <email address hidden>
01c6e84...
by
Netanel Belgazal <email address hidden>
net/ena: fix potential access to freed memory during device reset
If the ena driver detects that the device is not behave as expected,
it tries to reset the device.
The reset flow calls ena_down, which will frees all the resources
the driver allocates and then it will reset the device.
This flow can cause memory corruption if the device is still writes
to the driver's memory space.
To overcome this potential race, move the reset before the device
resources are freed.
Signed-off-by: Netanel Belgazal <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
(cherry picked from commit 3f6159dbfc24c5e61fb5deb9b69e0abb934609bb)
Signed-off-by: Kamal Mostafa <email address hidden>
a2a6919...
by
Netanel Belgazal <email address hidden>
net/ena: refactor ena_get_stats64 to be atomic context safe
ndo_get_stat64() can be called from atomic context, but the current
implementation sends an admin command to retrieve the statistics from
the device. This admin command can sleep.
This patch re-factors the implementation of ena_get_stats64() to use
the {rx,tx}bytes/count from the driver's inner counters, and to obtain
the rx drop counter from the asynchronous keep alive (heart bit)
event.
Signed-off-by: Netanel Belgazal <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
[kamal: backport from commit d81db24056132fe8b83e2fba337e9ea76675e68d (context)]
Signed-off-by: Kamal Mostafa <email address hidden>
b289f30...
by
Netanel Belgazal <email address hidden>
net/ena: fix NULL dereference when removing the driver after device reset failed
If for some reason the device stops responding, and the device reset
failes to recover the device, the mmio register read data structure
will not be reinitialized.
On driver removal, the driver will also try to reset the device, but
this time the mmio data structure will be NULL.
To solve this issue, perform the device reset in the remove function
only if the device is runnig.
Signed-off-by: Netanel Belgazal <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
(cherry picked from commit 22b331c9e0a345126708af60f7d00d38b53db70b)
Signed-off-by: Kamal Mostafa <email address hidden>
d7b3219...
by
Netanel Belgazal <email address hidden>
ENA default hash configures IPv4_frag hash twice instead of
configure non-IP packets.
The bug caused IPv4 fragmented packets to be calculated based on
L2 source and destination address instead of L3 source and destination.
IPv4 packets can reach to the wrong Rx queue.
Signed-off-by: Netanel Belgazal <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
(cherry picked from commit 422e21e7619bb8751aa1cd32a9b671b1baaf3d18)
Signed-off-by: Kamal Mostafa <email address hidden>
3d74fe8...
by
Netanel Belgazal <email address hidden>
ena_flow_data_to_flow_hash and ena_flow_hash_to_flow_type
treat the ena_flow_hash_to_flow_type enum as power of two values.
Change the values of ena_admin_flow_hash_fields to be power of two values.
This bug effect the ethtool set/get rxnfc.
ethtool will report wrong values hash fields for get and will
configure wrong hash fields in set.
Signed-off-by: Netanel Belgazal <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
(cherry picked from commit 6e2de20ddc4b606a9b6b170a6bb21ee4dc4ad93a)
Signed-off-by: Kamal Mostafa <email address hidden>