sfc: support TC rules which require OR-AR-CT-AR flow
authorEdward Cree <ecree.xilinx@gmail.com>
Mon, 2 Oct 2023 15:44:44 +0000 (16:44 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 6 Oct 2023 10:05:45 +0000 (11:05 +0100)
commite447056147effae1f77854986b5782bb22d77f62
treeb9621e166f85d62776770ca1c0cc9017419ee843
parentf96622fd3a74426db935bff11e00dac33480748f
sfc: support TC rules which require OR-AR-CT-AR flow

When a foreign LHS rule (TC rule from a tunnel netdev which requests
 conntrack lookup) matches on inner headers or enc_key_id, these matches
 cannot be performed by the Outer Rule table, as the keys are only
 available after the tunnel type has been identified (by the OR lookup)
 and the rest of the headers parsed accordingly.
Offload such rules with an Action Rule, using the LOOKUP_CONTROL section
 of the AR response to specify the conntrack and/or recirculation actions,
 combined with an Outer Rule which performs only the usual Encap Match
 duties.
This processing flow, as it requires two AR lookups per packet, is less
 performant than OR-CT-AR, so only use it where necessary.

Reviewed-by: Pieter Jansen van Vuuren <pieter.jansen-van-vuuren@amd.com>
Signed-off-by: Edward Cree <ecree.xilinx@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sfc/mae.c
drivers/net/ethernet/sfc/tc.c
drivers/net/ethernet/sfc/tc.h