net/mlx5e: Simulate missing IPsec TX limits hardware functionality
authorLeon Romanovsky <leonro@nvidia.com>
Thu, 30 Mar 2023 08:02:31 +0000 (11:02 +0300)
committerLeon Romanovsky <leon@kernel.org>
Thu, 6 Apr 2023 07:12:03 +0000 (10:12 +0300)
commitb2f7b01d36a9b94fbd7489bd1228025ea7e7a2f4
tree416115246efa2efab2cdb5e1b8f8109675061a38
parent4562116f8a565fdeadb0af5503cb7edb8e9d5761
net/mlx5e: Simulate missing IPsec TX limits hardware functionality

ConnectX-7 devices don't have ability to send TX hard/soft limits
events. As a possible workaround, let's rely on existing infrastructure
and use periodic check of cached flow counter. In these periodic checks,
we call to xfrm_state_check_expire() to check and mark state accordingly.

Once the state is marked as XFRM_STATE_EXPIRED, the SA flow rule is
changed to drop all the traffic.

Link: https://lore.kernel.org/r/94a5d82c0c399747117d8a558f9beebfbcf26154.1680162300.git.leonro@nvidia.com
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.h
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c