net/mlx5e: Enable remove flow for hard packet limit
authorJianbo Liu <jianbol@nvidia.com>
Thu, 8 Aug 2024 05:59:18 +0000 (08:59 +0300)
committerJakub Kicinski <kuba@kernel.org>
Sat, 10 Aug 2024 05:13:14 +0000 (22:13 -0700)
commit88c46f6103e232e819b35ca811e96454d70a7138
tree5bf2685b6930561d41b3af4c463e67d4b1a93466
parent6e20d538fb1dfb9c477a8e991da1fca3064ce0f7
net/mlx5e: Enable remove flow for hard packet limit

In the commit a2a73ea14b1a ("net/mlx5e: Don't listen to remove flows
event"), remove_flow_enable event is removed, and the hard limit
usually relies on software mechanism added in commit b2f7b01d36a9
("net/mlx5e: Simulate missing IPsec TX limits hardware
functionality"). But the delayed work is rescheduled every one second,
which is slow for fast traffic. As a result, traffic can't be blocked
even reaches the hard limit, which usually happens when soft and hard
limits are very close.

In reality it won't happen because soft limit is much lower than hard
limit. But, as an optimization for RX to block traffic when reaching
hard limit, need to set remove_flow_enable. When remove flow is
enabled, IPSEC HARD_LIFETIME ASO syndrome will be set in the metadata
defined in the ASO return register if packets reach hard lifetime
threshold. And those packets are dropped immediately by the steering
table.

Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20240808055927.2059700-3-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_offload.c