]> www.infradead.org Git - users/willy/xarray.git/commit
net/mlx5e: Approximate IPsec per-SA payload data bytes count
authorLeon Romanovsky <leonro@nvidia.com>
Thu, 27 Jun 2024 18:02:40 +0000 (21:02 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Jun 2024 11:58:12 +0000 (12:58 +0100)
commite562f2d46d27576dd4108c1c4a67d501a5936e31
tree52c5120758cf3733405cb058fb16ad3d55fe8daa
parent2d9dac5559f8cc4318e6b0d3c5b71984f462620b
net/mlx5e: Approximate IPsec per-SA payload data bytes count

ConnectX devices lack ability to count payload data byte size which is
needed for SA to return to libreswan for rekeying.

As a solution let's approximate that by decreasing headers size from
total size counted by flow steering. The calculation doesn't take into
account any other headers which can be in the packet (e.g. IP extensions).

Fixes: 5a6cddb89b51 ("net/mlx5e: Update IPsec per SA packets/bytes count")
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c