HomeFreeBSD

e1000: Some fixes for hardware capabilities

Description

e1000: Some fixes for hardware capabilities

This MFC squash retains disabled TSO ultimately, but contains some
capability fixes.

f1b5488f:
e1000: Enable TSO for lem(4) and em(4)

Most em(4) devices now enjoy TSO and TSO6, matching NetBSD and Linux
defaults.

A prior commit automasks TSO on 10/100 Ethernet due to errata and other
bugs for IPv6 were fixed recently allowing this.

Mike Karels identified a performance anomaly on Intel 82574L devices.
These are multiqueue enabled on FreeBSD since the conversion to
iflib. I am investigating whether this can be fixed, in the mean time
MSI-X with checksum offloads remain default.

i219 SPT devices have an errata that downclocks the DMA engine, which
results in TSO not being able to acheive line rate. Therefore, it is
disabled on:

  • Intel(R) I219-LM and I219-V SPT
  • Intel(R) I219-LM and I219-V SPT-H (2)
  • Intel(R) I219-LM and I219-V LBG (3)
  • Intel(R) I219-LM and I219-V SPT (4)
  • Intel(R) I219-LM and I219-V SPT (5)

Many lem(4) devices enjoy TSO, exceptions being 82542, 82543, 82547.
TSO6 may be possible for some chipsets but I am still working through
my testing matrix and that is hidden behind hw.em.unsupported_tso.

If you encounter issues, you may disable TSO with for example:
ifconfig em0 -tso -tso6.
I ask to be informed of any deviations from normal operation requiring
this.

Thanks to cc@ for access to emulab.net.

On a sample I219 system it saves about 16% CPU on IPv4 and 19% on IPv6.

iperf3 -Vc reported numbers:
total% user% system%

IPv4 TSO
21.3 7 14.4
21.4 6 15.4
21.5 6 15.5

IPv4 no TSO
36.8 5.4 31.4
38.5 5.1 33.5
38.2 5.7 32.6

IPv4 no TSO no TXCSUM
45.1 5.8 39.3
46 6.3 39.7
46.2 5.9 40.4

IPv6 TSO6
21.7 5.4 16.3
21.6 5.1 16.5
21.9 5.6 16.3

IPv6 no TSO6
41.2 5.2 36
41 5.1 36
40.8 5.2 35.7

IPv6 no TSO6 no TXCSUM6
49 5.9 43.1
48.8 4.9 43.9
49 5.6 43.4

Tested by: cc (lem(4)), karels (82574L)
Relnotes: yes
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D41170

13da8423:
e1000: Enable TSO on 82574

Further testing indicates something wrong with particular reciever,
enabling TSO 82574 for wider testing.

Tested by: karels

797e480c:
e1000: disable TSO on lem(4) and em(4)

Disable TSO on lem(4) and em(4) until a ring stall can be debugged.

I am not able to reproduce the issue on lem(4) but disabling there in
abundance of caution in case the issue is not specific to em(4).

Reported by: grog

(cherry picked from commit f1b5488f7bba7f25a57750f87cbcbccbd5b9d16b)
(cherry picked from commit 13da84237a37961938e9e237171ac111ddc1897c)
(cherry picked from commit 797e480cba8834e584062092c098e60956d28180)

Details

Provenance
Kevin Bowling <kbowling@FreeBSD.org>Authored on Aug 3 2023, 8:49 PM
Differential Revision
D41170: e1000: fixes for lem(4) and em(4) TSO
Parents
rG3bbf655b2826: e1000: Fix off by one ipcse
Branches
Unknown
Tags
Unknown