]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC of r314281:
authorloos <loos@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 11 Mar 2017 07:54:05 +0000 (07:54 +0000)
committerloos <loos@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 11 Mar 2017 07:54:05 +0000 (07:54 +0000)
commit9e722ec6f04eaffbd03962477b730a8c6b5bfa63
treec27877fc2d0ddd314b3c59f101f2282386265069
parent39e90f1699969a8839aa65580b4cb7e1a7db7192
MFC of r314281:

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)

git-svn-id: svn://svn.freebsd.org/base/stable/10@315060 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/e1000/if_igb.c