octeontx2-af: add support for custom L2 header
PATCH 1/1 octeontx2-af: add support for custom L2 header
From: Satheesh Paul A <[email protected]>
Add packet parsing support for custom L2 headers. Also add support to include a field from the custom header for flow tag generation.
Introduce a new flow key type NIX_FLOW_KEY_TYPE_CH_LEN_90B which maps to the NPC_LT_LA_CUSTOM_L2_90B_ETHER layer type. This extracts a 2-byte field at a 24-byte offset in layer A to be used in flow tag generation.
--- drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 1 + drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c | 7 +++++++ 2 files changed, 8 insertions(+)
drivers/net/ethernet/marvell/octeontx2/af/mbox.h +1 -0
@@ -1263,6 +1263,7 @@ struct nix_rss_flowkey_cfg {#define NIX_FLOW_KEY_TYPE_INNR_UDP BIT(15)#define NIX_FLOW_KEY_TYPE_INNR_SCTP BIT(16)#define NIX_FLOW_KEY_TYPE_INNR_ETH_DMAC BIT(17) +#define NIX_FLOW_KEY_TYPE_CH_LEN_90B BIT(18)#define NIX_FLOW_KEY_TYPE_CUSTOM0 BIT(19)#define NIX_FLOW_KEY_TYPE_VLAN BIT(20)#define NIX_FLOW_KEY_TYPE_IPV4_PROTO BIT(21)
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c +7 -0
@@ -4288,6 +4288,13 @@ static int set_flowkey_fields(struct nix_rx_flowkey_alg *alg, u32 flow_cfg) field->ltype_match =NPC_LT_LC_CUSTOM0 ; field->ltype_mask =0xF ;break ; +case NIX_FLOW_KEY_TYPE_CH_LEN_90B : + field->lid =NPC_LID_LA ; + field->hdr_offset =24 ; + field->bytesm1 =1 ;/* 2 Bytes*/ + field->ltype_match =NPC_LT_LA_CUSTOM_L2_90B_ETHER ; + field->ltype_mask =0xF ; +break ;case NIX_FLOW_KEY_TYPE_VLAN : field->lid =NPC_LID_LB ; field->hdr_offset =2 ;/* Skip TPID (2-bytes) */
Signature · 1 line
2.48.1
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 11 lines · On Wed, 15 Jul 2026 12:50:34 +0530 you wrote:
From: Satheesh Paul A <[email protected]>
Add packet parsing support for custom L2 headers. Also add support to include a field from the custom header for flow tag generation.
Introduce a new flow key type
NIX_FLOW_KEY_TYPE_CH_LEN_90Bwhich maps to theNPC_LT_LA_CUSTOM_L2_90B_ETHERlayer type. This extracts a 2-byte field at a 24-byte offset in layer A to be used in flow tag generation.[...]
Here is the summary with links:
- [net-next] octeontx2-af: add support for custom L2 header
https://git.kernel.org/netdev/net-next/c/e2834100751a
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html