From: Jakub Kicinski <kuba@kernel.org>
To: "Asbjørn Sloth Tønnesen" <ast@fiberby.net>
Cc: Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, David Ahern <dsahern@kernel.org>,
Matthieu Baerts <matttbe@kernel.org>,
Mat Martineau <martineau@kernel.org>,
Geliang Tang <geliang@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Donald Hunter <donald.hunter@gmail.com>,
netdev@vger.kernel.org, mptcp@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] tools: ynl-gen: use big-endian netlink attribute types
Date: Fri, 13 Sep 2024 21:39:41 -0700 [thread overview]
Message-ID: <20240913213941.5b76c22e@kernel.org> (raw)
In-Reply-To: <20240913085555.134788-1-ast@fiberby.net>
Nice improvement! Since it technically missed net-next closing by a few
hours, let me nit pick a little..
On Fri, 13 Sep 2024 08:55:54 +0000 Asbjørn Sloth Tønnesen wrote:
> diff --git a/tools/net/ynl/ynl-gen-c.py b/tools/net/ynl/ynl-gen-c.py
> index 717530bc9c52e..e26f2c3c40891 100755
> --- a/tools/net/ynl/ynl-gen-c.py
> +++ b/tools/net/ynl/ynl-gen-c.py
> @@ -48,6 +48,7 @@ class Type(SpecAttr):
> self.attr = attr
> self.attr_set = attr_set
> self.type = attr['type']
> + self.nla_type = self.type
is it worth introducing nla_type as Type attribute just for one user?
inside a netlink code generator meaning of nla_type may not be crystal
clear
> self.checks = attr.get('checks', {})
>
> self.request = False
> @@ -157,7 +158,7 @@ class Type(SpecAttr):
> return '{ .type = ' + policy + ', }'
>
> def attr_policy(self, cw):
> - policy = c_upper('nla-' + self.attr['type'])
> + policy = c_upper('nla-' + self.nla_type)
We could just swap the type directly here?
--
pw-bot: defer
next prev parent reply other threads:[~2024-09-14 4:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-13 8:55 [PATCH net-next] tools: ynl-gen: use big-endian netlink attribute types Asbjørn Sloth Tønnesen
2024-09-13 9:51 ` MPTCP CI
2024-09-14 4:39 ` Jakub Kicinski [this message]
2024-09-14 19:03 ` Asbjørn Sloth Tønnesen
2024-09-15 15:23 ` Jakub Kicinski
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=20240913213941.5b76c22e@kernel.org \
--to=kuba@kernel.org \
--cc=ast@fiberby.net \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=geliang@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martineau@kernel.org \
--cc=matttbe@kernel.org \
--cc=mptcp@lists.linux.dev \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.