linux-loongson/drivers/net/ethernet/marvell
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
..
mvpp2 eth: mvpp2: migrate to new RXFH callbacks 2025-06-18 13:19:00 -07:00
octeon_ep octeon_ep: Fix host hang issue during device reboot 2025-05-01 07:11:44 -07:00
octeon_ep_vf Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-05-01 15:11:38 -07:00
octeontx2 Octeontx2-af: Skip overlap check for SPI field 2025-08-21 07:52:54 -07:00
prestera net: prestera: Use to_delayed_work() 2025-05-15 07:41:58 -07:00
Kconfig net: phy: remove Kconfig symbol MDIO_DEVRES 2025-05-14 19:12:19 -07:00
Makefile octeon_ep_vf: Add driver framework and device initialization 2024-02-12 09:01:52 +00:00
mv643xx_eth.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
mvmdio.c net: ethernet: Switch back to struct platform_driver::remove() 2024-10-04 16:39:56 -07:00
mvneta_bm.c net: ethernet: Switch back to struct platform_driver::remove() 2024-10-04 16:39:56 -07:00
mvneta_bm.h net: Fix typos 2025-07-25 10:29:07 -07:00
mvneta.c Significant patch series in this pull request: 2025-08-03 16:23:09 -07:00
pxa168_eth.c net: Fix typos 2025-07-25 10:29:07 -07:00
skge.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
skge.h
sky2.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
sky2.h