Article View: linux.kernel.netdev
Article #8864[PATCH iproute2] ip-xfrm: add support for XFRM_POLICY_CPU_ACQUIRE
From: Nicolas Dichtel
Date: Fri, 30 Oct 2026 10:13
Date: Fri, 30 Oct 2026 10:13
76 lines
13207 bytes
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
Technical Details
Message-ID:
<20261030101359.1907972-1-nicolas.dichtel@6wind.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-353710-linux-kernel-netdev=dewy.ruShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-353710-linux-kernel-netdev=dewy.ru
From: nicolas.dichtel@6wind.com (Nicolas Dichtel)
Newsgroups: linux.kernel.netdev
Subject: [PATCH iproute2] ip-xfrm: add support for XFRM_POLICY_CPU_ACQUIRE
Date: Fri, 30 Oct 2026 11:13:59 +0100
Organization: Usenet Network
Message-ID: <20261030101359.1907972-1-nicolas.dichtel@6wind.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="2210067"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:IIGV8j6snbUGT8D1PO7TGef06pA= sha256:lYyxuNa5QvbtbPJDgR3f58vUgwysO9fw7CycB5tF0ng=
sha1:n0XIBgoOgKK6ohTFhk85upJqBsM= sha256:6UxT21PSiRSyQSVEAUUuSL8yQaOK7wzzdv3ytcbnjbA=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 18FC6125C91; Fri, 30 Oct 2026 13:19:36 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=6wind.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id nTSTD8PoG5Dj;
Fri, 30 Oct 2026 13:19:32 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-353710-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=6wind.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id 8FB4F125C8E; Fri, 30 Oct 2026 13:19:22 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sea.lore.kernel.org (Postfix) with ESMTP id 7F62329DD4; Fri, 30 Oct 2026 10:14:15 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1793355255;
b=ospjpKcHrYiv/U4iYk9gbp1WZe9naoQUPz3ytgRN1zzk4Mr4tJ3pbaZ746fEkibZd5uO
auugfOh9t4uwEM0fN2C3w2Ry2IUcfBixFUnfkkiGtk7j9sVIU7NwP+n7H8pcYAjA1hv39
T2UlLAhdQthv9/4t5o4pxFMUuKW6euxErHWdcABpZRaQBCjuonjYlq+stIHUQkL/7E/mY
W8BtucHBRkFB71HTZVFOhe34SYeaiwDbXYwMqZ3SLMUSnD9CBsPgjBm7l69gGBt+uN1UM
BeK4RYo9J3ptVgnTh44TLVfSk+dO/lmOUSiuxsDMUYzrtW5amBNX6C2zcFD8ZXqFjlg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793355255;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State:
X-Gm-Gg:X-Received:Received:X-Relaying-Domain:Received:From:To:Cc:
Subject:Date:Message-ID:X-Mailer:X-Mailing-List:List-Id:List-Post:
List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence:
MIME-Version:Content-Transfer-Encoding;
bh=Zk7O+18laJ6xepmT73CywoOPP+vRhvPaCfcZahdMOQE=;
b=EkXScYTTIqSP7OTlWqNFuXuzO+y7hrVEsxme8is9Nep3DuiVvPKx6716jZ4+AXIPq8kR
QBvRCG/WsV+m5wAqgHnG07AVaP/KGx854QHVXxrh6jiaU/RJsVJP3TrTavzudkGqLaI0j
lppKc5cSCQ2FVqYSPQUH7BuQlr4o/09nCQO7V4JkQHbt47roVBUrzK0jUDDLZBKtpdLeX
jvu5ZW/07o7R4NC+GROJ+GNOec39oV0QYcCWaxQv/aGIJkqVKEM6vFO5S8w1Bsme0f4JK
BM+CV7qsqx8i0jXW4g/x+vf2lNLhNIfIT44EByHcAtRUizxXdGOAHBQ13VPO3qJafAg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=6wind.com header.i=@6wind.com header.a=rsa-sha256 header.s=google header.b=cFhtbjeJ;
dmarc=pass header.from=6wind.com;
spf=pass smtp.mailfrom=6wind.com;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 55CC7606A321;
Fri, 30 Oct 2026 10:14:15 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key, unprotected) header.d=6wind.com header.i=@6wind.com header.a=rsa-sha256 header.s=google header.b=cFhtbjeJ
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.208.98
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1793355254;
b=5FZux3SZU6XC0V7qBnCrft/pW2GONazzDzOsX9zguUomtHra4EpwLvQzvDqMMietD99Y
VEJoOTSc5mxnP6wljOcsFRSHAF8tKfx0vo9QrKE6blbhSNDh1ZQX58ncQCQI/3yc/Atmu
GPUBVbpFPVIYPZVBT4eiw2SptuyFqGmNXnNLyjpZ5KCrKMfNNqI7i4L3qnYd7BdwrhiZf
E6/d/Y8jedHDlZ8fJ1rQwKqCAr06BP03+YzEGGtQpd8bNW5UdAoEJxTd5rQ5BGNe969w+
gUwFF3Y+jRv95GrZCggXQ5dEyFNql65UUzv03s7bxXNFljVKu/Bmmn08nhwgLFTQIjg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793355254;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received:
X-Relaying-Domain:Received:From:To:Cc:Subject:Date:Message-ID:
X-Mailer:MIME-Version:Content-Transfer-Encoding;
bh=Zk7O+18laJ6xepmT73CywoOPP+vRhvPaCfcZahdMOQE=;
b=JZPz5SM8BqNkSkZJcbg3M1RI6dXIZZc+KilSjX4PzmR9mpPxdWmoqZbbnp2dXytElQRL
hNqAWGO4509o/ESWibadE9jVFhwPZbfnuZsWXQmeSV7GLcp1OTQ3zwPupxiwj2RTtlH+s
McKhinsAYivc6TE+01CUV/UoVqWVnsW540d5hwDi/pKjXta3jz9sIPgdGLDDb92Tc/yyW
NpPlxGqV8yPR33z+HXFAAaZq4kD2RbiuQxk28FudVuF5Ve7toWph1QMXRbFeiz0VrFcy3
8sF+J9RqzXwn9gGH9B21gXIG9NGk/kblHMOug5Y3+GQA1GdbEGrfKxndemQknCXRPzA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=6wind.com;
spf=pass smtp.mailfrom=6wind.com;
dkim=pass header.d=6wind.com header.i=@6wind.com header.a=rsa-sha256 header.s=google header.b=cFhtbjeJ;
arc=none smtp.remote-ip=209.85.208.98
X-Received: from mail-ed1-f98.google.com (mail-ed1-f98.google.com [209.85.208.98])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id EE6F3606A31A
for <netdev@vger.kernel.org>; Fri, 30 Oct 2026 10:14:13 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org EE6F3606A31A
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=6wind.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=6wind.com
X-Received: by mail-ed1-f98.google.com with SMTP id 4fb4d7f45d1cf-6aff2e5b322so88236a12.0
for <netdev@vger.kernel.org>; Fri, 30 Oct 2026 03:14:13 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=6wind.com; s=google; t=1793355252; x=1793960052; darn=vger.kernel.org;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:from:to:cc:subject:date:message-id:reply-to:content-type;
bh=Zk7O+18laJ6xepmT73CywoOPP+vRhvPaCfcZahdMOQE=;
b=cFhtbjeJ3TqQ44NNXbS8ft/dBIPIjqQnG+3hkY3PSdXlaWqC9I9dO7SBuQLFFrd+mq
WQmxMKyY4sHs00CqD7W1XfTHftFZ50XYNcyOb1pBTmiTaMAI+5ka7Ty3X5ZkWqVdsFHJ
570VcNgfffM7UPIQtXa+/Au0iwV/38lLSBpb3Fui2YyFy+Q3RFHBDRdWBBoq5RQJAsEs
nf1EgBqD/Z3SP4kQ2pXCUVKr/4nlaQ00XMjGfSFA+NejmzNb7WZVm0J9ka9kKHYoSzAz
OHRZ4PbWdRE+4PG16c/QHB/lormVw7WG9/TKWBTNttmh428N8eyFafvTOfYfQJ2E7WCE
gzzA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1793355252; x=1793960052;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=Zk7O+18laJ6xepmT73CywoOPP+vRhvPaCfcZahdMOQE=;
b=b+/fB+7RaSgTNk4Lf7pnOgN2wG1FI3bgQqGE44eh12N9okjQvTZlyGqMKS0uLMBkwY
ctNViUKeN5Cial1cKXDdJTxrvwsoIk0NI6gdLRSZUjGnhh5rwedMjskvt/vi7o7mQXFp
mpq29A/rq4RsZEPWZghuPSZC6l6b6XWi6JlE/FONfFW1ab5ngZ2N9NpMdHcVvkxLMLnQ
nLd+oSYd4Iyfc3cdyvftw/ndqdl1Roo+rKiso95yHmOw2NXHdki/KrKBywUxa7qcpW2L
cRe75BHLkFZcmr0v3/cPfcIRJX478mC4yhsWJPCWfy9no5hN5Xo540xpWDqul9IQj0DT
BzAw==
X-Forwarded-Encrypted: i=1; AKwUvBzwH/TINqYST8lLCN804Tk6ed2g9/DpjTnUWxFN9oBZYa9Ad1vmzs5Ww8TBKbMx5yR66AjAyQ4=@vger.kernel.org
X-Gm-Message-State: AFq9FYIAwJOUjjymCpQhZAj0x18QrXiiZ+XqSgR/xWfc2rFJLbxAbRdH
Ueg/71lXqWpvJ6IQxq8B8KrZeWZC/cu12Pn/p5vRH3q0fxlxllbt+3rDLcPAPdl1KL77b78AnA4
Wz7oqRLpf+vGiBMxuobOn0mm+ztmIyK9zIqUF
X-Gm-Gg: AYBFou3z+2NRH3qy/dNz1N33vgg3e22fnn8aKDeoRVkcQLjFpaCbsIeDt++pE77n/gM
j/viaHuTN7jzek7k4F5C8yny579Yemyqm4uE/0ttKW/2RDFdvhEGx65al3PKL3/Wbh4sRJE/6wA
SQPnIgGmVGsxjx73QugOHchpAduCkmdWbE27uyvqzoJYV0/CHaAJQwaXm35DPPVHkKrbkCkaSOf
gbzgzm4Z2hqOdMujPCSIGWx+ORe1A4YdPNXWcYGBZUVmfqQh5F/sNRCnO3faem016eCYzmrt8Zf
LVXSn5udMIHI4aoiReVFeJxKMfYFemWgJkyFwvFFMywC2aPpClreK7q66elOpUPi8B1uGiMpn2o
DkD3iAblmWT8LGsZ+MYrXKzsxvg==
X-Received: by 2002:a05:6402:f16:b0:6b1:bfa2:28b9 with SMTP id 4fb4d7f45d1cf-6b4d466f8d6mr1301453a12.2.1793355252160;
Fri, 30 Oct 2026 03:14:12 -0700 (PDT)
X-Received: from smtpservice.6wind.com ([185.13.181.2])
by smtp-relay.gmail.com with UTF8SMTP id 4fb4d7f45d1cf-6b4d7a4f16fsm307926a12.2.2026.10.30.03.14.11;
Fri, 30 Oct 2026 03:14:12 -0700 (PDT)
X-Relaying-Domain: 6wind.com
X-Received: from localhost (bretzel.dev.6wind.com [10.17.1.57])
by smtpservice.6wind.com (Postfix) with UTF8SMTP id D36D411016;
Fri, 30 Oct 2026 11:14:11 +0100 (CET)
X-Cc: David Ahern <dsahern@gmail.com>,
Sabrina Dubroca <sd@queasysnail.net>,
Steffen Klassert <steffen.klassert@secunet.com>,
netdev@vger.kernel.org,
Nicolas Dichtel <nicolas.dichtel@6wind.com>
X-Mailer: git-send-email 2.47.3
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list