]> www.infradead.org Git - users/hch/misc.git/commit
net/mlx5: HWS, update flow - support through bigger action RTC
authorYevgeny Kliteynik <kliteyn@nvidia.com>
Thu, 9 Jan 2025 16:05:46 +0000 (18:05 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 14 Jan 2025 03:21:09 +0000 (19:21 -0800)
commit3fc44ca44d7c6c9296e9926dd3d99a74694bcb6e
tree7ac0c96ec78763f0e9ea84185067d0fb3fe52247
parentab6912ff6558a504d9a02c01333ef8f4247681ad
net/mlx5: HWS, update flow - support through bigger action RTC

This patch is the second part of update flow implementation.

Instead of using two action RTCs, we use the same RTC which is twice
the size of what was required before the update flow support.
This way we always allocate STEs from the same RTC (same pool),
which means that update is done similar to how create is done.
The bigger size allows us to allocate and write new STEs, and
later free the old (pre-update) STEs.

Similar to rule creation, STEs are written in reverse order:
 - write action STEs, while match STE is still pointing to
   the old action STEs
 - overwrite the match STE with the new one, which now
   is pointing to the new action STEs

Old action STEs can be freed only once we got completion on the
writing of the new match STE. To implement this we added new rule
states: UPDATING/UPDATED. Rule is moved to UPDATING state in the
beginning of the update flow. Once all completions are received,
rule is moved to UPDATED state. At this point old action STEs are
freed and rule goes back to CREATED state.

Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Signed-off-by: Vlad Dogaru <vdogaru@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20250109160546.1733647-16-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/matcher.c
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/rule.c
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/rule.h
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/send.c