From b256ff9303ba6457584de4fe695f8b0322cd5fdc Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Wed, 7 Feb 2024 03:49:14 +0200 Subject: [PATCH] sys/pfkeyv2.h: define extensions for ipsec inline accel control The extensions allow to restrict interface where SP or SA are offloaded, and to receive software and hardware offload counters for given SA. Sponsored by: NVIDIA networking Differential revision: https://reviews.freebsd.org/D44316 --- sys/net/pfkeyv2.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sys/net/pfkeyv2.h b/sys/net/pfkeyv2.h index a0246c9223ba..8df7536f7563 100644 --- a/sys/net/pfkeyv2.h +++ b/sys/net/pfkeyv2.h @@ -296,6 +296,13 @@ struct sadb_x_sa_replay { }; _Static_assert(sizeof(struct sadb_x_sa_replay) == 8, "struct size mismatch"); +struct sadb_x_if_hw_offl { + u_int16_t sadb_x_if_hw_offl_len; + u_int16_t sadb_x_if_hw_offl_exttype; + u_int32_t sadb_x_if_hw_offl_flags; + u_int8_t sadb_x_if_hw_offl_if[32]; /* IF_NAMESIZE is 16, keep room */ +}; + #define SADB_EXT_RESERVED 0 #define SADB_EXT_SA 1 #define SADB_EXT_LIFETIME_CURRENT 2 @@ -326,7 +333,10 @@ _Static_assert(sizeof(struct sadb_x_sa_replay) == 8, "struct size mismatch"); #define SADB_X_EXT_SA_REPLAY 26 /* Replay window override. */ #define SADB_X_EXT_NEW_ADDRESS_SRC 27 #define SADB_X_EXT_NEW_ADDRESS_DST 28 -#define SADB_EXT_MAX 28 +#define SADB_X_EXT_LFT_CUR_SW_OFFL 29 +#define SADB_X_EXT_LFT_CUR_HW_OFFL 30 +#define SADB_X_EXT_IF_HW_OFFL 31 +#define SADB_EXT_MAX 31 #define SADB_SATYPE_UNSPEC 0 #define SADB_SATYPE_AH 2