netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/2] netlink: specs: rt-link: decode ip6gre
@ 2025-06-03 13:53 Jakub Kicinski
  2025-06-03 13:53 ` [PATCH net 1/2] netlink: specs: rt-link: add missing byte-order properties Jakub Kicinski
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jakub Kicinski @ 2025-06-03 13:53 UTC (permalink / raw)
  To: davem
  Cc: netdev, edumazet, pabeni, andrew+netdev, horms, donald.hunter,
	sdf, willemb, Jakub Kicinski

Adding GRE tunnels to the .config for driver tests caused
some unhappiness in YNL, as it can't decode all the link
attrs on the system. Add ip6gre support to fix the tests.
This is similar to commit 6ffdbb93a59c ("netlink: specs:
rt_link: decode ip6tnl, vti and vti6 link attrs").

Jakub Kicinski (2):
  netlink: specs: rt-link: add missing byte-order properties
  netlink: specs: rt-link: decode ip6gre

 Documentation/netlink/specs/rt-link.yaml | 68 +++++++++++++++++++++++-
 1 file changed, 67 insertions(+), 1 deletion(-)

-- 
2.49.0


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

* [PATCH net 1/2] netlink: specs: rt-link: add missing byte-order properties
  2025-06-03 13:53 [PATCH net 0/2] netlink: specs: rt-link: decode ip6gre Jakub Kicinski
@ 2025-06-03 13:53 ` Jakub Kicinski
  2025-06-04  8:56   ` Donald Hunter
  2025-06-03 13:53 ` [PATCH net 2/2] netlink: specs: rt-link: decode ip6gre Jakub Kicinski
  2025-06-05 11:00 ` [PATCH net 0/2] " patchwork-bot+netdevbpf
  2 siblings, 1 reply; 6+ messages in thread
From: Jakub Kicinski @ 2025-06-03 13:53 UTC (permalink / raw)
  To: davem
  Cc: netdev, edumazet, pabeni, andrew+netdev, horms, donald.hunter,
	sdf, willemb, Jakub Kicinski

A number of fields in the ip tunnels are lacking the big-endian
designation. I suspect this is not intentional, as decoding
the ports with the right endian seems objectively beneficial.

Fixes: 6ffdbb93a59c ("netlink: specs: rt_link: decode ip6tnl, vti and vti6 link attrs")
Fixes: 077b6022d24b ("doc/netlink/specs: Add sub-message type to rt_link family")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
 Documentation/netlink/specs/rt-link.yaml | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/Documentation/netlink/specs/rt-link.yaml b/Documentation/netlink/specs/rt-link.yaml
index 5ec3d35b7a38..6521125162e6 100644
--- a/Documentation/netlink/specs/rt-link.yaml
+++ b/Documentation/netlink/specs/rt-link.yaml
@@ -1685,15 +1685,19 @@ protonum: 0
       -
         name: iflags
         type: u16
+        byte-order: big-endian
       -
         name: oflags
         type: u16
+        byte-order: big-endian
       -
         name: ikey
         type: u32
+        byte-order: big-endian
       -
         name: okey
         type: u32
+        byte-order: big-endian
       -
         name: local
         type: binary
@@ -1717,6 +1721,7 @@ protonum: 0
       -
         name: flowinfo
         type: u32
+        byte-order: big-endian
       -
         name: flags
         type: u32
@@ -1729,9 +1734,11 @@ protonum: 0
       -
         name: encap-sport
         type: u16
+        byte-order: big-endian
       -
         name: encap-dport
         type: u16
+        byte-order: big-endian
       -
         name: collect-metadata
         type: flag
@@ -1764,9 +1771,11 @@ protonum: 0
       -
         name: ikey
         type: u32
+        byte-order: big-endian
       -
         name: okey
         type: u32
+        byte-order: big-endian
       -
         name: local
         type: binary
@@ -1816,6 +1825,7 @@ protonum: 0
       -
         name: port
         type: u16
+        byte-order: big-endian
       -
         name: collect-metadata
         type: flag
@@ -1835,6 +1845,7 @@ protonum: 0
       -
         name: label
         type: u32
+        byte-order: big-endian
       -
         name: ttl-inherit
         type: u8
@@ -1875,9 +1886,11 @@ protonum: 0
       -
         name: flowinfo
         type: u32
+        byte-order: big-endian
       -
         name: flags
         type: u16
+        byte-order: big-endian
       -
         name: proto
         type: u8
@@ -1907,9 +1920,11 @@ protonum: 0
       -
         name: encap-sport
         type: u16
+        byte-order: big-endian
       -
         name: encap-dport
         type: u16
+        byte-order: big-endian
       -
         name: collect-metadata
         type: flag
-- 
2.49.0


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

* [PATCH net 2/2] netlink: specs: rt-link: decode ip6gre
  2025-06-03 13:53 [PATCH net 0/2] netlink: specs: rt-link: decode ip6gre Jakub Kicinski
  2025-06-03 13:53 ` [PATCH net 1/2] netlink: specs: rt-link: add missing byte-order properties Jakub Kicinski
@ 2025-06-03 13:53 ` Jakub Kicinski
  2025-06-04  8:58   ` Donald Hunter
  2025-06-05 11:00 ` [PATCH net 0/2] " patchwork-bot+netdevbpf
  2 siblings, 1 reply; 6+ messages in thread
From: Jakub Kicinski @ 2025-06-03 13:53 UTC (permalink / raw)
  To: davem
  Cc: netdev, edumazet, pabeni, andrew+netdev, horms, donald.hunter,
	sdf, willemb, Jakub Kicinski

Driver tests now require GRE tunnels, while we don't configure
them with YNL, YNL will complain when it sees link types it
doesn't recognize. Teach it decoding ip6gre tunnels. The attrs
are largely the same as IPv4 GRE.

Correct the type of encap-limit, but note that this attr is
only used in ip6gre, so the mistake didn't matter until now.

Fixes: 0d0f4174f6c8 ("selftests: drv-net: add a simple TSO test")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
 Documentation/netlink/specs/rt-link.yaml | 53 +++++++++++++++++++++++-
 1 file changed, 52 insertions(+), 1 deletion(-)

diff --git a/Documentation/netlink/specs/rt-link.yaml b/Documentation/netlink/specs/rt-link.yaml
index 6521125162e6..b41b31eebcae 100644
--- a/Documentation/netlink/specs/rt-link.yaml
+++ b/Documentation/netlink/specs/rt-link.yaml
@@ -1717,7 +1717,7 @@ protonum: 0
         type: u8
       -
         name: encap-limit
-        type: u32
+        type: u8
       -
         name: flowinfo
         type: u32
@@ -1760,6 +1760,54 @@ protonum: 0
       -
         name: erspan-hwid
         type: u16
+  -
+    name: linkinfo-gre6-attrs
+    subset-of: linkinfo-gre-attrs
+    attributes:
+      -
+        name: link
+      -
+        name: iflags
+      -
+        name: oflags
+      -
+        name: ikey
+      -
+        name: okey
+      -
+        name: local
+        display-hint: ipv6
+      -
+        name: remote
+        display-hint: ipv6
+      -
+        name: ttl
+      -
+        name: encap-limit
+      -
+        name: flowinfo
+      -
+        name: flags
+      -
+        name: encap-type
+      -
+        name: encap-flags
+      -
+        name: encap-sport
+      -
+        name: encap-dport
+      -
+        name: collect-metadata
+      -
+        name: fwmark
+      -
+        name: erspan-index
+      -
+        name: erspan-ver
+      -
+        name: erspan-dir
+      -
+        name: erspan-hwid
   -
     name: linkinfo-vti-attrs
     name-prefix: ifla-vti-
@@ -2239,6 +2287,9 @@ protonum: 0
       -
         value: gretap
         attribute-set: linkinfo-gre-attrs
+      -
+        value: ip6gre
+        attribute-set: linkinfo-gre6-attrs
       -
         value: geneve
         attribute-set: linkinfo-geneve-attrs
-- 
2.49.0


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

* Re: [PATCH net 1/2] netlink: specs: rt-link: add missing byte-order properties
  2025-06-03 13:53 ` [PATCH net 1/2] netlink: specs: rt-link: add missing byte-order properties Jakub Kicinski
@ 2025-06-04  8:56   ` Donald Hunter
  0 siblings, 0 replies; 6+ messages in thread
From: Donald Hunter @ 2025-06-04  8:56 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms, sdf,
	willemb

Jakub Kicinski <kuba@kernel.org> writes:

> A number of fields in the ip tunnels are lacking the big-endian
> designation. I suspect this is not intentional, as decoding
> the ports with the right endian seems objectively beneficial.
>
> Fixes: 6ffdbb93a59c ("netlink: specs: rt_link: decode ip6tnl, vti and vti6 link attrs")
> Fixes: 077b6022d24b ("doc/netlink/specs: Add sub-message type to rt_link family")
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>

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

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

* Re: [PATCH net 2/2] netlink: specs: rt-link: decode ip6gre
  2025-06-03 13:53 ` [PATCH net 2/2] netlink: specs: rt-link: decode ip6gre Jakub Kicinski
@ 2025-06-04  8:58   ` Donald Hunter
  0 siblings, 0 replies; 6+ messages in thread
From: Donald Hunter @ 2025-06-04  8:58 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms, sdf,
	willemb

Jakub Kicinski <kuba@kernel.org> writes:

> Driver tests now require GRE tunnels, while we don't configure
> them with YNL, YNL will complain when it sees link types it
> doesn't recognize. Teach it decoding ip6gre tunnels. The attrs
> are largely the same as IPv4 GRE.
>
> Correct the type of encap-limit, but note that this attr is
> only used in ip6gre, so the mistake didn't matter until now.
>
> Fixes: 0d0f4174f6c8 ("selftests: drv-net: add a simple TSO test")
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>

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

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

* Re: [PATCH net 0/2] netlink: specs: rt-link: decode ip6gre
  2025-06-03 13:53 [PATCH net 0/2] netlink: specs: rt-link: decode ip6gre Jakub Kicinski
  2025-06-03 13:53 ` [PATCH net 1/2] netlink: specs: rt-link: add missing byte-order properties Jakub Kicinski
  2025-06-03 13:53 ` [PATCH net 2/2] netlink: specs: rt-link: decode ip6gre Jakub Kicinski
@ 2025-06-05 11:00 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-06-05 11:00 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms,
	donald.hunter, sdf, willemb

Hello:

This series was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Tue,  3 Jun 2025 06:53:55 -0700 you wrote:
> Adding GRE tunnels to the .config for driver tests caused
> some unhappiness in YNL, as it can't decode all the link
> attrs on the system. Add ip6gre support to fix the tests.
> This is similar to commit 6ffdbb93a59c ("netlink: specs:
> rt_link: decode ip6tnl, vti and vti6 link attrs").
> 
> Jakub Kicinski (2):
>   netlink: specs: rt-link: add missing byte-order properties
>   netlink: specs: rt-link: decode ip6gre
> 
> [...]

Here is the summary with links:
  - [net,1/2] netlink: specs: rt-link: add missing byte-order properties
    https://git.kernel.org/netdev/net/c/de92258e3b22
  - [net,2/2] netlink: specs: rt-link: decode ip6gre
    https://git.kernel.org/netdev/net/c/8af7a919c52f

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2025-06-05 11:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-03 13:53 [PATCH net 0/2] netlink: specs: rt-link: decode ip6gre Jakub Kicinski
2025-06-03 13:53 ` [PATCH net 1/2] netlink: specs: rt-link: add missing byte-order properties Jakub Kicinski
2025-06-04  8:56   ` Donald Hunter
2025-06-03 13:53 ` [PATCH net 2/2] netlink: specs: rt-link: decode ip6gre Jakub Kicinski
2025-06-04  8:58   ` Donald Hunter
2025-06-05 11:00 ` [PATCH net 0/2] " patchwork-bot+netdevbpf

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).