netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/3] netlink: specs: prep legacy specs for C code gen
@ 2023-12-13 23:28 Jakub Kicinski
  2023-12-13 23:28 ` [PATCH net-next 1/3] netlink: specs: ovs: remove fixed header fields from attrs Jakub Kicinski
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Jakub Kicinski @ 2023-12-13 23:28 UTC (permalink / raw)
  To: davem; +Cc: netdev, edumazet, pabeni, donald.hunter, Jakub Kicinski

Minor adjustments to some specs to make them ready for C code gen.

Jakub Kicinski (3):
  netlink: specs: ovs: remove fixed header fields from attrs
  netlink: specs: ovs: correct enum names in specs
  netlink: specs: mptcp: rename the MPTCP path management(?) spec

 Documentation/netlink/specs/{mptcp.yaml => mptcp_pm.yaml} | 0
 Documentation/netlink/specs/ovs_datapath.yaml             | 3 +--
 Documentation/netlink/specs/ovs_flow.yaml                 | 7 ++++---
 Documentation/netlink/specs/ovs_vport.yaml                | 4 ----
 include/uapi/linux/mptcp_pm.h                             | 2 +-
 net/mptcp/mptcp_pm_gen.c                                  | 2 +-
 net/mptcp/mptcp_pm_gen.h                                  | 2 +-
 7 files changed, 8 insertions(+), 12 deletions(-)
 rename Documentation/netlink/specs/{mptcp.yaml => mptcp_pm.yaml} (100%)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH net-next 1/3] netlink: specs: ovs: remove fixed header fields from attrs
  2023-12-13 23:28 [PATCH net-next 0/3] netlink: specs: prep legacy specs for C code gen Jakub Kicinski
@ 2023-12-13 23:28 ` Jakub Kicinski
  2023-12-14  8:40   ` Donald Hunter
  2023-12-13 23:28 ` [PATCH net-next 2/3] netlink: specs: ovs: correct enum names in specs Jakub Kicinski
  2023-12-13 23:28 ` [PATCH net-next 3/3] netlink: specs: mptcp: rename the MPTCP path management(?) spec Jakub Kicinski
  2 siblings, 1 reply; 9+ messages in thread
From: Jakub Kicinski @ 2023-12-13 23:28 UTC (permalink / raw)
  To: davem; +Cc: netdev, edumazet, pabeni, donald.hunter, Jakub Kicinski

Op's "attributes" list is a workaround for families with a single
attr set. We don't want to render a single huge request structure,
the same for each op since we know that most ops accept only a small
set of attributes. "Attributes" list lets us narrow down the attributes
to what op acctually pays attention to.

It doesn't make sense to put names of fixed headers in there.
They are not "attributes" and we can't really narrow down the struct
members.

Remove the fixed header fields from attrs for ovs families
in preparation for C codegen support.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
 Documentation/netlink/specs/ovs_datapath.yaml | 2 --
 Documentation/netlink/specs/ovs_flow.yaml     | 3 ---
 Documentation/netlink/specs/ovs_vport.yaml    | 4 ----
 3 files changed, 9 deletions(-)

diff --git a/Documentation/netlink/specs/ovs_datapath.yaml b/Documentation/netlink/specs/ovs_datapath.yaml
index f709c26c3e92..067c54a52d7a 100644
--- a/Documentation/netlink/specs/ovs_datapath.yaml
+++ b/Documentation/netlink/specs/ovs_datapath.yaml
@@ -142,7 +142,6 @@ uapi-header: linux/openvswitch.h
       do:
         request:
           attributes:
-            - dp-ifindex
             - name
             - upcall-pid
             - user-features
@@ -154,7 +153,6 @@ uapi-header: linux/openvswitch.h
       do:
         request:
           attributes:
-            - dp-ifindex
             - name
 
 mcast-groups:
diff --git a/Documentation/netlink/specs/ovs_flow.yaml b/Documentation/netlink/specs/ovs_flow.yaml
index 109ca1f57b6c..29315f3538fd 100644
--- a/Documentation/netlink/specs/ovs_flow.yaml
+++ b/Documentation/netlink/specs/ovs_flow.yaml
@@ -947,13 +947,11 @@ uapi-header: linux/openvswitch.h
       do: &flow-get-op
         request:
           attributes:
-            - dp-ifindex
             - key
             - ufid
             - ufid-flags
         reply:
           attributes:
-            - dp-ifindex
             - key
             - ufid
             - mask
@@ -968,7 +966,6 @@ uapi-header: linux/openvswitch.h
       do:
         request:
           attributes:
-            - dp-ifindex
             - key
             - ufid
             - mask
diff --git a/Documentation/netlink/specs/ovs_vport.yaml b/Documentation/netlink/specs/ovs_vport.yaml
index f65ce62cd60d..86ba9ac2a521 100644
--- a/Documentation/netlink/specs/ovs_vport.yaml
+++ b/Documentation/netlink/specs/ovs_vport.yaml
@@ -135,7 +135,6 @@ uapi-header: linux/openvswitch.h
             - name
             - type
             - upcall-pid
-            - dp-ifindex
             - ifindex
             - options
     -
@@ -146,7 +145,6 @@ uapi-header: linux/openvswitch.h
       do:
         request:
           attributes:
-            - dp-ifindex
             - port-no
             - type
             - name
@@ -158,11 +156,9 @@ uapi-header: linux/openvswitch.h
       do: &vport-get-op
         request:
           attributes:
-            - dp-ifindex
             - name
         reply: &dev-all
           attributes:
-            - dp-ifindex
             - port-no
             - type
             - name
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH net-next 2/3] netlink: specs: ovs: correct enum names in specs
  2023-12-13 23:28 [PATCH net-next 0/3] netlink: specs: prep legacy specs for C code gen Jakub Kicinski
  2023-12-13 23:28 ` [PATCH net-next 1/3] netlink: specs: ovs: remove fixed header fields from attrs Jakub Kicinski
@ 2023-12-13 23:28 ` Jakub Kicinski
  2023-12-14  8:45   ` Donald Hunter
  2023-12-13 23:28 ` [PATCH net-next 3/3] netlink: specs: mptcp: rename the MPTCP path management(?) spec Jakub Kicinski
  2 siblings, 1 reply; 9+ messages in thread
From: Jakub Kicinski @ 2023-12-13 23:28 UTC (permalink / raw)
  To: davem; +Cc: netdev, edumazet, pabeni, donald.hunter, Jakub Kicinski

Align the enum-names of OVS with what's actually in the uAPI.
Either correct the names, or mark the enum as empty because
the values are in fact #defines.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
 Documentation/netlink/specs/ovs_datapath.yaml | 1 +
 Documentation/netlink/specs/ovs_flow.yaml     | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/Documentation/netlink/specs/ovs_datapath.yaml b/Documentation/netlink/specs/ovs_datapath.yaml
index 067c54a52d7a..edc8c95ca6f5 100644
--- a/Documentation/netlink/specs/ovs_datapath.yaml
+++ b/Documentation/netlink/specs/ovs_datapath.yaml
@@ -20,6 +20,7 @@ uapi-header: linux/openvswitch.h
     name: user-features
     type: flags
     name-prefix: ovs-dp-f-
+    enum-name:
     entries:
       -
         name: unaligned
diff --git a/Documentation/netlink/specs/ovs_flow.yaml b/Documentation/netlink/specs/ovs_flow.yaml
index 29315f3538fd..4fdfc6b5cae9 100644
--- a/Documentation/netlink/specs/ovs_flow.yaml
+++ b/Documentation/netlink/specs/ovs_flow.yaml
@@ -124,6 +124,7 @@ uapi-header: linux/openvswitch.h
   -
     name: ovs-frag-type
     name-prefix: ovs-frag-type-
+    enum-name: ovs-frag-type
     type: enum
     entries:
       -
@@ -269,6 +270,7 @@ uapi-header: linux/openvswitch.h
   -
     name: ovs-ufid-flags
     name-prefix: ovs-ufid-f-
+    enum-name:
     type: flags
     entries:
       - omit-key
@@ -288,6 +290,7 @@ uapi-header: linux/openvswitch.h
         doc: Basis used for computing hash.
   -
     name: ovs-hash-alg
+    enum-name: ovs-hash-alg
     type: enum
     doc: |
       Data path hash algorithm for computing Datapath hash. The algorithm type only specifies
@@ -339,6 +342,7 @@ uapi-header: linux/openvswitch.h
           MPLS tunnel attributes.
   -
     name: ct-state-flags
+    enum-name:
     type: flags
     name-prefix: ovs-cs-f-
     entries:
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH net-next 3/3] netlink: specs: mptcp: rename the MPTCP path management(?) spec
  2023-12-13 23:28 [PATCH net-next 0/3] netlink: specs: prep legacy specs for C code gen Jakub Kicinski
  2023-12-13 23:28 ` [PATCH net-next 1/3] netlink: specs: ovs: remove fixed header fields from attrs Jakub Kicinski
  2023-12-13 23:28 ` [PATCH net-next 2/3] netlink: specs: ovs: correct enum names in specs Jakub Kicinski
@ 2023-12-13 23:28 ` Jakub Kicinski
  2023-12-13 23:38   ` Mat Martineau
                     ` (2 more replies)
  2 siblings, 3 replies; 9+ messages in thread
From: Jakub Kicinski @ 2023-12-13 23:28 UTC (permalink / raw)
  To: davem
  Cc: netdev, edumazet, pabeni, donald.hunter, Jakub Kicinski, matttbe,
	martineau, dcaratti, mptcp

We assume in handful of places that the name of the spec is
the same as the name of the family. We could fix that but
it seems like a fair assumption to make. Rename the MPTCP
spec instead.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: matttbe@kernel.org
CC: martineau@kernel.org
CC: dcaratti@redhat.com
CC: mptcp@lists.linux.dev
---
 Documentation/netlink/specs/{mptcp.yaml => mptcp_pm.yaml} | 0
 include/uapi/linux/mptcp_pm.h                             | 2 +-
 net/mptcp/mptcp_pm_gen.c                                  | 2 +-
 net/mptcp/mptcp_pm_gen.h                                  | 2 +-
 4 files changed, 3 insertions(+), 3 deletions(-)
 rename Documentation/netlink/specs/{mptcp.yaml => mptcp_pm.yaml} (100%)

diff --git a/Documentation/netlink/specs/mptcp.yaml b/Documentation/netlink/specs/mptcp_pm.yaml
similarity index 100%
rename from Documentation/netlink/specs/mptcp.yaml
rename to Documentation/netlink/specs/mptcp_pm.yaml
diff --git a/include/uapi/linux/mptcp_pm.h b/include/uapi/linux/mptcp_pm.h
index b5d11aece408..50589e5dd6a3 100644
--- a/include/uapi/linux/mptcp_pm.h
+++ b/include/uapi/linux/mptcp_pm.h
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
 /* Do not edit directly, auto-generated from: */
-/*	Documentation/netlink/specs/mptcp.yaml */
+/*	Documentation/netlink/specs/mptcp_pm.yaml */
 /* YNL-GEN uapi header */
 
 #ifndef _UAPI_LINUX_MPTCP_PM_H
diff --git a/net/mptcp/mptcp_pm_gen.c b/net/mptcp/mptcp_pm_gen.c
index a2325e70ddab..670da7822e6c 100644
--- a/net/mptcp/mptcp_pm_gen.c
+++ b/net/mptcp/mptcp_pm_gen.c
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
 /* Do not edit directly, auto-generated from: */
-/*	Documentation/netlink/specs/mptcp.yaml */
+/*	Documentation/netlink/specs/mptcp_pm.yaml */
 /* YNL-GEN kernel source */
 
 #include <net/netlink.h>
diff --git a/net/mptcp/mptcp_pm_gen.h b/net/mptcp/mptcp_pm_gen.h
index 10579d184587..ac9fc7225b6a 100644
--- a/net/mptcp/mptcp_pm_gen.h
+++ b/net/mptcp/mptcp_pm_gen.h
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
 /* Do not edit directly, auto-generated from: */
-/*	Documentation/netlink/specs/mptcp.yaml */
+/*	Documentation/netlink/specs/mptcp_pm.yaml */
 /* YNL-GEN kernel header */
 
 #ifndef _LINUX_MPTCP_PM_GEN_H
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH net-next 3/3] netlink: specs: mptcp: rename the MPTCP path management(?) spec
  2023-12-13 23:28 ` [PATCH net-next 3/3] netlink: specs: mptcp: rename the MPTCP path management(?) spec Jakub Kicinski
@ 2023-12-13 23:38   ` Mat Martineau
  2023-12-14  8:42   ` Donald Hunter
  2023-12-14 17:24   ` kernel test robot
  2 siblings, 0 replies; 9+ messages in thread
From: Mat Martineau @ 2023-12-13 23:38 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: davem, netdev, edumazet, pabeni, donald.hunter, matttbe, dcaratti,
	mptcp

On Wed, 13 Dec 2023, Jakub Kicinski wrote:

> We assume in handful of places that the name of the spec is
> the same as the name of the family. We could fix that but
> it seems like a fair assumption to make. Rename the MPTCP
> spec instead.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> CC: matttbe@kernel.org
> CC: martineau@kernel.org
> CC: dcaratti@redhat.com
> CC: mptcp@lists.linux.dev
> ---
> Documentation/netlink/specs/{mptcp.yaml => mptcp_pm.yaml} | 0
> include/uapi/linux/mptcp_pm.h                             | 2 +-
> net/mptcp/mptcp_pm_gen.c                                  | 2 +-
> net/mptcp/mptcp_pm_gen.h                                  | 2 +-
> 4 files changed, 3 insertions(+), 3 deletions(-)
> rename Documentation/netlink/specs/{mptcp.yaml => mptcp_pm.yaml} (100%)
>

Hi Jakub -

The renaming here is fine. "path management" is the right expansion of 
"pm" in this context, so you can remove the "(?)" from the summary line.


Reviewed-by: Mat Martineau <martineau@kernel.org>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net-next 1/3] netlink: specs: ovs: remove fixed header fields from attrs
  2023-12-13 23:28 ` [PATCH net-next 1/3] netlink: specs: ovs: remove fixed header fields from attrs Jakub Kicinski
@ 2023-12-14  8:40   ` Donald Hunter
  0 siblings, 0 replies; 9+ messages in thread
From: Donald Hunter @ 2023-12-14  8:40 UTC (permalink / raw)
  To: Jakub Kicinski; +Cc: davem, netdev, edumazet, pabeni

Jakub Kicinski <kuba@kernel.org> writes:

> Op's "attributes" list is a workaround for families with a single
> attr set. We don't want to render a single huge request structure,
> the same for each op since we know that most ops accept only a small
> set of attributes. "Attributes" list lets us narrow down the attributes
> to what op acctually pays attention to.
>
> It doesn't make sense to put names of fixed headers in there.
> They are not "attributes" and we can't really narrow down the struct
> members.
>
> Remove the fixed header fields from attrs for ovs families
> in preparation for C codegen support.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Reviewed-by: Donald Hunter <donald.hunter@gmail.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net-next 3/3] netlink: specs: mptcp: rename the MPTCP path management(?) spec
  2023-12-13 23:28 ` [PATCH net-next 3/3] netlink: specs: mptcp: rename the MPTCP path management(?) spec Jakub Kicinski
  2023-12-13 23:38   ` Mat Martineau
@ 2023-12-14  8:42   ` Donald Hunter
  2023-12-14 17:24   ` kernel test robot
  2 siblings, 0 replies; 9+ messages in thread
From: Donald Hunter @ 2023-12-14  8:42 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: davem, netdev, edumazet, pabeni, matttbe, martineau, dcaratti,
	mptcp

Jakub Kicinski <kuba@kernel.org> writes:

> We assume in handful of places that the name of the spec is
> the same as the name of the family. We could fix that but
> it seems like a fair assumption to make. Rename the MPTCP
> spec instead.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Reviewed-by: Donald Hunter <donald.hunter@gmail.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net-next 2/3] netlink: specs: ovs: correct enum names in specs
  2023-12-13 23:28 ` [PATCH net-next 2/3] netlink: specs: ovs: correct enum names in specs Jakub Kicinski
@ 2023-12-14  8:45   ` Donald Hunter
  0 siblings, 0 replies; 9+ messages in thread
From: Donald Hunter @ 2023-12-14  8:45 UTC (permalink / raw)
  To: Jakub Kicinski; +Cc: davem, netdev, edumazet, pabeni

Jakub Kicinski <kuba@kernel.org> writes:

> Align the enum-names of OVS with what's actually in the uAPI.
> Either correct the names, or mark the enum as empty because
> the values are in fact #defines.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Reviewed-by: Donald Hunter <donald.hunter@gmail.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net-next 3/3] netlink: specs: mptcp: rename the MPTCP path management(?) spec
  2023-12-13 23:28 ` [PATCH net-next 3/3] netlink: specs: mptcp: rename the MPTCP path management(?) spec Jakub Kicinski
  2023-12-13 23:38   ` Mat Martineau
  2023-12-14  8:42   ` Donald Hunter
@ 2023-12-14 17:24   ` kernel test robot
  2 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2023-12-14 17:24 UTC (permalink / raw)
  To: Jakub Kicinski, davem
  Cc: oe-kbuild-all, netdev, edumazet, pabeni, donald.hunter,
	Jakub Kicinski, matttbe, martineau, dcaratti, mptcp

Hi Jakub,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Jakub-Kicinski/netlink-specs-ovs-remove-fixed-header-fields-from-attrs/20231214-073118
base:   net-next/main
patch link:    https://lore.kernel.org/r/20231213232822.2950853-4-kuba%40kernel.org
patch subject: [PATCH net-next 3/3] netlink: specs: mptcp: rename the MPTCP path management(?) spec
reproduce: (https://download.01.org/0day-ci/archive/20231215/202312150140.ST22T64E-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312150140.ST22T64E-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> Warning: MAINTAINERS references a file that doesn't exist: Documentation/netlink/specs/mptcp.yaml

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-12-14 17:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-13 23:28 [PATCH net-next 0/3] netlink: specs: prep legacy specs for C code gen Jakub Kicinski
2023-12-13 23:28 ` [PATCH net-next 1/3] netlink: specs: ovs: remove fixed header fields from attrs Jakub Kicinski
2023-12-14  8:40   ` Donald Hunter
2023-12-13 23:28 ` [PATCH net-next 2/3] netlink: specs: ovs: correct enum names in specs Jakub Kicinski
2023-12-14  8:45   ` Donald Hunter
2023-12-13 23:28 ` [PATCH net-next 3/3] netlink: specs: mptcp: rename the MPTCP path management(?) spec Jakub Kicinski
2023-12-13 23:38   ` Mat Martineau
2023-12-14  8:42   ` Donald Hunter
2023-12-14 17:24   ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).