git: 7f1e93b1e57f - main - iavf: Use the common RSS key without options RSS

From: Kevin Bowling <kbowling_at_FreeBSD.org>
Date: Fri, 18 Sep 2026 22:46:36 UTC
The branch main has been updated by kbowling:

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

commit 7f1e93b1e57fedc10e149d606c64a8610245acb4
Author:     Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2026-09-18 08:09:59 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-09-18 22:45:38 +0000

    iavf: Use the common RSS key without options RSS
    
    Use rss_getkey() when programming the RSS key through virtchnl regardless
    of options RSS, matching the register-programming path.  The common key
    is available independently of RSS queue placement; the driver-specific
    default otherwise makes the chosen key depend on the PF's configuration
    interface.
    
    Remove the unused default-key helper and its declarations.  Preserve the
    negotiated key length, zero padding, hash selections, and indirection-table
    policy.
    
    Reviewed by:    gallatin
    MFC after:      2 weeks
    Sponsored by:   BBOX.io
    Differential Revision:  https://reviews.freebsd.org/D59790
---
 sys/dev/iavf/iavf_iflib.h     |  1 -
 sys/dev/iavf/iavf_lib.c       | 23 -----------------------
 sys/dev/iavf/iavf_lib.h       |  1 -
 sys/dev/iavf/iavf_vc_common.c |  4 ----
 4 files changed, 29 deletions(-)

diff --git a/sys/dev/iavf/iavf_iflib.h b/sys/dev/iavf/iavf_iflib.h
index b9289d8d4050..bbd05e8279ca 100644
--- a/sys/dev/iavf/iavf_iflib.h
+++ b/sys/dev/iavf/iavf_iflib.h
@@ -393,7 +393,6 @@ struct iavf_sc {
 
 /* Function prototypes */
 void		 iavf_init_tx_ring(struct iavf_vsi *vsi, struct iavf_tx_queue *que);
-void		 iavf_get_default_rss_key(u32 *);
 const char *	iavf_vc_stat_str(struct iavf_hw *hw,
     enum virtchnl_status_code stat_err);
 void		iavf_init_tx_rsqs(struct iavf_vsi *vsi);
diff --git a/sys/dev/iavf/iavf_lib.c b/sys/dev/iavf/iavf_lib.c
index 9d6d64829268..c23e14a47444 100644
--- a/sys/dev/iavf/iavf_lib.c
+++ b/sys/dev/iavf/iavf_lib.c
@@ -57,29 +57,6 @@ iavf_msec_pause(int msecs)
 	pause("iavf_msec_pause", MSEC_2_TICKS(msecs));
 }
 
-/**
- * iavf_get_default_rss_key - Get the default RSS key for this driver
- * @key: output parameter to store the key in
- *
- * Copies the driver's default RSS key into the provided key variable.
- *
- * @pre assumes that key is not NULL and has at least IAVF_RSS_KEY_SIZE
- * storage space.
- */
-void
-iavf_get_default_rss_key(u32 *key)
-{
-	MPASS(key != NULL);
-
-	u32 rss_seed[IAVF_RSS_KEY_SIZE_REG] = {0x41b01687,
-	    0x183cfd8c, 0xce880440, 0x580cbc3c,
-	    0x35897377, 0x328b25e1, 0x4fa98922,
-	    0xb7d90c14, 0xd5bad70d, 0xcd15a2c1,
-	    0x0, 0x0, 0x0};
-
-	bcopy(rss_seed, key, IAVF_RSS_KEY_SIZE);
-}
-
 /**
  * iavf_allocate_pci_resources_common - Allocate PCI resources
  * @sc: the private device softc pointer
diff --git a/sys/dev/iavf/iavf_lib.h b/sys/dev/iavf/iavf_lib.h
index a483c9e4f755..c56e55b555a0 100644
--- a/sys/dev/iavf/iavf_lib.h
+++ b/sys/dev/iavf/iavf_lib.h
@@ -430,7 +430,6 @@ bool iavf_mbx_log_allowed(struct iavf_sc *sc);
 void iavf_update_link_status(struct iavf_sc *);
 bool iavf_driver_is_detaching(struct iavf_sc *sc);
 void iavf_msec_pause(int msecs);
-void iavf_get_default_rss_key(u32 *key);
 int iavf_allocate_pci_resources_common(struct iavf_sc *sc);
 bool iavf_reset_is_complete(struct iavf_hw *hw);
 int iavf_reset_complete(struct iavf_hw *hw);
diff --git a/sys/dev/iavf/iavf_vc_common.c b/sys/dev/iavf/iavf_vc_common.c
index 9470d764d610..5f39f0334e83 100644
--- a/sys/dev/iavf/iavf_vc_common.c
+++ b/sys/dev/iavf/iavf_vc_common.c
@@ -726,12 +726,8 @@ iavf_config_rss_key(struct iavf_sc *sc)
 	int msg_len, key_length;
 	u32		rss_seed[IAVF_RSS_KEY_SIZE_REG] = {0};
 
-#ifdef RSS
 	/* Fetch the configured RSS key */
 	rss_getkey((uint8_t *) &rss_seed);
-#else
-	iavf_get_default_rss_key(rss_seed);
-#endif
 
 	/* Send the fetched key */
 	key_length = sc->vf_res->rss_key_size;