From: Hangbin Liu <liuhangbin@gmail.com>
To: "Asbjørn Sloth Tønnesen" <ast@fiberby.net>
Cc: netdev@vger.kernel.org, Donald Hunter <donald.hunter@gmail.com>,
Jakub Kicinski <kuba@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
"Matthieu Baerts (NGI0)" <matttbe@kernel.org>,
Stanislav Fomichev <sdf@fomichev.me>,
Jacob Keller <jacob.e.keller@intel.com>,
Yuyang Huang <yuyanghuang@google.com>,
Daniel Borkmann <daniel@iogearbox.net>
Subject: Re: [PATCH net-next] netlink: specs: add big-endian byte-order for u32 IPv4 addresses
Date: Thu, 27 Nov 2025 03:31:50 +0000 [thread overview]
Message-ID: <aSfGJpUFz9A_xFtz@fedora> (raw)
In-Reply-To: <43630b97-4dd4-423a-97e3-ca6aa3b56ad4@fiberby.net>
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
next prev parent reply other threads:[~2025-11-27 3:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-25 11:20 [PATCH net-next] netlink: specs: add big-endian byte-order for u32 IPv4 addresses Hangbin Liu
2025-11-25 17:03 ` Asbjørn Sloth Tønnesen
2025-11-26 6:36 ` Hangbin Liu
2025-11-26 13:32 ` Asbjørn Sloth Tønnesen
2025-11-27 2:14 ` Hangbin Liu
2025-11-27 3:31 ` Hangbin Liu [this message]
2025-11-27 1:20 ` 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=aSfGJpUFz9A_xFtz@fedora \
--to=liuhangbin@gmail.com \
--cc=ast@fiberby.net \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=kuba@kernel.org \
--cc=matttbe@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@fomichev.me \
--cc=yuyanghuang@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).