[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aSfGJpUFz9A_xFtz@fedora>
Date: Thu, 27 Nov 2025 03:31:50 +0000
From: Hangbin Liu <liuhangbin@...il.com>
To: Asbjørn Sloth Tønnesen <ast@...erby.net>
Cc: netdev@...r.kernel.org, Donald Hunter <donald.hunter@...il.com>,
Jakub Kicinski <kuba@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>,
"Matthieu Baerts (NGI0)" <matttbe@...nel.org>,
Stanislav Fomichev <sdf@...ichev.me>,
Jacob Keller <jacob.e.keller@...el.com>,
Yuyang Huang <yuyanghuang@...gle.com>,
Daniel Borkmann <daniel@...earbox.net>
Subject: Re: [PATCH net-next] netlink: specs: add big-endian byte-order for
u32 IPv4 addresses
On Wed, Nov 26, 2025 at 01:32:22PM +0000, Asbjørn Sloth Tønnesen wrote:
> I prefer exact-len over min-len. The current tally is:
>
> $ git grep 'len.*: 16' Documentation/netlink/specs/ | cut -d: -f2- | sed -e 's/^ *//' | sort | uniq -c
> 7 exact-len: 16
> 5 len: 16
> 6 min-len: 16
> (assuming that only IPv6 has a length of 16)
>
> "len: 16" as used in ovs_flow's ipv6-src and ipv6-dst only works because they
> are struct members, not attributes.
Talking about the ovs, it's looks like that the struct members are used in
flow metadata, like in ip_tun_from_nlattr():
case OVS_TUNNEL_KEY_ATTR_IPV6_SRC:
SW_FLOW_KEY_PUT(match, tun_key.u.ipv6.src,
nla_get_in6_addr(a), is_mask);
ipv6 = true;
break;
While attributes are used in __ip_tun_to_nlattr():
case AF_INET6:
if (!ipv6_addr_any(&output->u.ipv6.src) &&
nla_put_in6_addr(skb, OVS_TUNNEL_KEY_ATTR_IPV6_SRC,
&output->u.ipv6.src))
return -EMSGSIZE;
So I think we can also convert the ipv6-src/ipv6-dst using exact-len? WDYT?
Thanks
Hangbin
Powered by blists - more mailing lists