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>
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
#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[];