]> git.hungrycats.org Git - linux/commit
net/mlx5: fs, add support for no append at software level
authorMark Bloch <mbloch@nvidia.com>
Wed, 11 Sep 2024 20:17:50 +0000 (13:17 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 13 Sep 2024 03:50:28 +0000 (20:50 -0700)
commit1217e6989c99c1c4b76866ea395dda757c79deb4
treea8291a3768d09bd5acff46c2a48b5b6f59505be0
parentef7b79b924e50bef444dfdc04bb24693ad50365d
net/mlx5: fs, add support for no append at software level

Native capability for some steering engines lacks support for adding an
additional match with the same value to the same flow group. To accommodate
the NO APPEND flag in these scenarios, we include the new rule in the
existing flow table entry (fte) without immediate hardware commitment. When
a request is made to delete the corresponding hardware rule, we then commit
the pending rule to hardware.

Only one pending rule is supported because NO_APPEND is primarily used
during replacement operations. In this scenario, a rule is initially added.
When it needs replacement, the new rule is added with NO_APPEND set. Only
after the insertion of the new rule is the original rule deleted.

Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20240911201757.1505453-9-saeed@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
drivers/net/ethernet/mellanox/mlx5/core/fs_core.h
drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c