Article View: linux.kernel.netdev
Article #7180[PATCH net-next v4 2/2] netlink: specs: add ovs datapath and vport set operations
From: Minxi Hou
Date: Sun, 25 Oct 2026 10:34
Date: Sun, 25 Oct 2026 10:34
111 lines
14076 bytes
14076 bytes
Both families register a SET command that the spec never described, so
a YNL client could not modify an existing datapath or vport. The kernel
handlers take CAP_NET_ADMIN through GENL_UNS_ADMIN_PERM.
In the kernel, the datapath SET command changes the user features, the
masks cache size and the per-cpu upcall pids. The vport SET command
changes the upcall pid. The kernel rejects an ifindex before it looks
at the type or the options, rejects a type change, and rejects options.
Signed-off-by: Minxi Hou <houminxi@gmail.com>
---
Documentation/netlink/specs/ovs_datapath.yaml | 21 +++++++++++++++++++
Documentation/netlink/specs/ovs_vport.yaml | 21 +++++++++++++++++++
2 files changed, 42 insertions(+)
diff --git a/Documentation/netlink/specs/ovs_datapath.yaml b/Documentation/netlink/specs/ovs_datapath.yaml
index f7b3671991e6..83f6b060ed75 100644
--- a/Documentation/netlink/specs/ovs_datapath.yaml
+++ b/Documentation/netlink/specs/ovs_datapath.yaml
@@ -138,21 +138,42 @@ operations:
doc: Create new OVS data path
value: 1
attribute-set: datapath
+ flags: [uns-admin-perm]
do:
request:
attributes:
- name
- upcall-pid
- user-features
+ - masks-cache-size
+ - per-cpu-pids
+ - ifindex
-
name: del
doc: Delete existing OVS data path
value: 2
attribute-set: datapath
+ flags: [uns-admin-perm]
do:
request:
attributes:
- name
+ -
+ name: set
+ doc: |
+ Modify an existing OVS data path. The kernel treats a missing
+ user-features attribute as zero and clears the previously set
+ features.
+ value: 4
+ attribute-set: datapath
+ flags: [uns-admin-perm]
+ do:
+ request:
+ attributes:
+ - name
+ - user-features
+ - masks-cache-size
+ - per-cpu-pids
mcast-groups:
list:
diff --git a/Documentation/netlink/specs/ovs_vport.yaml b/Documentation/netlink/specs/ovs_vport.yaml
index fa975f8821b6..189cb5b99aee 100644
--- a/Documentation/netlink/specs/ovs_vport.yaml
+++ b/Documentation/netlink/specs/ovs_vport.yaml
@@ -128,6 +128,7 @@ operations:
name: new
doc: Create a new OVS vport
attribute-set: vport
+ flags: [uns-admin-perm]
do:
request:
attributes:
@@ -140,6 +141,7 @@ operations:
name: del
doc: Delete existing OVS vport from a data path
attribute-set: vport
+ flags: [uns-admin-perm]
do:
request:
attributes:
@@ -165,6 +167,25 @@ operations:
- netnsid
- upcall-stats
dump: *vport-get-op
+ -
+ name: set
+ doc: |
+ Modify an existing OVS vport. The kernel rejects an ifindex with
+ -EOPNOTSUPP, before it looks at the type or the options. It rejects
+ options with -EOPNOTSUPP, and rejects a type that differs from the
+ vport's type with -EINVAL.
+ value: 4
+ attribute-set: vport
+ flags: [uns-admin-perm]
+ do:
+ request:
+ attributes:
+ - name
+ - type
+ - options
+ - upcall-pid
+ - port-no
+ - ifindex
mcast-groups:
list:
--
2.56.0
Technical Details
Message-ID:
<20261025103409.3519874-3-houminxi@gmail.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-351528-linux-kernel-netdev=dewy.ruReferences:
<20261025103409.3519874-1-houminxi@gmail.com>Show 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-351528-linux-kernel-netdev=dewy.ru
From: houminxi@gmail.com (Minxi Hou)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net-next v4 2/2] netlink: specs: add ovs datapath and vport set operations
Date: Sun, 25 Oct 2026 06:34:09 -0400
Organization: Usenet Network
Message-ID: <20261025103409.3519874-3-houminxi@gmail.com>
References: <20261025103409.3519874-1-houminxi@gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="989628"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:nn3LdsuBLysbiEWutLGmXAaiHeQ= sha256:p1YcYKAryopTx6JTECwvDnh5wozsUP1Wgapm1jLpWQc=
sha1:VRa6wJNzNEi6qTEMs+zm9/uircY= sha256:acZJJmFaWTciUMvuzwkNckdTkIYqmcv2C9qbZDhncsU=
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 59FC8125B2F; Sun, 25 Oct 2026 13:35:18 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.048
X-Spam-Status: No, score=-3.048 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, FREEMAIL_FORGED_FROMDOMAIN=0.001,
FREEMAIL_FROM=0.001, 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] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=gmail.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 yovl5uaSDDVY;
Sun, 25 Oct 2026 13:35:15 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-351528-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id 36D26125B2E; Sun, 25 Oct 2026 13:35:07 +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 A2EAD2C8E7; Sun, 25 Oct 2026 10:34:29 +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=1792924469;
b=dduskSPPSagrkor6axthkgfqeVMngI/JTSaWMhLSLm/85Ab2KEfI62atnTXPqEZ3LlXu
kdoGhRSmN02vGxUudeIkrKQbf8/A7HQircmMaOVIZmyJptR3twa95TWoTbUgrxeBrFcOT
h+vxfl7lNm0DrftTX8hC/SCkWJyhfMguBDl+v5qwJe6k27wiUnqAZiEZxaDxUNen3ZHYi
WbB2qfO2KdtMCT9Sn5kdDyMMjR9IDpkz4ZM3vbHQYcpKniuQcYk6Aqvr6Tlbq1WpDbt7R
llWA6bGRFtyVGQaDCqI3Ye/ZzUYH5MXSXkNP0IduXCmmi5XRwHr16hokzYuX7qOMNdg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1792924469;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:
References:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
List-Unsubscribe:List-Owner:Precedence:MIME-Version:
Content-Transfer-Encoding;
bh=YRfYLJJYd1L0c12a9Vplu1prrhSRzB61T2SM2N76MS0=;
b=aweRFpVC9QUcCI3i7JD5G18gkQmRQEp1UW8gvNnhNPbRPZRuc8B9gA+BQs4SFAjeG7ec
PMDnBW0iDG6fms26mLCEo8vOLn+wJhazM0VUy6vH0+UIt3yDyP/hYMr9mKhsNim3J2dRg
TBtc7HJdAB0Go+u5zc7FbIDJzTeaYV8ASeFZPHGoieO5za71YbQLFr/Yu5zIZsveTMzmY
OhoclOMwIkajjeYLdDd5N6WvM7LM8uXyqJO/6qM6Uha2VVUyANAseFLfdjJwg+m+1hcdj
oj6LbKLlDV2GAPKy+kBQhzgICjYQ0dqg69mFbyy465ImZEOxcPXcW+jGUgaz3v7iXtQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=VB3atq6D;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.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 E172D606A325;
Sun, 25 Oct 2026 10:34:28 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=VB3atq6D
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.171
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1792924468;
b=E36RiaXrIv2fpddFR5Knn4402E+bLsXf2ahu6/mJWUIOaO/keQAiMu6IE3N8BlEikSbo
rHD7jG/wgVwL96LuAu3WErXTEQFQUNgMJhBTYsJ+96iGHygBNwLAb3YKwW+vbUiVGWqZW
C/+Aje+GGhwLn0TSD42ylqdnVPbsnpdoc/2yCYa2CzBl/S6PCkgezsRncn/dSGVfAvYtQ
RwzjR4jrCK/PPRhDi9vPHI6QX0qHZsv5oNyuXvzksdWRMqLLdPFbOMo26xOoN6/wpACJR
QM9IyVQgpCda4ZMj88IbPFQh8pHmxI3Tc0Q9xhMbFfUXHwZh85FsENy1oNo/RWMj+fQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1792924468;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject:
Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version:
Content-Transfer-Encoding;
bh=YRfYLJJYd1L0c12a9Vplu1prrhSRzB61T2SM2N76MS0=;
b=jrA7ftjz5NYjsRC98+lMItZ2n5SJ+UwflBUFDVFOD6I6i7Kw0PnwuDHoIoyV780r9Q4M
HRG3yZC9k8guE1rhPXOlY59SukVyaWLrUKVNK+KePv0tkiHpi8FgNz3aulWhc50uyoaoe
pFxu8GcMFnpA51ZLK0ktLkn2XsamQtsEAjX1PoAOoMLbGdg7zKaiYl+ZcHLXKci1odUt1
h302C73pKxGkzs/YJAA3GK4wmU9wf/aoQib0S2xjdSgNoPiCE3gFMydU/psb9Zj7SOaZJ
XUDjevPUqvgvAQ7RBjFc50AKi59grXOPUAzmBk0NIqauhucFXvJCqdnlKlPb26Vu0Mg==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=VB3atq6D;
arc=none smtp.remote-ip=74.125.82.171
X-Received: from mail-dy1-f171.google.com (mail-dy1-f171.google.com [74.125.82.171])
(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 AC8DD606A31E
for <netdev@vger.kernel.org>; Sun, 25 Oct 2026 10:34:27 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org AC8DD606A31E
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-dy1-f171.google.com with SMTP id 5a478bee46e88-3514b90bb89so5100218eec.1
for <netdev@vger.kernel.org>; Sun, 25 Oct 2026 03:34:27 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20251104; t=1792924467; x=1793529267; darn=vger.kernel.org;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=YRfYLJJYd1L0c12a9Vplu1prrhSRzB61T2SM2N76MS0=;
b=VB3atq6DfavtIUlgWgp/ACfxg/bdmFKvcckbOdSXA8SzRhnLrmotmZ11liKAQJt2Vn
b+zKv9uD02G6epR9roDvQ2FpoEtJC1kx12LFsbDvykQdHfh6niSWwrafDVUjUmc8Ky9S
VrdU9ZYTbmeNLHkxopjSCExOaSEnhpkL9Xx4pwJwHGSZA4DxF7E3UqGZyRCiJeiD85RH
OixsDaGcHk42N1aWvda2Qh6V2Xgws7g/hIkIKC1AHObVI5NNHKmUbJ6INIuR5cpgiq8k
TFIWZucxT+qhsE/09UNvzLtYSVArP+vGcreaYlP0IpJbicxdtWGuuF/wcXvO3aw+3Tvw
H5tw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1792924467; x=1793529267;
h=content-transfer-encoding:mime-version:references:in-reply-to
: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=YRfYLJJYd1L0c12a9Vplu1prrhSRzB61T2SM2N76MS0=;
b=h722K5Uu6363ukR4L2HiSzyoTxuM+VlLCKxGmc41dsmuFlVmf1hLA6+7ZAFsRSqVkS
pWA+H5Fffhq10FVN34QJS+IzWqN4VzmPstPFLzdHPOGfR85Hnv7GHoRdK0lc0On2yAJm
BAEqMTKfc8EiZKn5bmXoJkvPTyWQBaFFDUaBG3ATN+DPwMOprynpJGxckNeB52JIiftu
Z9vmTCcIS54NspE2KUtK09DyFPbwkiyQg28pphRK071YkHuqBoTJCYVwQyzoabbXLTs5
bENlvfREKXMxTWdcwRJg59AZnbJIJ57Lq+fHTXJIh41zfmpF5oJ9bNp6qcH1QAauhKmk
mKbQ==
X-Gm-Message-State: AFq9FYIBw/Z7Ji4wpRWGOpPVp1kYlh0v/j8HnVHhlSmPZPMJJZlNuLS/
JV0Vo7p8esrV3gMxPNZjwv4jMO0buhxIXsg66SJjbLugu2wwvyR2mCCqfzQHmemkEpdmdA==
X-Gm-Gg: AYBFou2RIneXVcs+Fyi9b0pddY9JVq7fwiwd/nI1BB0Uzz8yXmp67oYRUlYZnKvWiNp
wYHoU3GJ8mxtyZu/ex7ErwYO5yXr84rtXm6XQSMfVY0iIEj9+hUTXPBACqcK8b6CfzqyYpnOazh
KarsZI03NJbzmyvk1lQREnAFrm2E68BOGtcLqzo0cKzPtzfTVTLiUreE4bB9QXCOZHixTHc5OD3
pU+OU5TBvBRVDDtcFik+dNGJ1v8uOJ/7NPT4j69BtOxP8foAv0R6At5XXbeFtTD0ZNjyhfzydco
0lrv+Akl8qQ/iuxTpE9DEfBDNSg3lEIGU11DuHg84kkR76RIo4goq7PSELJm4IFbNhM7V0Vm8fj
/2cprd0AH+iYiPFIB0T9CIbqmPkqtgw6+sXZWYrMy9QRrZdl5UH1EaEpVCh1eoYPaehDBa1Qqhz
YQiYGovJRX90asYY26VFJi7I+WkZbBcrmYdRT9lmaRyw/Jhw/xu2UVU3glMU54NKCEjaOYVeFmD
+IZrNPY0+uvkNPi5tik1mAVgKoFhUZHKVvDxYXvs50+sulDjA==
X-Received: by 2002:a05:693c:8352:b0:35a:5153:ab24 with SMTP id 5a478bee46e88-369e845b07emr4505740eec.9.1792924466662;
Sun, 25 Oct 2026 03:34:26 -0700 (PDT)
X-Received: from houminxi ([61.170.150.30])
by smtp.gmail.com with ESMTPSA id 5a478bee46e88-369ef6a71easm12597256eec.5.2026.10.25.03.34.24
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Sun, 25 Oct 2026 03:34:25 -0700 (PDT)
X-Cc: Donald Hunter <donald.hunter@gmail.com>,
Jakub Kicinski <kuba@kernel.org>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>
X-Mailer: git-send-email 2.56.0
X-In-Reply-To: <20261025103409.3519874-1-houminxi@gmail.com>
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