OSDN Git Service

net/mlx5e: Add SW implementation to support IPsec 64 bit soft and hard limits
authorLeon Romanovsky <leonro@nvidia.com>
Thu, 30 Mar 2023 08:02:24 +0000 (11:02 +0300)
committerLeon Romanovsky <leonro@nvidia.com>
Mon, 3 Apr 2023 06:29:47 +0000 (09:29 +0300)
commitd05971a413d3c3dd207c604a6dbfc702070da63e
treed1cc18ca84f7c4206ad7beadf32fe54e863df1b6
parent2da961d21663a72610f36a4f69b1090f2c61f23f
net/mlx5e: Add SW implementation to support IPsec 64 bit soft and hard limits

The CX7 cards which support IPsec packet offload use 32 bits to
configure soft and hard packet limits. This is not enough as the
software part using 64 bits.

The needed functionality of supporting 64 bits is implemented through
mlx5 abstraction layer, which will ensure that HW is reconfigured
on-demand every 2^31 packets.

To simulate the 64 bit IPsec soft/hard limits, we divide the soft/hard
limits to multiple interrupts (rounds). Each round counts 2^31 packets.
Once the counter is less than or equal to 2^31, the soft event is raised
and software sets the bit 31 of the counter and decrement the round
counter.

Link: https://lore.kernel.org/r/5a86c890b6dccb6865acf9042a8b03f899d1f3f9.1680162300.git.leonro@nvidia.com
Reviewed-by: Raed Salem <raeds@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_offload.c