linux-loongson/drivers/net/ethernet/marvell/octeontx2/af
Hariprasad Kelam 8c5d95988c Octeontx2-af: Skip overlap check for SPI field
Octeontx2/CN10K silicon supports generating a 256-bit key per packet.
The specific fields to be extracted from a packet for key generation
are configurable via a Key Extraction (MKEX) Profile.

The AF driver scans the configured extraction profile to ensure that
fields from upper layers do not overwrite fields from lower layers in
the key.

Example Packet Field Layout:
LA: DMAC + SMAC
LB: VLAN
LC: IPv4/IPv6
LD: TCP/UDP

Valid MKEX Profile Configuration:

LA   -> DMAC   -> key_offset[0-5]
LC   -> SIP    -> key_offset[20-23]
LD   -> SPORT  -> key_offset[30-31]

Invalid MKEX profile configuration:

LA   -> DMAC   -> key_offset[0-5]
LC   -> SIP    -> key_offset[20-23]
LD   -> SPORT  -> key_offset[2-3]  // Overlaps with DMAC field

In another scenario, if the MKEX profile is configured to extract
the SPI field from both AH and ESP headers at the same key offset,
the driver rejecting this configuration. In a regular traffic,
ipsec packet will be having either AH(LD) or ESP (LE). This patch
relaxes the check for the same.

Fixes: 12aa0a3b93 ("octeontx2-af: Harden rule validation.")
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Link: https://patch.msgid.link/20250820063919.1463518-1-hkelam@marvell.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-08-21 07:52:54 -07:00
..
cn20k octeontx2-af: CN20K mbox implementation for AF's VF 2025-06-16 17:37:49 -07:00
cgx_fw_if.h Octeontx2-af: Introduce mode group index 2025-06-27 16:55:59 -07:00
cgx.c octeontx2-af: use unsigned int as iterator for unsigned values 2025-07-25 11:30:50 -07:00
cgx.h Octeontx2-pf: ethtool: support multi advertise mode 2025-06-27 16:55:59 -07:00
common.h octeontx2-pf: CN20K mbox implementation between PF-VF 2025-06-16 17:37:50 -07:00
lmac_common.h octeontx2-af: Quiesce traffic before NIX block reset 2024-11-26 12:09:41 +01:00
Makefile octeontx2-af: CN20k basic mbox operations and structures 2025-06-16 17:37:49 -07:00
mbox.c octeontx2-af: CN20K mbox implementation for AF's VF 2025-06-16 17:37:49 -07:00
mbox.h Octeontx2-af: Debugfs support for firmware data 2025-07-22 15:36:39 +02:00
mcs_cnf10kb.c
mcs_reg.h octeontx2-af: Fix mcs stats register address 2023-12-06 13:44:38 +01:00
mcs_rvu_if.c octeontx2: Set appropriate PF, VF masks and shifts based on silicon 2025-06-16 17:37:49 -07:00
mcs.c octeontx2-af: Fix mcs stats register address 2023-12-06 13:44:38 +01:00
mcs.h octeontx2-af: Adjust Tx credits when MCS external bypass is disabled 2023-12-06 13:44:38 +01:00
npc_profile.h octeontx2-af: Add filter profiles in hardware to extract packet headers 2024-01-29 11:28:41 +00:00
npc.h octeontx2-af: fix detection of IP layer 2024-07-12 13:42:00 +01:00
ptp.c octeontx2-pf: Switch to use hrtimer_setup() 2025-02-18 10:35:47 +01:00
ptp.h
rpm.c octeontx2-af: Quiesce traffic before NIX block reset 2024-11-26 12:09:41 +01:00
rpm.h octeontx2-af: Quiesce traffic before NIX block reset 2024-11-26 12:09:41 +01:00
rvu_cgx.c Octeontx2-af: Add programmed macaddr to RVU pfvf 2025-07-22 15:36:39 +02:00
rvu_cn10k.c net: Fix typos 2025-07-25 10:29:07 -07:00
rvu_cpt.c octeontx2: Set appropriate PF, VF masks and shifts based on silicon 2025-06-16 17:37:49 -07:00
rvu_debugfs.c Octeontx2-af: Debugfs support for firmware data 2025-07-22 15:36:39 +02:00
rvu_devlink.c octeontx2-af: Free NIX_AF_INT_VEC_GEN irq 2025-03-31 16:52:07 -07:00
rvu_devlink.h
rvu_nix.c net: Fix typos 2025-07-25 10:29:07 -07:00
rvu_npa.c
rvu_npc_fs.c Octeontx2-af: Skip overlap check for SPI field 2025-08-21 07:52:54 -07:00
rvu_npc_fs.h
rvu_npc_hash.c octeontx2: Set appropriate PF, VF masks and shifts based on silicon 2025-06-16 17:37:49 -07:00
rvu_npc_hash.h octeontx2: Set appropriate PF, VF masks and shifts based on silicon 2025-06-16 17:37:49 -07:00
rvu_npc.c octeontx2: Set appropriate PF, VF masks and shifts based on silicon 2025-06-16 17:37:49 -07:00
rvu_reg.c octeontx2-af: Update Tx link register range 2023-12-06 13:44:38 +01:00
rvu_reg.h octeontx2-af: Add packet path between representor and VF 2024-11-13 11:57:11 +00:00
rvu_rep.c octeontx2: Set appropriate PF, VF masks and shifts based on silicon 2025-06-16 17:37:49 -07:00
rvu_sdp.c octeontx2: Set appropriate PF, VF masks and shifts based on silicon 2025-06-16 17:37:49 -07:00
rvu_struct.h octeontx2-af: CN20k basic mbox operations and structures 2025-06-16 17:37:49 -07:00
rvu_switch.c octeontx2: Set appropriate PF, VF masks and shifts based on silicon 2025-06-16 17:37:49 -07:00
rvu_trace.c octeontx2-pf: Add tracepoint for NIX_PARSE_S 2025-05-20 12:37:37 +02:00
rvu_trace.h octeontx2-pf: Add tracepoint for NIX_PARSE_S 2025-05-20 12:37:37 +02:00
rvu.c octeontx2-af: Fix error code in rvu_mbox_init() 2025-06-29 10:34:20 +01:00
rvu.h octeontx2-af: CN20K mbox implementation for AF's VF 2025-06-16 17:37:49 -07:00