All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanislav Fomichev <sdf@google.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net,
	 andrii@kernel.org, martin.lau@linux.dev, song@kernel.org,
	yhs@fb.com,  john.fastabend@gmail.com, kpsingh@kernel.org,
	haoluo@google.com,  jolsa@kernel.org, toke@kernel.org,
	willemb@google.com, dsahern@kernel.org,
	 magnus.karlsson@intel.com, bjorn@kernel.org,
	maciej.fijalkowski@intel.com,  hawk@kernel.org,
	yoong.siang.song@intel.com, netdev@vger.kernel.org,
	 xdp-hints@xdp-project.net
Subject: Re: [PATCH bpf-next v4 03/11] tools: ynl: Print xsk-features from the sample
Date: Mon, 23 Oct 2023 10:27:30 -0700	[thread overview]
Message-ID: <ZTatAlRkP4htsLUS@google.com> (raw)
In-Reply-To: <20231020180631.0f7eaebb@kernel.org>

On 10/20, Jakub Kicinski wrote:
> On Thu, 19 Oct 2023 10:49:36 -0700 Stanislav Fomichev wrote:
> > Regenerate the userspace specs and print xsk-features bitmask.
> 
> I'm afraid you regenerated in previous patch already :]
> Perhaps we should add an easy-to-use flag to ynl-regen to skip tools/ ?

Oops, leftover :-(

I do find it useful that we now regenerate everything, so not sure the
flag is needed (I'm probably missing the intent). I hope we eventually can
drop those generated files altogether from the tree and generate everything
during the build.

> > diff --git a/tools/net/ynl/samples/netdev.c b/tools/net/ynl/samples/netdev.c
> > index b828225daad0..da7c2848f773 100644
> > --- a/tools/net/ynl/samples/netdev.c
> > +++ b/tools/net/ynl/samples/netdev.c
> > @@ -44,6 +44,12 @@ static void netdev_print_device(struct netdev_dev_get_rsp *d, unsigned int op)
> >  			printf(" %s", netdev_xdp_rx_metadata_str(1 << i));
> >  	}
> >  
> > +	printf(" xsk-features (%llx):", d->xsk_features);
> > +	for (int i = 0; d->xsk_features > 1U << i; i++) {
> 
> Shouldn't this be >= ?

Oh, good catch, will fix the other ones as well. But this is subtle and
still mostly works during my tests.

For bits 1 and 2 we get 3 and 'd->xsk_features > 1U << i' is always
true for both 1 and 2.

  reply	other threads:[~2023-10-23 17:27 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-19 17:49 [PATCH bpf-next v4 00/11] xsk: TX metadata Stanislav Fomichev
2023-10-19 17:49 ` [PATCH bpf-next v4 01/11] xsk: Support tx_metadata_len Stanislav Fomichev
2023-10-20 14:29   ` Song, Yoong Siang
2023-10-21  1:12   ` Jakub Kicinski
2023-10-23 17:33     ` Stanislav Fomichev
2023-10-23  8:28   ` Magnus Karlsson
2023-10-23 18:37     ` Stanislav Fomichev
2023-10-19 17:49 ` [PATCH bpf-next v4 02/11] xsk: Add TX timestamp and TX checksum offload support Stanislav Fomichev
2023-10-20 14:31   ` Song, Yoong Siang
2023-10-20 17:49   ` Alexei Starovoitov
2023-10-20 18:06     ` Stanislav Fomichev
2023-10-21  1:04   ` Jakub Kicinski
2023-10-23 17:21     ` Stanislav Fomichev
2023-10-23 18:12       ` Jakub Kicinski
2023-10-23 18:46         ` Stanislav Fomichev
2023-10-19 17:49 ` [PATCH bpf-next v4 03/11] tools: ynl: Print xsk-features from the sample Stanislav Fomichev
2023-10-21  1:06   ` Jakub Kicinski
2023-10-23 17:27     ` Stanislav Fomichev [this message]
2023-10-19 17:49 ` [PATCH bpf-next v4 04/11] net/mlx5e: Implement AF_XDP TX timestamp and checksum offload Stanislav Fomichev
2023-10-19 17:49 ` [PATCH bpf-next v4 05/11] net: stmmac: Add Tx HWTS support to XDP ZC Stanislav Fomichev
2023-10-19 17:49 ` [PATCH bpf-next v4 06/11] selftests/xsk: Support tx_metadata_len Stanislav Fomichev
2023-10-19 17:49 ` [PATCH bpf-next v4 07/11] selftests/bpf: Add csum helpers Stanislav Fomichev
2023-10-19 17:49 ` [PATCH bpf-next v4 08/11] selftests/bpf: Add TX side to xdp_metadata Stanislav Fomichev
2023-10-19 17:49 ` [PATCH bpf-next v4 09/11] selftests/bpf: Convert xdp_hw_metadata to XDP_USE_NEED_WAKEUP Stanislav Fomichev
2023-10-19 17:49 ` [PATCH bpf-next v4 10/11] selftests/bpf: Add TX side to xdp_hw_metadata Stanislav Fomichev
2023-10-24  2:19   ` Song, Yoong Siang
2023-10-24 16:41     ` Stanislav Fomichev
2023-10-19 17:49 ` [PATCH bpf-next v4 11/11] xsk: Document tx_metadata_len layout Stanislav Fomichev
2023-10-23  9:19   ` Magnus Karlsson
2023-10-23 18:31     ` Stanislav Fomichev
2023-10-23  9:52 ` [PATCH bpf-next v4 00/11] xsk: TX metadata Magnus Karlsson
2023-10-23 18:38   ` Stanislav Fomichev

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=ZTatAlRkP4htsLUS@google.com \
    --to=sdf@google.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bjorn@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=dsahern@kernel.org \
    --cc=haoluo@google.com \
    --cc=hawk@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=kuba@kernel.org \
    --cc=maciej.fijalkowski@intel.com \
    --cc=magnus.karlsson@intel.com \
    --cc=martin.lau@linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=song@kernel.org \
    --cc=toke@kernel.org \
    --cc=willemb@google.com \
    --cc=xdp-hints@xdp-project.net \
    --cc=yhs@fb.com \
    --cc=yoong.siang.song@intel.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.