Reproducible Intel em driver bug disables TX offload, reduces throughput

mib

Dabbler
Joined
Sep 7, 2012
Messages
20
Running 12.0 U5.1 on an Intel S1200KP board, which has two Intel gigE NICs onboard, an 82574L and an 82579LM. Both NICs are matched by the em driver.

After extensive a/b testing — including swapping cables, ports on the switch, ports on the server, external test devices, rebuilding iperf3, etc — I've been able to determine that when operating with only one physical interface up, the em driver will only enable RXCSUM but not TXCSUM on em0. If I have both interfaces up, only em1 has both offloads active, em0 remains RXCSUM-only. The issue does not appear to be related to which of the onboard controllers I'm using.

I discovered all this while doing performance testing another device's NIC, and using my TrueNAS box as my known good box. A case of demonstrably misplaced trust.

The original manifestation of the problem is that iperf3 shows degraded ~600Mbps in one direction, 900+ (ie line speed + overhead) in the other. While I had both interfaces up for testing, better performance was directly correlated with which interface had both offloads enabled.

I've considered building an RJ45 loopback plug, but I'm not at all certain that the "first" and "second" interface will consistently be the same, so that has the potential of being a footgun.

Since U6 is imminent, I'm hoping that this might be investigated and fixed before release.

Please let me know if there's anything else I should do to get this on the TrueNAS devs' radar.

Thanks.
 

morganL

Captain Morgan
Administrator
Moderator
iXsystems
Joined
Mar 10, 2018
Messages
2,691
If this bug exists, its likely to be be a FreeBSD 12.x bug with with Intel/em driver. I'd suggest looking for any bug recognition there. It's an Intel driver I believe and they would be responsible for updates.
We don't use that specific board internally, so it may not have been seen.
 

mib

Dabbler
Joined
Sep 7, 2012
Messages
20
According to the man page
The em driver was originally written by Intel Corporation <freebsd@intel.com>. It was merged with igb driver and converted to the iflib framework [...] in FreeBSD 12.0.

Not one to believe in coincidences, I wonder if the iflib merge may have had unintended side-effects.

Looking through Bugzilla doesn't yield any obvious bug candidates, though there are definitely historical hits for problems with offload.

I'll reach out to the if_em maintainers and see if they have any advice.
 
Top