The branch main has been updated by kbowling:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=fbe4eefbb6ca29e1f88d122619f7311896b81b1f

commit fbe4eefbb6ca29e1f88d122619f7311896b81b1f
Author:     Kevin Bowling <[email protected]>
AuthorDate: 2026-09-18 08:55:59 +0000
Commit:     Kevin Bowling <[email protected]>
CommitDate: 2026-09-18 23:09:32 +0000

    al_eth: Use the common RSS key
    
    Fetch the common Toeplitz key instead of filling it with random bytes
    during receive-forwarding setup.  Check the key size at compile time and
    retain the existing host-to-network conversion for each hardware word.
    
    Leave forwarding, hash selection, and queue mapping unchanged.
    
    Reviewed by:    gallatin
    MFC after:      2 weeks
    Sponsored by:   BBOX.io
    Differential Revision:  https://reviews.freebsd.org/D59804
---
 sys/dev/al_eth/al_eth.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sys/dev/al_eth/al_eth.c b/sys/dev/al_eth/al_eth.c
index 47d31c264f67..c078f7b427a5 100644
--- a/sys/dev/al_eth/al_eth.c
+++ b/sys/dev/al_eth/al_eth.c
@@ -55,6 +55,7 @@
 #include <net/if_types.h>
 #include <netinet/in.h>
 #include <net/if_vlan_var.h>
+#include <net/rss_config.h>
 #include <netinet/tcp.h>
 #include <netinet/tcp_lro.h>
 
@@ -2960,8 +2961,9 @@ al_eth_config_rx_fwd(struct al_eth_adapter *adapter)
        al_eth_mac_table_promiscuous_set(adapter, false);
 
        /* set toeplitz hash keys */
-       for (i = 0; i < sizeof(adapter->toeplitz_hash_key); i++)
-               *((uint8_t*)adapter->toeplitz_hash_key + i) = (uint8_t)random();
+       _Static_assert(sizeof(adapter->toeplitz_hash_key) == RSS_KEYSIZE,
+           "RSS key size mismatch");
+       rss_getkey((uint8_t *)adapter->toeplitz_hash_key);
 
        for (i = 0; i < AL_ETH_RX_HASH_KEY_NUM; i++)
                al_eth_hash_key_set(&adapter->hal_adapter, i,

Reply via email to