netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
	sdf@google.com, Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH net-next 08/12] netlink: specs: ethtool: untangle UDP tunnels and cable test a bit
Date: Fri,  9 Jun 2023 14:43:42 -0700	[thread overview]
Message-ID: <20230609214346.1605106-9-kuba@kernel.org> (raw)
In-Reply-To: <20230609214346.1605106-1-kuba@kernel.org>

UDP tunnel and cable test messages have a lot of nests,
which do not match the names of the enum entries in C uAPI.
Some of the structure / nesting also looks wrong.

Untangle this a little bit based on the names, comments and
educated guesses, I haven't actually tested the results.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
 Documentation/netlink/specs/ethtool.yaml | 82 ++++++++++++++++++------
 1 file changed, 62 insertions(+), 20 deletions(-)

diff --git a/Documentation/netlink/specs/ethtool.yaml b/Documentation/netlink/specs/ethtool.yaml
index d674731629c4..17b7b5028e2b 100644
--- a/Documentation/netlink/specs/ethtool.yaml
+++ b/Documentation/netlink/specs/ethtool.yaml
@@ -582,7 +582,7 @@ doc: Partial family for Ethtool Netlink.
         name: phc-index
         type: u32
   -
-    name: cable-test-ntf-nest-result
+    name: cable-result
     attributes:
       -
         name: pair
@@ -591,7 +591,7 @@ doc: Partial family for Ethtool Netlink.
         name: code
         type: u8
   -
-    name: cable-test-ntf-nest-fault-length
+    name: cable-fault-length
     attributes:
       -
         name: pair
@@ -600,18 +600,25 @@ doc: Partial family for Ethtool Netlink.
         name: cm
         type: u32
   -
-    name: cable-test-ntf-nest
+    name: cable-nest
     attributes:
       -
         name: result
         type: nest
-        nested-attributes: cable-test-ntf-nest-result
+        nested-attributes: cable-result
       -
         name: fault-length
         type: nest
-        nested-attributes: cable-test-ntf-nest-fault-length
+        nested-attributes: cable-fault-length
   -
     name: cable-test
+    attributes:
+      -
+        name: header
+        type: nest
+        nested-attributes: header
+  -
+    name: cable-test-ntf
     attributes:
       -
         name: header
@@ -623,7 +630,7 @@ doc: Partial family for Ethtool Netlink.
       -
         name: nest
         type: nest
-        nested-attributes: cable-test-ntf-nest
+        nested-attributes: cable-nest
   -
     name: cable-test-tdr-cfg
     attributes:
@@ -637,8 +644,22 @@ doc: Partial family for Ethtool Netlink.
         name: step
         type: u32
       -
-        name: pari
+        name: pair
         type: u8
+  -
+    name: cable-test-tdr-ntf
+    attributes:
+      -
+        name: header
+        type: nest
+        nested-attributes: header
+      -
+        name: status
+        type: u8
+      -
+        name: nest
+        type: nest
+        nested-attributes: cable-nest
   -
     name: cable-test-tdr
     attributes:
@@ -651,7 +672,7 @@ doc: Partial family for Ethtool Netlink.
         type: nest
         nested-attributes: cable-test-tdr-cfg
   -
-    name: tunnel-info-udp-entry
+    name: tunnel-udp-entry
     attributes:
       -
         name: port
@@ -662,7 +683,7 @@ doc: Partial family for Ethtool Netlink.
         type: u32
         enum: udp-tunnel-type
   -
-    name: tunnel-info-udp-table
+    name: tunnel-udp-table
     attributes:
       -
         name: size
@@ -672,9 +693,17 @@ doc: Partial family for Ethtool Netlink.
         type: nest
         nested-attributes: bitset
       -
-        name: udp-ports
+        name: entry
         type: nest
-        nested-attributes: tunnel-info-udp-entry
+        multi-attr: true
+        nested-attributes: tunnel-udp-entry
+  -
+    name: tunnel-udp
+    attributes:
+      -
+        name: table
+        type: nest
+        nested-attributes: tunnel-udp-table
   -
     name: tunnel-info
     attributes:
@@ -685,7 +714,7 @@ doc: Partial family for Ethtool Netlink.
       -
         name: udp-ports
         type: nest
-        nested-attributes: tunnel-info-udp-table
+        nested-attributes: tunnel-udp
   -
     name: fec-stat
     attributes:
@@ -1357,10 +1386,16 @@ doc: Partial family for Ethtool Netlink.
         request:
           attributes:
             - header
-        reply:
-          attributes:
-            - header
-            - cable-test-ntf-nest
+    -
+      name: cable-test-ntf
+      doc: Cable test notification.
+
+      attribute-set: cable-test-ntf
+
+      event:
+        attributes:
+          - header
+          - status
     -
       name: cable-test-tdr-act
       doc: Cable test TDR.
@@ -1371,10 +1406,17 @@ doc: Partial family for Ethtool Netlink.
         request:
           attributes:
             - header
-        reply:
-          attributes:
-            - header
-            - cable-test-tdr-cfg
+    -
+      name: cable-test-tdr-ntf
+      doc: Cable test TDR notification.
+
+      attribute-set: cable-test-tdr-ntf
+
+      event:
+        attributes:
+          - header
+          - status
+          - nest
     -
       name: tunnel-info-get
       doc: Get tsinfo params.
-- 
2.40.1


  parent reply	other threads:[~2023-06-09 21:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-09 21:43 [PATCH net-next 00/12] tools: ynl: generate code for the ethtool family Jakub Kicinski
2023-06-09 21:43 ` [PATCH net-next 01/12] tools: ynl-gen: support excluding tricky ops Jakub Kicinski
2023-06-09 21:43 ` [PATCH net-next 02/12] tools: ynl-gen: record extra args for regen Jakub Kicinski
2023-06-09 21:43 ` [PATCH net-next 03/12] netlink: specs: support setting prefix-name per attribute Jakub Kicinski
2023-06-09 21:43 ` [PATCH net-next 04/12] netlink: specs: ethtool: add C render hints Jakub Kicinski
2023-06-09 21:43 ` [PATCH net-next 05/12] tools: ynl-gen: don't generate enum types if unnamed Jakub Kicinski
2023-06-09 21:43 ` [PATCH net-next 06/12] tools: ynl-gen: resolve enum vs struct name conflicts Jakub Kicinski
2023-06-09 21:43 ` [PATCH net-next 07/12] netlink: specs: ethtool: add empty enum stringset Jakub Kicinski
2023-06-09 21:43 ` Jakub Kicinski [this message]
2023-06-09 21:43 ` [PATCH net-next 09/12] netlink: specs: ethtool: untangle stats-get Jakub Kicinski
2023-06-09 21:43 ` [PATCH net-next 10/12] netlink: specs: ethtool: mark pads as pads Jakub Kicinski
2023-06-09 21:43 ` [PATCH net-next 11/12] tools: ynl: generate code for the ethtool family Jakub Kicinski
2023-06-09 21:43 ` [PATCH net-next 12/12] tools: ynl: add sample for ethtool Jakub Kicinski
2023-06-09 22:12 ` [PATCH net-next 00/12] tools: ynl: generate code for the ethtool family Stanislav Fomichev
2023-06-12 10:10 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230609214346.1605106-9-kuba@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).