Skip to content

Commit 4c3844d

Browse files
Paul Blakeydavem330
authored andcommitted
net/mlx5e: CT: Introduce connection tracking
Add support for offloading tc ct action and ct matches. We translate the tc filter with CT action the following HW model: +-------------------+ +--------------------+ +--------------+ + pre_ct (tc chain) +----->+ CT (nat or no nat) +--->+ post_ct +-----> + original match + | + tuple + zone match + | + fte_id match + | +-------------------+ | +--------------------+ | +--------------+ | v v v set chain miss mapping set mark original set fte_id set label filter set zone set established actions set tunnel_id do nat (if needed) do decap Signed-off-by: Paul Blakey <[email protected]> Reviewed-by: Oz Shlomo <[email protected]> Reviewed-by: Roi Dayan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ee1c45e commit 4c3844d

File tree

8 files changed

+793
-16
lines changed

8 files changed

+793
-16
lines changed

drivers/net/ethernet/mellanox/mlx5/core/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,16 @@ config MLX5_ESWITCH
7878
Legacy SRIOV mode (L2 mac vlan steering based).
7979
Switchdev mode (eswitch offloads).
8080

81+
config MLX5_TC_CT
82+
bool "MLX5 TC connection tracking offload support"
83+
depends on MLX5_CORE_EN && NET_SWITCHDEV && NF_FLOW_TABLE && NET_ACT_CT && NET_TC_SKB_EXT
84+
default y
85+
help
86+
Say Y here if you want to support offloading connection tracking rules
87+
via tc ct action.
88+
89+
If unsure, set to Y
90+
8191
config MLX5_CORE_EN_DCB
8292
bool "Data Center Bridging (DCB) Support"
8393
default y

drivers/net/ethernet/mellanox/mlx5/core/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ mlx5_core-$(CONFIG_MLX5_ESWITCH) += en_rep.o en_tc.o en/tc_tun.o lib/port_tu
3737
lib/geneve.o en/mapping.o en/tc_tun_vxlan.o en/tc_tun_gre.o \
3838
en/tc_tun_geneve.o diag/en_tc_tracepoint.o
3939
mlx5_core-$(CONFIG_PCI_HYPERV_INTERFACE) += en/hv_vhca_stats.o
40+
mlx5_core-$(CONFIG_MLX5_TC_CT) += en/tc_ct.o
4041

4142
#
4243
# Core extra

0 commit comments

Comments
 (0)