summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/amazon/ena/ena_ethtool.c
diff options
context:
space:
mode:
authorNetanel Belgazal <netanel@amazon.com>2017-06-11 15:42:48 +0300
committerDavid S. Miller <davem@davemloft.net>2017-06-11 16:36:46 -0400
commita3af7c18cfe545a711e5df7491b7d6df71eba2ff (patch)
treeeb7c182c442a68f6c11d4b675df977ceb134b240 /drivers/net/ethernet/amazon/ena/ena_ethtool.c
parent0857d92f71b6cb75281fde913554b2d5436c394b (diff)
downloadop-kernel-dev-a3af7c18cfe545a711e5df7491b7d6df71eba2ff.zip
op-kernel-dev-a3af7c18cfe545a711e5df7491b7d6df71eba2ff.tar.gz
net: ena: fix theoretical Rx hang on low memory systems
For the rare case where the device runs out of free rx buffer descriptors (in case of pressure on kernel memory), and the napi handler continuously fail to refill new Rx descriptors until device rx queue totally runs out of all free rx buffers to post incoming packet, leading to a deadlock: * The device won't send interrupts since all the new Rx packets will be dropped. * The napi handler won't try to allocate new Rx descriptors since allocation is part of NAPI that's not being invoked any more The fix involves detecting this scenario and rescheduling NAPI (to refill buffers) by the keepalive/watchdog task. 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 'drivers/net/ethernet/amazon/ena/ena_ethtool.c')
-rw-r--r--drivers/net/ethernet/amazon/ena/ena_ethtool.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/amazon/ena/ena_ethtool.c b/drivers/net/ethernet/amazon/ena/ena_ethtool.c
index 67b2338f..533b2fb 100644
--- a/drivers/net/ethernet/amazon/ena/ena_ethtool.c
+++ b/drivers/net/ethernet/amazon/ena/ena_ethtool.c
@@ -94,6 +94,7 @@ static const struct ena_stats ena_stats_rx_strings[] = {
ENA_STAT_RX_ENTRY(dma_mapping_err),
ENA_STAT_RX_ENTRY(bad_desc_num),
ENA_STAT_RX_ENTRY(rx_copybreak_pkt),
+ ENA_STAT_RX_ENTRY(empty_rx_ring),
};
static const struct ena_stats ena_stats_ena_com_strings[] = {
OpenPOWER on IntegriCloud