bnxt_en: Move bnxt_rss_ext_op into header

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>
This commit is contained in:
Chris J Arges 2026-03-25 15:09:49 -05:00 committed by Jakub Kicinski
parent e5648b08cb
commit 4a037aeb6b
2 changed files with 17 additions and 17 deletions

View File

@ -2077,23 +2077,6 @@ static struct sk_buff *bnxt_rx_vlan(struct sk_buff *skb, u8 cmp_type,
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

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