The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=a666f1564501734d3d7ec05ab516e40309e81454
commit a666f1564501734d3d7ec05ab516e40309e81454 Author: Kevin Bowling <[email protected]> AuthorDate: 2026-09-18 08:29:16 +0000 Commit: Kevin Bowling <[email protected]> CommitDate: 2026-09-18 22:50:45 +0000 e1000: Use the common RSS key for 82574 Use rss_getkey() in the older em multi-queue RSS path, which is reached by 82574 with two receive queues. This replaces a private key generated on each initialization and matches the common-key policy already used by the igb path. Decode each register word with le32dec() and remove the private assembly macro, avoiding signed integer shifts while preserving the register byte order. Leave the redirection table and hash fields unchanged. This does not change single-queue em devices or PF-owned igb VF RSS settings. Reviewed by: erj, gallatin MFC after: 2 weeks Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D59792 --- sys/dev/e1000/if_em.c | 6 ++++-- sys/dev/e1000/if_em.h | 5 ----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 9e4d3e8cfda2..eac1798c9d25 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -5231,11 +5231,13 @@ em_initialize_rss_mapping(struct e1000_softc *sc) /* * Configure RSS key */ - arc4rand(rss_key, sizeof(rss_key), 0); + _Static_assert(sizeof(rss_key) == RSS_KEYSIZE, + "RSS key size mismatch"); + rss_getkey(rss_key); for (i = 0; i < RSSKEYLEN; ++i) { uint32_t rssrk = 0; - rssrk = EM_RSSRK_VAL(rss_key, i); + rssrk = le32dec(rss_key + i * sizeof(rssrk)); E1000_WRITE_REG(hw,E1000_RSSRK(i), rssrk); } diff --git a/sys/dev/e1000/if_em.h b/sys/dev/e1000/if_em.h index e73d359de19a..c0934b65cb1f 100644 --- a/sys/dev/e1000/if_em.h +++ b/sys/dev/e1000/if_em.h @@ -791,9 +791,4 @@ typedef struct _em_vendor_info_t { void em_dump_rs(struct e1000_softc *); -#define EM_RSSRK_SIZE 4 -#define EM_RSSRK_VAL(key, i) (key[(i) * EM_RSSRK_SIZE] | \ - key[(i) * EM_RSSRK_SIZE + 1] << 8 | \ - key[(i) * EM_RSSRK_SIZE + 2] << 16 | \ - key[(i) * EM_RSSRK_SIZE + 3] << 24) #endif /* _EM_H_DEFINED_ */
