aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/net/xfrm.h
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@nvidia.com>2023-10-04 14:11:48 +0300
committerSaeed Mahameed <saeedm@nvidia.com>2024-02-05 16:45:49 -0800
commitf9f221c98fd83df518fbb2f5ad33980cfedfe1bf (patch)
tree628cc3e65fa3fda51edc9267a1695667b7dfbbf9 /include/net/xfrm.h
parentxfrm: generalize xdo_dev_state_update_curlft to allow statistics update (diff)
downloadwireguard-linux-f9f221c98fd83df518fbb2f5ad33980cfedfe1bf.tar.xz
wireguard-linux-f9f221c98fd83df518fbb2f5ad33980cfedfe1bf.zip
xfrm: get global statistics from the offloaded device
Iterate over all SAs in order to fill global IPsec statistics. Acked-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'include/net/xfrm.h')
-rw-r--r--include/net/xfrm.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 4ca2f3205190..57c743b7e4fe 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -51,8 +51,10 @@
#ifdef CONFIG_XFRM_STATISTICS
#define XFRM_INC_STATS(net, field) SNMP_INC_STATS((net)->mib.xfrm_statistics, field)
+#define XFRM_ADD_STATS(net, field, val) SNMP_ADD_STATS((net)->mib.xfrm_statistics, field, val)
#else
#define XFRM_INC_STATS(net, field) ((void)(net))
+#define XFRM_ADD_STATS(net, field, val) ((void)(net))
#endif
@@ -1577,6 +1579,7 @@ struct xfrm_state *xfrm_stateonly_find(struct net *net, u32 mark, u32 if_id,
struct xfrm_state *xfrm_state_lookup_byspi(struct net *net, __be32 spi,
unsigned short family);
int xfrm_state_check_expire(struct xfrm_state *x);
+void xfrm_state_update_stats(struct net *net);
#ifdef CONFIG_XFRM_OFFLOAD
static inline void xfrm_dev_state_update_stats(struct xfrm_state *x)
{