summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorloos <loos@FreeBSD.org>2017-02-25 20:21:39 +0000
committerloos <loos@FreeBSD.org>2017-02-25 20:21:39 +0000
commit1a38ee169aa4c23a64b45b79b51a953808108166 (patch)
tree75c106540fe2fa8c791aad8aea6e87ac3868064d
parentef9ea0ab7de2f559ee344a2826f2b995e9b0e99b (diff)
downloadFreeBSD-src-1a38ee169aa4c23a64b45b79b51a953808108166.zip
FreeBSD-src-1a38ee169aa4c23a64b45b79b51a953808108166.tar.gz
Disable the driver managed queue for igb(4) when the legacy transmit
interface is used. The legacy API (IGB_LEGACY_TX) is enabled when ALTQ is built into kernel. As noted in altq(9), it is responsibility of the caller to protect this queue against concurrent access and, in the igb case, the interface send queue is protected by tx queue mutex. This obviously cannot protect the driver managed queue against concurrent access from different tx queues and leads to numerous and quite strange panic traces (usually shown as packets disappearing into thin air). Improving the locking to cope with this means serialize all access to this (single) queue and produces no gain, it actually affects the performance quite noticeabily. The driver managed queue is already disabled when an ALTQ queue discipline is set on interface (in altq_enable()), because the driver managed queue can interfere with ALTQ timing (whence the reports that setting an ALTQ queue discipline on interface also fixes the issue). Disabling this additional queue keeps the ability to use if_start() to send packets to individual NIC queues while it simply eliminate the race. This is a direct commit to stable/11 as -head driver does not support ALTQ anymore. PR: 213257 PR: 212413 Discussed with: sbruno Tested by: Konstantin Kormashev <konstantin@netgate.com> Obtained from: pfSense Sponsored by: Rubicon Communications, LLC (Netgate)
-rw-r--r--sys/dev/e1000/if_igb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/e1000/if_igb.c b/sys/dev/e1000/if_igb.c
index ef5256f..374ce96 100644
--- a/sys/dev/e1000/if_igb.c
+++ b/sys/dev/e1000/if_igb.c
@@ -3182,7 +3182,7 @@ igb_setup_interface(device_t dev, struct adapter *adapter)
#else
ifp->if_start = igb_start;
IFQ_SET_MAXLEN(&ifp->if_snd, adapter->num_tx_desc - 1);
- ifp->if_snd.ifq_drv_maxlen = adapter->num_tx_desc - 1;
+ ifp->if_snd.ifq_drv_maxlen = 0;
IFQ_SET_READY(&ifp->if_snd);
#endif
OpenPOWER on IntegriCloud