summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authormsaitoh <msaitoh@NetBSD.org>2018-02-14 10:38:28 +0000
committermsaitoh <msaitoh@NetBSD.org>2018-02-14 10:38:28 +0000
commitdc6a0db309028d93ea69a0dbe971830decdf6ae5 (patch)
tree392175a1d8f3812db82a890a9394f40eae8af82e /sys/dev/pci
parent038031d5a6333544dbf522ca75b2d1b725377599 (diff)
Fix a bug that RX may stall on heavy load on ixg(4). ixgbe_rxeof() has loop
limit and the function returns true if a packet are still in the RX ring. ixgbe_handle_que() didn't check the return value. Check the return vaule and issue a softint. This bug is derived from FreeBSD and ixv(4) has no this bug. XXX pullup-8
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/ixgbe/ixgbe.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/dev/pci/ixgbe/ixgbe.c b/sys/dev/pci/ixgbe/ixgbe.c
index 692afb6c5d7..6ebbc7fad9e 100644
--- a/sys/dev/pci/ixgbe/ixgbe.c
+++ b/sys/dev/pci/ixgbe/ixgbe.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.120 2018/01/26 09:07:46 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.121 2018/02/14 10:38:28 msaitoh Exp $ */
/******************************************************************************
@@ -5712,11 +5712,12 @@ ixgbe_handle_que(void *context)
struct adapter *adapter = que->adapter;
struct tx_ring *txr = que->txr;
struct ifnet *ifp = adapter->ifp;
+ bool more = false;
adapter->handleq.ev_count++;
if (ifp->if_flags & IFF_RUNNING) {
- ixgbe_rxeof(que);
+ more = ixgbe_rxeof(que);
IXGBE_TX_LOCK(txr);
ixgbe_txeof(txr);
if (!(adapter->feat_en & IXGBE_FEATURE_LEGACY_TX))
@@ -5730,10 +5731,12 @@ ixgbe_handle_que(void *context)
IXGBE_TX_UNLOCK(txr);
}
- /* Re-enable this interrupt */
- if (que->res != NULL)
+ if (more)
+ softint_schedule(que->que_si);
+ else if (que->res != NULL) {
+ /* Re-enable this interrupt */
ixgbe_enable_queue(adapter, que->msix);
- else
+ } else
ixgbe_enable_intr(adapter);
return;