Bug 255309 - ice(4) driver doesn't use RSS option correctly
Summary: ice(4) driver doesn't use RSS option correctly
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 12.2-RELEASE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-net (Nobody)
URL:
Keywords: IntelNetworking
Depends on:
Blocks:
 
Reported: 2021-04-21 17:23 UTC by Brian Poole
Modified: 2021-05-11 14:59 UTC (History)
0 users

See Also:


Attachments
patch to properly support rss option (1.38 KB, patch)
2021-04-21 17:23 UTC, Brian Poole
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Poole 2021-04-21 17:23:16 UTC
Created attachment 224335 [details]
patch to properly support rss option

Hello,

I am testing the Intel E810 NIC using the ice driver on both FreeBSD-12.2 and FreeBSD-13.0. During testing, I enabled the RSS kernel configuration option so the driver would use the system-wide standard RSS key instead of the custom ice key. I was surprised to see even after rebooting, the driver was still using the ice key.

My debugging led me to ice_lib.h where ice_rss.h is included. However, I don't believe there is a prior include of ice_opts.h, so when ice_rss.h is parsed, RSS is not defined causing ice-specific definitions to be used. I added ice_opts.h to the include list above ice_rss.h and re-compiled.

I hit a second problem within ice_rss.h where ICE_DEFAULT_RSS_HASH_CONFIG is only defined inside the !RSS block. I believe this is an oversight, probably hidden by the previous bug. That variable is used in ice_lib.c so it cannot depend on the state of the RSS option. Therefore, I moved the definition outside of the RSS/!RSS blocks.

With these two changes, in the included patch file, I observed the ice driver using RSS settings from the kernel, not ice-specific values. Looking at the FreeBSD-13.0 and HEAD branches, it looks like the same problems are present.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2021-05-11 14:59:06 UTC
^Triage: assign to correct mailing list.
^Triage: note that the "patch" keyword is obsolete (now inferred from attachment metadata).