๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
2 messages
2 total messages Started by Nicolas Dichtel Fri, 30 Oct 2026 10:13
[PATCH iproute2] ip-xfrm: add support for XFRM_POLICY_CPU_ACQUIRE
#8864
Author: Nicolas Dichtel
Date: Fri, 30 Oct 2026 10:13
76 lines
13207 bytes
This flag is used to enable RFC 9611. The corresponding option for states
is 'pcpu-num', see commit b544c7c5c7cb ("ip-xfrm: add pcpu-num support").

Link: https://www.rfc-editor.org/info/rfc9611
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 ip/ipxfrm.c        |  1 +
 ip/xfrm_policy.c   |  4 +++-
 man/man8/ip-xfrm.8 | 10 +++++++---
 3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/ip/ipxfrm.c b/ip/ipxfrm.c
index 586d24fb8594..78d9e1929760 100644
--- a/ip/ipxfrm.c
+++ b/ip/ipxfrm.c
@@ -1094,6 +1094,7 @@ void xfrm_policy_info_print(struct xfrm_userpolicy_info *xpinfo,
 		fprintf(fp, "flag ");
 		XFRM_FLAG_PRINT(fp, flags, XFRM_POLICY_LOCALOK, "localok");
 		XFRM_FLAG_PRINT(fp, flags, XFRM_POLICY_ICMP, "icmp");
+		XFRM_FLAG_PRINT(fp, flags, XFRM_POLICY_CPU_ACQUIRE, "cpu-acquire");
 		if (flags)
 			fprintf(fp, "%x", flags);
 	}
diff --git a/ip/xfrm_policy.c b/ip/xfrm_policy.c
index e60acd5bb98f..5261a292f468 100644
--- a/ip/xfrm_policy.c
+++ b/ip/xfrm_policy.c
@@ -61,7 +61,7 @@ static void usage(void)
 		"PTYPE := main | sub\n"
 		"ACTION := allow | block\n"
 		"FLAG-LIST := [ FLAG-LIST ] FLAG\n"
-		"FLAG := localok | icmp\n"
+		"FLAG := localok | icmp | cpu-acquire\n"
 		"LIMIT-LIST := [ LIMIT-LIST ] limit LIMIT\n"
 		"LIMIT := { time-soft | time-hard | time-use-soft | time-use-hard } SECONDS |\n"
 		"         { byte-soft | byte-hard } SIZE | { packet-soft | packet-hard } COUNT\n"
@@ -139,6 +139,8 @@ static int xfrm_policy_flag_parse(__u8 *flags, int *argcp, char ***argvp)
 				*flags |= XFRM_POLICY_LOCALOK;
 			else if (strcmp(*argv, "icmp") == 0)
 				*flags |= XFRM_POLICY_ICMP;
+			else if (strcmp(*argv, "cpu-acquire") == 0)
+				*flags |= XFRM_POLICY_CPU_ACQUIRE;
 			else {
 				PREV_ARG(); /* back track */
 				break;
diff --git a/man/man8/ip-xfrm.8 b/man/man8/ip-xfrm.8
index 4c278ccba38c..50fbb1a7d93d 100644
--- a/man/man8/ip-xfrm.8
+++ b/man/man8/ip-xfrm.8
@@ -376,7 +376,7 @@ ip-xfrm \- transform configuration
 
 .ti -8
 .IR FLAG " :="
-.BR localok " | " icmp
+.BR localok " | " icmp " | " cpu-acquire
 
 .ti -8
 .IR LIMIT-LIST " := [ " LIMIT-LIST " ]"
@@ -674,8 +674,12 @@ is a number that defaults to zero.
 
 .TP
 .I FLAG-LIST
-contains one or both of the following optional flags:
-.BR local " or " icmp "."
+contains one or more of the following optional flags:
+.BR localok ", " icmp ", or " cpu-acquire "."
+.B cpu-acquire
+enables per-CPU SAs (RFC 9611): the acquire messages generated for this
+policy carry the number of the CPU that processed the packet, see
+.BR pcpu-num "."
 
 .TP
 .I LIMIT-LIST
-- 
2.47.3
Re: [PATCH iproute2] ip-xfrm: add support for XFRM_POLICY_CPU_ACQUIRE
#17007
Author: Nicolas Dichtel
Date: Mon, 16 Nov 2026 09:10
15 lines
11721 bytes
Le 30/10/2026 ร  11:13, Nicolas Dichtel a รฉcritย :
> This flag is used to enable RFC 9611. The corresponding option for states
> is 'pcpu-num', see commit b544c7c5c7cb ("ip-xfrm: add pcpu-num support").
> 
> Link: https://www.rfc-editor.org/info/rfc9611
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>

This commit is archived on patchwork, but its status is still set to 'new'.
Should I repost it?

https://patchwork.kernel.org/project/netdevbpf/patch/20261030101359.1907972-1-nicolas.dichtel@6wind.com/

Regards,
Nicolas
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads