public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Jakub Kicinski <kuba@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: Wed, 1 Mar 2023 00:16:16 +0100	[thread overview]
Message-ID: <Y/6LQH4hU/gYROKO@lore-desk> (raw)
In-Reply-To: <20230223090937.53103f89@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 588 bytes --]

> 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() ?

ack, I will fix it.

> 
> 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.

Do you mean get_mask()?

Regards,
Lorenzo

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2023-02-28 23:16 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
2023-02-28 23:16     ` Lorenzo Bianconi [this message]
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=Y/6LQH4hU/gYROKO@lore-desk \
    --to=lorenzo@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=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox