From: Jakub Kicinski <kuba@kernel.org>
To: Lorenzo Bianconi <lorenzo@kernel.org>
Cc: netdev@vger.kernel.org, bpf@vger.kernel.org, davem@davemloft.net,
edumazet@google.com, pabeni@redhat.com, ast@kernel.org,
daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com,
saeedm@nvidia.com, tariqt@nvidia.com, leon@kernel.org,
shayagr@amazon.com, akiyano@amazon.com, darinzon@amazon.com,
sgoutham@marvell.com, lorenzo.bianconi@redhat.com,
toke@redhat.com
Subject: Re: [RFC net-next 1/6] tools: ynl: fix render-max for flags definition
Date: Thu, 23 Feb 2023 09:09:37 -0800 [thread overview]
Message-ID: <20230223090937.53103f89@kernel.org> (raw)
In-Reply-To: <0252b7d3f7af70ce5d9da688bae4f883b8dfa9c7.1677153730.git.lorenzo@kernel.org>
On Thu, 23 Feb 2023 13:11:33 +0100 Lorenzo Bianconi wrote:
> + if const['type'] == 'flags':
> + max_name = c_upper(name_pfx + 'mask')
> + max_val = f' = {(entry.user_value() << 1) - 1},'
> + cw.p(max_name + max_val)
Could you use EnumSet::get_mask instead() ?
I think it also needs to be fixed to actually walk the elements
and combine the user_value()s rather than count them and assume
there are no gaps.
next prev parent reply other threads:[~2023-02-23 17:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-23 12:11 [RFC net-next 0/6] update xdp_features flag according to NIC re-configuration Lorenzo Bianconi
2023-02-23 12:11 ` [RFC net-next 1/6] tools: ynl: fix render-max for flags definition Lorenzo Bianconi
2023-02-23 17:09 ` Jakub Kicinski [this message]
2023-02-28 23:16 ` Lorenzo Bianconi
2023-02-28 23:28 ` Jakub Kicinski
2023-03-01 9:04 ` Lorenzo Bianconi
2023-02-23 12:11 ` [RFC net-next 2/6] xdp: add xdp_set_features_flag utility routine Lorenzo Bianconi
2023-02-23 12:11 ` [RFC net-next 3/6] net: thunderx: take into account xdp_features setting tx/rx queues Lorenzo Bianconi
2023-02-23 12:11 ` [RFC net-next 4/6] net: ena: " Lorenzo Bianconi
2023-02-23 12:11 ` [RFC net-next 5/6] veth: take into account device reconfiguration for xdp_features flag Lorenzo Bianconi
2023-02-23 12:11 ` [RFC net-next 6/6] net/mlx5e: " Lorenzo Bianconi
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=20230223090937.53103f89@kernel.org \
--to=kuba@kernel.org \
--cc=akiyano@amazon.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=darinzon@amazon.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=leon@kernel.org \
--cc=lorenzo.bianconi@redhat.com \
--cc=lorenzo@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=sgoutham@marvell.com \
--cc=shayagr@amazon.com \
--cc=tariqt@nvidia.com \
--cc=toke@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.