mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-01 02:32:49 -04:00
net/mlx5e: Enable remove flow for hard packet limit
In the commita2a73ea14b("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 commitb2f7b01d36("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>
This commit is contained in:
committed by
Jakub Kicinski
parent
6e20d538fb
commit
88c46f6103
@@ -127,6 +127,7 @@ static void mlx5e_ipsec_packet_setup(void *obj, u32 pdn,
|
||||
MLX5_SET(ipsec_aso, aso_ctx, remove_flow_pkt_cnt,
|
||||
attrs->lft.hard_packet_limit);
|
||||
MLX5_SET(ipsec_aso, aso_ctx, hard_lft_arm, 1);
|
||||
MLX5_SET(ipsec_aso, aso_ctx, remove_flow_enable, 1);
|
||||
}
|
||||
|
||||
if (attrs->lft.soft_packet_limit != XFRM_INF) {
|
||||
|
||||
Reference in New Issue
Block a user