git: 1af77be32760 - main - ipsec_offlad: remove not needed IFP_HS_INPUT/OUTPUT flags
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 04 Sep 2024 08:50:24 UTC
The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1af77be32760a86df242a1ffc3292dc3a7e59e27 commit 1af77be32760a86df242a1ffc3292dc3a7e59e27 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2024-09-01 16:20:14 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2024-09-04 08:49:38 +0000 ipsec_offlad: remove not needed IFP_HS_INPUT/OUTPUT flags Calculate the hdr_ext_size unconditionally, it is kept unused for SAs not handling the input. Sponsored by: NVidia networking --- sys/netipsec/ipsec_offload.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/netipsec/ipsec_offload.c b/sys/netipsec/ipsec_offload.c index 7453fb3818a6..5e8755d5f243 100644 --- a/sys/netipsec/ipsec_offload.c +++ b/sys/netipsec/ipsec_offload.c @@ -97,8 +97,6 @@ struct ifp_handle_sav { #define IFP_HS_HANDLED 0x00000001 #define IFP_HS_REJECTED 0x00000002 -#define IFP_HS_INPUT 0x00000004 -#define IFP_HS_OUTPUT 0x00000008 #define IFP_HS_MARKER 0x00000010 static CK_LIST_HEAD(, ifp_handle_sav) ipsec_accel_all_sav_handles; @@ -405,8 +403,7 @@ ipsec_accel_handle_sav(struct secasvar *sav, struct ifnet *ifp, ihs->drv_spi = drv_spi; ihs->ifdata = priv; ihs->flags = flags; - if ((flags & IFP_HS_OUTPUT) != 0) - ihs->hdr_ext_size = esp_hdrsiz(sav); + ihs->hdr_ext_size = esp_hdrsiz(sav); mtx_lock(&ipsec_accel_sav_tmp); CK_LIST_FOREACH(i, &sav->accel_ifps, sav_link) { if (i->ifp == ifp) {