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)
Fri, Apr 12, 1:30 AM
Unknown Object (File)
Fri, Apr 5, 10:02 PM
Unknown Object (File)
Fri, Apr 5, 6:43 PM
Unknown Object (File)
Fri, Apr 5, 7:35 AM
Unknown Object (File)
Feb 22 2024, 5:32 PM
Unknown Object (File)
Feb 8 2024, 7:06 PM
Unknown Object (File)
Jan 19 2024, 9:56 AM
Unknown Object (File)
Dec 20 2023, 8:35 AM

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