]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
bnxt_en: Move bnxt_rss_ext_op into header
authorChris J Arges <carges@cloudflare.com>
Wed, 25 Mar 2026 20:09:49 +0000 (15:09 -0500)
committerJakub Kicinski <kuba@kernel.org>
Sun, 29 Mar 2026 21:09:07 +0000 (14:09 -0700)
This allows bnxt_rss_ext_op to be used by other functions. In addition this
modifies the rxcmp argument to be const since the function only reads from
this structure.

Reviewed-by: Joe Damato <joe@dama.to>
Signed-off-by: Chris J Arges <carges@cloudflare.com>
Link: https://patch.msgid.link/20260325201139.2501937-4-carges@cloudflare.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h

index d15548dfd4a39cbbc20b2525fddee443a2a0427c..8ec611bc01ee18e47805730f884cddcb7ab2e0ad 100644 (file)
@@ -2077,23 +2077,6 @@ vlan_err:
        return NULL;
 }
 
-static enum pkt_hash_types bnxt_rss_ext_op(struct bnxt *bp,
-                                          struct rx_cmp *rxcmp)
-{
-       u8 ext_op;
-
-       ext_op = RX_CMP_V3_HASH_TYPE(bp, rxcmp);
-       switch (ext_op) {
-       case EXT_OP_INNER_4:
-       case EXT_OP_OUTER_4:
-       case EXT_OP_INNFL_3:
-       case EXT_OP_OUTFL_3:
-               return PKT_HASH_TYPE_L4;
-       default:
-               return PKT_HASH_TYPE_L3;
-       }
-}
-
 /* returns the following:
  * 1       - 1 packet successfully received
  * 0       - successful TPA_START, packet not completed yet
index 99f45686ed09725e4076c025515bcf6226b85b1a..30efcfbb47919ec5f5b3e0446c7c3f25cbaf0bae 100644 (file)
@@ -2902,6 +2902,23 @@ static inline bool bnxt_sriov_cfg(struct bnxt *bp)
 #endif
 }
 
+static inline enum pkt_hash_types bnxt_rss_ext_op(struct bnxt *bp,
+                                                 const struct rx_cmp *rxcmp)
+{
+       u8 ext_op;
+
+       ext_op = RX_CMP_V3_HASH_TYPE(bp, rxcmp);
+       switch (ext_op) {
+       case EXT_OP_INNER_4:
+       case EXT_OP_OUTER_4:
+       case EXT_OP_INNFL_3:
+       case EXT_OP_OUTFL_3:
+               return PKT_HASH_TYPE_L4;
+       default:
+               return PKT_HASH_TYPE_L3;
+       }
+}
+
 extern const u16 bnxt_bstore_to_trace[];
 extern const u16 bnxt_lhint_arr[];