diff options
author | Netanel Belgazal <netanel@amazon.com> | 2017-06-11 15:42:50 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-11 16:36:47 -0400 |
commit | 800c55cb76be6617232ef50a2be29830f3aa8e5c (patch) | |
tree | f2a28423c46dd35b18beef1aa5feacd88c00a854 /drivers/net/ethernet/amazon/ena/ena_netdev.h | |
parent | net: ena: disable admin msix while working in polling mode (diff) | |
download | linux-dev-800c55cb76be6617232ef50a2be29830f3aa8e5c.tar.xz linux-dev-800c55cb76be6617232ef50a2be29830f3aa8e5c.zip |
net: ena: bug fix in lost tx packets detection mechanism
check_for_missing_tx_completions() is called from a timer
task and looking for lost tx packets.
The old implementation accumulate all the lost tx packets
and did not check if those packets were retrieved on a later stage.
This cause to a situation where the driver reset
the device for no reason.
Fixes: 1738cd3ed342 ("Add a driver for Amazon Elastic Network Adapters (ENA)")
Signed-off-by: Netanel Belgazal <netanel@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/ethernet/amazon/ena/ena_netdev.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.h b/drivers/net/ethernet/amazon/ena/ena_netdev.h index 8828f1d6dd22..88b5e5612338 100644 --- a/drivers/net/ethernet/amazon/ena/ena_netdev.h +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.h @@ -146,7 +146,18 @@ struct ena_tx_buffer { u32 tx_descs; /* num of buffers used by this skb */ u32 num_of_bufs; - /* Save the last jiffies to detect missing tx packets */ + + /* Used for detect missing tx packets to limit the number of prints */ + u32 print_once; + /* Save the last jiffies to detect missing tx packets + * + * sets to non zero value on ena_start_xmit and set to zero on + * napi and timer_Service_routine. + * + * while this value is not protected by lock, + * a given packet is not expected to be handled by ena_start_xmit + * and by napi/timer_service at the same time. + */ unsigned long last_jiffies; struct ena_com_buf bufs[ENA_PKT_MAX_BUFS]; } ____cacheline_aligned; @@ -170,7 +181,6 @@ struct ena_stats_tx { u64 napi_comp; u64 tx_poll; u64 doorbells; - u64 missing_tx_comp; u64 bad_req_id; }; |