netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Donald Hunter <donald.hunter@gmail.com>
To: netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>
Cc: donald.hunter@redhat.com, Donald Hunter <donald.hunter@gmail.com>
Subject: [PATCH net-next v1 3/3] netlink: specs: add display hints to ovs_flow
Date: Fri, 23 Jun 2023 21:19:28 +0100	[thread overview]
Message-ID: <20230623201928.14275-4-donald.hunter@gmail.com> (raw)
In-Reply-To: <20230623201928.14275-1-donald.hunter@gmail.com>

Add display hints for mac, ipv4, ipv6, hex and uuid to the ovs_flow
schema.

Signed-off-by: Donald Hunter <donald.hunter@gmail.com>
---
 Documentation/netlink/specs/ovs_flow.yaml | 107 ++++++++++++++++++++++
 1 file changed, 107 insertions(+)

diff --git a/Documentation/netlink/specs/ovs_flow.yaml b/Documentation/netlink/specs/ovs_flow.yaml
index 1ecbcd117385..109ca1f57b6c 100644
--- a/Documentation/netlink/specs/ovs_flow.yaml
+++ b/Documentation/netlink/specs/ovs_flow.yaml
@@ -33,6 +33,20 @@ definitions:
         name: n-bytes
         type: u64
         doc: Number of matched bytes.
+  -
+    name: ovs-key-ethernet
+    type: struct
+    members:
+      -
+        name: eth-src
+        type: binary
+        len: 6
+        display-hint: mac
+      -
+        name: eth-dst
+        type: binary
+        len: 6
+        display-hint: mac
   -
     name: ovs-key-mpls
     type: struct
@@ -49,10 +63,12 @@ definitions:
         name: ipv4-src
         type: u32
         byte-order: big-endian
+        display-hint: ipv4
       -
         name: ipv4-dst
         type: u32
         byte-order: big-endian
+        display-hint: ipv4
       -
         name: ipv4-proto
         type: u8
@@ -66,6 +82,45 @@ definitions:
         name: ipv4-frag
         type: u8
         enum: ovs-frag-type
+  -
+    name: ovs-key-ipv6
+    type: struct
+    members:
+      -
+        name: ipv6-src
+        type: binary
+        len: 16
+        byte-order: big-endian
+        display-hint: ipv6
+      -
+        name: ipv6-dst
+        type: binary
+        len: 16
+        byte-order: big-endian
+        display-hint: ipv6
+      -
+        name: ipv6-label
+        type: u32
+        byte-order: big-endian
+      -
+        name: ipv6-proto
+        type: u8
+      -
+        name: ipv6-tclass
+        type: u8
+      -
+        name: ipv6-hlimit
+        type: u8
+      -
+        name: ipv6-frag
+        type: u8
+  -
+    name: ovs-key-ipv6-exthdrs
+    type: struct
+    members:
+      -
+        name: hdrs
+        type: u16
   -
     name: ovs-frag-type
     name-prefix: ovs-frag-type-
@@ -129,6 +184,51 @@ definitions:
       -
         name: icmp-code
         type: u8
+  -
+    name: ovs-key-arp
+    type: struct
+    members:
+      -
+        name: arp-sip
+        type: u32
+        byte-order: big-endian
+      -
+        name: arp-tip
+        type: u32
+        byte-order: big-endian
+      -
+        name: arp-op
+        type: u16
+        byte-order: big-endian
+      -
+        name: arp-sha
+        type: binary
+        len: 6
+        display-hint: mac
+      -
+        name: arp-tha
+        type: binary
+        len: 6
+        display-hint: mac
+  -
+    name: ovs-key-nd
+    type: struct
+    members:
+      -
+        name: nd_target
+        type: binary
+        len: 16
+        byte-order: big-endian
+      -
+        name: nd-sll
+        type: binary
+        len: 6
+        display-hint: mac
+      -
+        name: nd-tll
+        type: binary
+        len: 6
+        display-hint: mac
   -
     name: ovs-key-ct-tuple-ipv4
     type: struct
@@ -345,6 +445,7 @@ attribute-sets:
           value of the OVS_FLOW_ATTR_KEY attribute. Optional for all
           requests. Present in notifications if the flow was created with this
           attribute.
+        display-hint: uuid
       -
         name: ufid-flags
         type: u32
@@ -374,6 +475,7 @@ attribute-sets:
       -
         name: ethernet
         type: binary
+        struct: ovs-key-ethernet
         doc: struct ovs_key_ethernet
       -
         name: vlan
@@ -390,6 +492,7 @@ attribute-sets:
       -
         name: ipv6
         type: binary
+        struct: ovs-key-ipv6
         doc: struct ovs_key_ipv6
       -
         name: tcp
@@ -410,10 +513,12 @@ attribute-sets:
       -
         name: arp
         type: binary
+        struct: ovs-key-arp
         doc: struct ovs_key_arp
       -
         name: nd
         type: binary
+        struct: ovs-key-nd
         doc: struct ovs_key_nd
       -
         name: skb-mark
@@ -457,6 +562,7 @@ attribute-sets:
       -
         name: ct-labels
         type: binary
+        display-hint: hex
         doc: 16-octet connection tracking label
       -
         name: ct-orig-tuple-ipv4
@@ -486,6 +592,7 @@ attribute-sets:
       -
         name: ipv6-exthdrs
         type: binary
+        struct: ovs-key-ipv6-exthdrs
         doc: struct ovs_key_ipv6_exthdr
   -
     name: action-attrs
-- 
2.39.0


  parent reply	other threads:[~2023-06-23 20:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-23 20:19 [PATCH net-next v1 0/3] netlink: add display-hint to ynl Donald Hunter
2023-06-23 20:19 ` [PATCH net-next v1 1/3] netlink: specs: add display-hint to schema definitions Donald Hunter
2023-06-23 20:19 ` [PATCH net-next v1 2/3] tools: ynl: add display-hint support to ynl Donald Hunter
2023-06-23 20:19 ` Donald Hunter [this message]
2023-06-24 22:50 ` [PATCH net-next v1 0/3] netlink: add display-hint " 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=20230623201928.14275-4-donald.hunter@gmail.com \
    --to=donald.hunter@gmail.com \
    --cc=davem@davemloft.net \
    --cc=donald.hunter@redhat.com \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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).