🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #7179

[PATCH net-next v4 1/2] netlink: specs: add ovs_flow del and set operations

#7179
From: Minxi Hou
Date: Sun, 25 Oct 2026 10:34
113 lines
14515 bytes
The ovs_flow spec only described get and new, so a YNL client could
not delete or modify a flow. The kernel has had both commands since
the family was added: del flushes the data path when neither a key nor
a ufid is given, and set looks a flow up by key or ufid.

Name the attributes each command reads. new reads ufid-flags and probe
as well as the key, so both are in its request list. new, del and set
all need CAP_NET_ADMIN.

probe was binary in the spec while the kernel policy is NLA_FLAG. It
is a flag now, which changes how a YNL client encodes it: a false flag
is left out, where a binary attribute was sent empty.

The key attribute doc in this spec said a key is required for every
request except a dump. The kernel accepts a ufid with no key for get,
set and del. A new request needs a key, including one that finds an
existing flow and replaces its actions, and a set that replaces the
actions needs a key too. The doc in this spec says so now. The same
sentence in the uapi header is unchanged.

Signed-off-by: Minxi Hou <houminxi@gmail.com>
---
 Documentation/netlink/specs/ovs_flow.yaml | 46 ++++++++++++++++++++++-
 1 file changed, 44 insertions(+), 2 deletions(-)

diff --git a/Documentation/netlink/specs/ovs_flow.yaml b/Documentation/netlink/specs/ovs_flow.yaml
index 951837b72e1d..dd403cca4006 100644
--- a/Documentation/netlink/specs/ovs_flow.yaml
+++ b/Documentation/netlink/specs/ovs_flow.yaml
@@ -384,7 +384,11 @@ attribute-sets:
         nested-attributes: key-attrs
         doc: |
           Nested attributes specifying the flow key. Always present in
-          notifications. Required for all requests (except dumps).
+          notifications. A get, set or del may carry a ufid instead of a
+          key. A new request needs a key, including one that finds an
+          existing flow and replaces its actions. A set that replaces the
+          actions needs a key too. A dump reads neither the key nor the
+          ufid. A del that carries neither flushes the data path.
       -
         name: actions
         type: nest
@@ -438,7 +442,7 @@ attribute-sets:
           are exact match bits.
       -
         name: probe
-        type: binary
+        type: flag
         doc: |
           Flow operation is a feature probe, error logging should be suppressed.
       -
@@ -975,6 +979,7 @@ operations:
             - key
             - ufid
             - ufid-flags
+            - probe
         reply:
           attributes:
             - key
@@ -988,6 +993,7 @@ operations:
       doc: Create OVS flow configuration in a data path
       value: 1
       attribute-set: flow-attrs
+      flags: [uns-admin-perm]
       do:
         request:
           attributes:
@@ -995,6 +1001,42 @@ operations:
             - ufid
             - mask
             - actions
+            - ufid-flags
+            - probe
+    -
+      name: del
+      doc: |
+        Delete one flow, or every flow in the data path. A request with
+        neither a key nor a ufid flushes the data path.
+      value: 2
+      attribute-set: flow-attrs
+      flags: [uns-admin-perm]
+      do:
+        request:
+          attributes:
+            - key
+            - ufid
+            - ufid-flags
+            - probe
+    -
+      name: set
+      doc: |
+        Modify an existing flow. The kernel rejects the request with
+        -EINVAL when it carries neither a key nor a ufid. Replacing the
+        actions also needs a key: a ufid on its own is not enough.
+      value: 4
+      attribute-set: flow-attrs
+      flags: [uns-admin-perm]
+      do:
+        request:
+          attributes:
+            - key
+            - ufid
+            - mask
+            - actions
+            - ufid-flags
+            - clear
+            - probe
 
 mcast-groups:
   list:
-- 
2.56.0
Technical Details
Message-ID: <20261025103409.3519874-2-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-351527-linux-kernel-netdev=dewy.ru
References: <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-351527-linux-kernel-netdev=dewy.ru
From: houminxi@gmail.com (Minxi Hou)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net-next v4 1/2] netlink: specs: add ovs_flow del and set operations
Date: Sun, 25 Oct 2026 06:34:08 -0400
Organization: Usenet Network
Message-ID: <20261025103409.3519874-2-houminxi@gmail.com>
References: <20261025103409.3519874-1-houminxi@gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="989502"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:YCCIRIs43S3MOpKDMDW/YEymZ3U= sha256:XvCBL+YsL5yGpUhE1KM0INpJoHK9gIn9EhXV20vjyF4=
	sha1:8eyhBI+pJ6L1dP2jey8lWYoZPto= sha256:9IiMRCol6HnlZ2Ez/aoOTben+CW20phybF/nqzJ05vo=
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 A5254125B2F; Sun, 25 Oct 2026 13:34:58 +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 Nd-FboJsJwc6;
	Sun, 25 Oct 2026 13:34:55 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-351527-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 5F715125B2C; Sun, 25 Oct 2026 13:34:47 +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 797DB2C3E9; Sun, 25 Oct 2026 10:34:26 +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=1792924466;
	b=cnhxP62nslDf4/uV5hor4u4qbZtvg6V+Y9MwOX3Af8tf2CWK6uopUHTeu2zeuJcjHftZ
	 u7w61+8DgCdTvjgOEVoRUEeVYryK39D7aNxJrG1poBaBKPQWzz9IWW+bW43wdQoCwB3ZZ
	 mvSLngmbFoXMYnWcF2vJFvy35JoBM5FAzrrrdpHjoYcooTmAjomCDMEF0TnU4zzwxN9jM
	 lJqmkYnGNe+AcPTHj3m8on/9pKpK6V4LBQ44CgYdQWn0iaEc1FaBnQQje+gDTBXppSoBW
	 PvFjtUQPolDFKWKFFCzljqfllqcvgTWpEYNvNivpWcTcIujQqUG9YLWCTztGk3j1DXA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792924466;
	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=3U631olD5XGjdTK9Qq5LKDRpKK91k9qur+dWmWscRtU=;
	b=xIW98PzGF7LI31/tz5Lk7HrDXuWDKFzlxqYXz2nFaXz9uzSa7ImxiOJ6gQ6uotQVFpJh
	 USX8JRJ6joIE3BJafa89XqrhGhvsFIjqSMXAbWsNbMtMObj3Hfgo0SNo2kttem0Oy6arQ
	 V1nqhvVPZI9ftclMdPBfcoMLS7QIg2fzSTaNFeXGGr2u3szwdTs+gnBRfisALONYent+W
	 DOV3MLQz8KonJuI3mOe3UXDsQuhfZjHu60glRGHBziLyvbQH5+M8QpW3PpcUnR7knk7ig
	 yIX4QGHSC0oArtZQFxJRRGtnfV72B0tLeKtHXcW4cQpasegYuw/vNY8GN+Gv8jN4gNQ==
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=BOBHeAZs;
	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 51D08606A321;
	Sun, 25 Oct 2026 10:34:26 +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=BOBHeAZs
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.170
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792924465;
	b=DkRHUGTmEe9Ex8YMPYaLg2M9+u9Oc8lt30aMlMnig4cvfii1bJtinEPXbZA7NLffopxM
	 xs8+Nv9VC/JHhpBZRLZeOcOKZuEtDbAypQMVkGzsv2S6+J6/36qqMtHU/SmeQvTTmkp6z
	 R1cK/sO3MY1YbwE6w1lwb5i86PD8Kbp3wDE8vEYyFWKs3mXaMNA0HYpgarEaZ8yqA4iBX
	 9Molj5NRXoCkw9ZjDXYFztWowkOk7aFrVGT86+/4TVNceN/+ojO/D6yqky+YTHu1WHATO
	 gUReHQ440u8f7pBtYnHkogjC3wVFFpd8J56c2pvstZRznmakoZ2g2qjFOlZ5c/0vjig==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792924465;
	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=3U631olD5XGjdTK9Qq5LKDRpKK91k9qur+dWmWscRtU=;
	b=kvp/v3hkRXhCGLVonluKIdEODIMCqdph7LlkuuQgyyJ1vW1KAaNZjpCYhDIcHAa7a0qh
	 DSLzbEd7aZtMQQHwbRIgF5gAMqu08ZKxPyTpQTKtDzxH4QQFsrtCKqeEie+MkLlj2UGE3
	 0osipWv+g0eNaL4z5hKet+WJ5B9TWrj/P/9UTzDiyl/b46gK3h62WJBCM1CghNIbPoqtH
	 lOoBl4t4qsW4Y5koi6xG282pIOgwpXsYIZDzAeW0pt3Xq0GIJKkIGdDDrV3I2griHQbBD
	 gBvqMKRAYk0fQ4Idi2riT5hTP4XiuxwFcHKc48AzrAiLkWN5Mp27mUk03TEShAw+GWw==
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=BOBHeAZs;
	arc=none smtp.remote-ip=74.125.82.170
X-Received: from mail-dy1-f170.google.com (mail-dy1-f170.google.com [74.125.82.170])
	(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 182D1606A31B
	for <netdev@vger.kernel.org>; Sun, 25 Oct 2026 10:34:24 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 182D1606A31B
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-f170.google.com with SMTP id 5a478bee46e88-35f036b17easo5412534eec.1
        for <netdev@vger.kernel.org>; Sun, 25 Oct 2026 03:34:24 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20251104; t=1792924464; x=1793529264; 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=3U631olD5XGjdTK9Qq5LKDRpKK91k9qur+dWmWscRtU=;
        b=BOBHeAZsGadPDojaVWGwpuL3V2EJaYV4LDRPf7jwnsAk93wjkeWNflvjPXL02wijTR
         /2CmGmAMUWvAiuv0H5N4jEi75XfUvWZNiUJFqRi17MBeZIaw53lq8IU/6dAGVVoHhJJp
         862z6h8T20MUxDNrc5MyXURYrLXsd64gQiFKeO2L6zWBfCdTNgnJ5cDrDAEC16HjDeyB
         7Din3m5QxqVKM1poLk/OZ/zqU/GGxU1B7fv1+fRBei+Bogs9HjRxLd7uyIsDdY6fLIk7
         FpI9oteQ/XuAiiEz4K6Cs4eb1bz91K/0a9DAhxNi1Yg+5l7DrnEWb3wsD9hfJkry+fH6
         jNwQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1792924464; x=1793529264;
        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=3U631olD5XGjdTK9Qq5LKDRpKK91k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KqHYPZXLREtb7l/6FHlYkYYMnwRqmPS4qN1e4G6IAw==
X-Received: by 2002:a05:693c:894b:20b0:369:fe4c:b48f with SMTP id 5a478bee46e88-369fe4cbd94mr388039eec.0.1792924463993;
        Sun, 25 Oct 2026 03:34:23 -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.21
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Sun, 25 Oct 2026 03:34:23 -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