Skip to content

Commit 6ffdbb9

Browse files
committed
netlink: specs: rt_link: decode ip6tnl, vti and vti6 link attrs
Some of our tests load vti and ip6tnl so not being able to decode the link attrs gets in the way of using Python YNL for testing. Decode link attributes for ip6tnl, vti and vti6. ip6tnl uses IFLA_IPTUN_FLAGS as u32, while ipv4 and sit expect a u16 attribute, so we have a (first?) subset type override... Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://patch.msgid.link/20250107022820.2087101-4-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 7aae650 commit 6ffdbb9

File tree

1 file changed

+87
-0
lines changed

1 file changed

+87
-0
lines changed

Documentation/netlink/specs/rt_link.yaml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1825,6 +1825,48 @@ attribute-sets:
18251825
-
18261826
name: erspan-hwid
18271827
type: u16
1828+
-
1829+
name: linkinfo-vti-attrs
1830+
name-prefix: ifla-vti-
1831+
attributes:
1832+
-
1833+
name: link
1834+
type: u32
1835+
-
1836+
name: ikey
1837+
type: u32
1838+
-
1839+
name: okey
1840+
type: u32
1841+
-
1842+
name: local
1843+
type: binary
1844+
display-hint: ipv4
1845+
-
1846+
name: remote
1847+
type: binary
1848+
display-hint: ipv4
1849+
-
1850+
name: fwmark
1851+
type: u32
1852+
-
1853+
name: linkinfo-vti6-attrs
1854+
subset-of: linkinfo-vti-attrs
1855+
attributes:
1856+
-
1857+
name: link
1858+
-
1859+
name: ikey
1860+
-
1861+
name: okey
1862+
-
1863+
name: local
1864+
display-hint: ipv6
1865+
-
1866+
name: remote
1867+
display-hint: ipv6
1868+
-
1869+
name: fwmark
18281870
-
18291871
name: linkinfo-geneve-attrs
18301872
name-prefix: ifla-geneve-
@@ -1941,6 +1983,42 @@ attribute-sets:
19411983
-
19421984
name: fwmark
19431985
type: u32
1986+
-
1987+
name: linkinfo-ip6tnl-attrs
1988+
subset-of: linkinfo-iptun-attrs
1989+
attributes:
1990+
-
1991+
name: link
1992+
-
1993+
name: local
1994+
display-hint: ipv6
1995+
-
1996+
name: remote
1997+
display-hint: ipv6
1998+
-
1999+
name: ttl
2000+
-
2001+
name: encap-limit
2002+
-
2003+
name: flowinfo
2004+
-
2005+
name: flags
2006+
# ip6tnl unlike ipip and sit has 32b flags
2007+
type: u32
2008+
-
2009+
name: proto
2010+
-
2011+
name: encap-type
2012+
-
2013+
name: encap-flags
2014+
-
2015+
name: encap-sport
2016+
-
2017+
name: encap-dport
2018+
-
2019+
name: collect-metadata
2020+
-
2021+
name: fwmark
19442022
-
19452023
name: linkinfo-tun-attrs
19462024
name-prefix: ifla-tun-
@@ -2201,6 +2279,9 @@ sub-messages:
22012279
-
22022280
value: ipip
22032281
attribute-set: linkinfo-iptun-attrs
2282+
-
2283+
value: ip6tnl
2284+
attribute-set: linkinfo-ip6tnl-attrs
22042285
-
22052286
value: sit
22062287
attribute-set: linkinfo-iptun-attrs
@@ -2213,6 +2294,12 @@ sub-messages:
22132294
-
22142295
value: vrf
22152296
attribute-set: linkinfo-vrf-attrs
2297+
-
2298+
value: vti
2299+
attribute-set: linkinfo-vti-attrs
2300+
-
2301+
value: vti6
2302+
attribute-set: linkinfo-vti6-attrs
22162303
-
22172304
value: netkit
22182305
attribute-set: linkinfo-netkit-attrs

0 commit comments

Comments
 (0)