xfrm: add support to HW update soft and hard limits
authorLeon Romanovsky <leonro@nvidia.com>
Fri, 2 Dec 2022 18:41:33 +0000 (20:41 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Mon, 5 Dec 2022 09:38:31 +0000 (10:38 +0100)
commitf3da86dc2c8c9004445cfbb15ac086773622d853
tree72e3947207ee4d706a9a0f16c0335c2502396e1a
parent3c611d40c6923c81e6a83a67156cd30a9503c155
xfrm: add support to HW update soft and hard limits

Both in RX and TX, the traffic that performs IPsec packet offload
transformation is accounted by HW. It is needed to properly handle
hard limits that require to drop the packet.

It means that XFRM core needs to update internal counters with the one
that accounted by the HW, so new callbacks are introduced in this patch.

In case of soft or hard limit is occurred, the driver should call to
xfrm_state_check_expire() that will perform key rekeying exactly as
done by XFRM core.

Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
include/linux/netdevice.h
include/net/xfrm.h
net/xfrm/xfrm_state.c