Page MenuHomeFreeBSD

e1000: always enable PCSD when RSS hashing is used
ClosedPublic

Authored by kbowling on Aug 11 2021, 7:25 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jan 21, 10:57 PM
Unknown Object (File)
Tue, Jan 21, 9:18 AM
Unknown Object (File)
Tue, Jan 7, 10:18 AM
Unknown Object (File)
Tue, Jan 7, 9:00 AM
Unknown Object (File)
Sat, Jan 4, 2:12 PM
Unknown Object (File)
Wed, Jan 1, 7:44 AM
Unknown Object (File)
Sun, Dec 29, 1:52 PM
Unknown Object (File)
Sat, Dec 28, 11:27 PM

Details

Summary

To enable RSS hashing in the NIC, the PCSD bit must be set.

By default, this is never set when RXCSUM is disabled - which
causes problems higher up in the stack.

While here improve the RXCSUM flag assignments when enabling or disabling
IFCAP_RXCSUM.

See also: https://lists.freebsd.org/pipermail/freebsd-current/2020-May/076148.html

Co-authored-by: Stephan de Wit <stephan.dewt@yahoo.co.uk>
Co-authored-by: Franco Fichtner <franco@opnsense.org>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Taking a look at this.. I suspect the 82574 MQ case will be mishandled let me check the various datasheets.

kbowling edited reviewers, added: franco_opnsense.org; removed: kbowling.

Taking this so I can show you my changes, feel free to re-take after looking

kbowling added a reviewer: markj.
kbowling changed the repository for this revision from rS FreeBSD src repository - subversion to rG FreeBSD src repository.

PCSD is supposed to be set when using RSS features so I moved setting it into there.

I noticed some other issues and tried to clean this up based on your review, let me know what you think.

Here is my datasheet stash: http://iommu.com/datasheets/e1000-datasheets/

The main ones I check are for lem, em, and igb:

I also checked NetBSD's if_wm for this which doesn't directly use the Intel code and is a good cross-reference for errata.

Much nicer, thanks! Added Stephan as reviewer who originally worked on this to give it a go.

One small thing while we edit defines: can E1000_MRQC_ENABLE_RSS_4Q either be removed or defined as E1000_MRQC_ENABLE_RSS_8Q since it's the same value and practically unused?

This revision is now accepted and ready to land.Aug 12 2021, 7:05 AM
franco_opnsense.org retitled this revision from e1000: do not check for multiqueue when setting non-RSS features to e1000: always enable PCSD when RSS hashing is used.Aug 12 2021, 7:14 AM
franco_opnsense.org edited the summary of this revision. (Show Details)
This revision now requires review to proceed.Aug 15 2021, 7:03 PM
This revision is now accepted and ready to land.Aug 16 2021, 6:41 AM