]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/mlx5e: CT: Update connection tracking steering entries
authorCosmin Ratiu <cratiu@nvidia.com>
Thu, 8 Aug 2024 05:59:27 +0000 (08:59 +0300)
committerJakub Kicinski <kuba@kernel.org>
Sat, 10 Aug 2024 05:13:15 +0000 (22:13 -0700)
commit6b5662b75960b38cee4930284c93bd645b8e03ab
tree96dfea779ceedbfd32993e4ce055e950f6a88fc5
parent486aeb2db55b4509039f2e6017b2d06836893ee2
net/mlx5e: CT: Update connection tracking steering entries

Previously, replacing a connection tracking steering entry was done by
adding a new rule (with the same tag but possibly different mod hdr
actions/labels) then removing the old rule.

This approach doesn't work in hardware steering because two steering
entries with the same tag cannot coexist in a hardware steering table.

This commit prepares for that by adding a new ct_rule_update operation on
the ct_fs_ops struct which is used instead of add+delete.
Implementations for both dmfs (firmware steering) and smfs (software
steering) are provided, which simply add the new rule and delete the old
one.

Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20240808055927.2059700-12-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en/tc/ct_fs.h
drivers/net/ethernet/mellanox/mlx5/core/en/tc/ct_fs_dmfs.c
drivers/net/ethernet/mellanox/mlx5/core/en/tc/ct_fs_smfs.c
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c