From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by mail.toke.dk (Postfix) with ESMTPS id 2C1ADA33C91 for ; Sat, 21 Oct 2023 03:06:37 +0200 (CEST) Authentication-Results: mail.toke.dk; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=KGBSMNgi Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 6411ACE3B65; Sat, 21 Oct 2023 01:06:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D95B4C433C8; Sat, 21 Oct 2023 01:06:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697850393; bh=XjI3Lhozaqfsso5ZmGvVzvC6vNc7SmAen5vviLq/WQ0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=KGBSMNgi/DMTLZQHM/jCmdgsonJJQyMUDtUhE1yTf0qknglnjzTgBbdtgwDdON6LR ylUuNYhRpt/PFDjZIcqrDSej747Jfqv7C0jdxsVATP+WXs/eZVa31w80PLZZOVMNdB 3gmJK9m8o1FAe83yDR5+ZXR1INyecjQc0dwfu3z1G0Ca4fumWBuxgqCWrTisTN+b4r UTx+IKDyFmmf1beTdUWy1i3jw94EB+J7b/DC+iJLrfQpxAKEj8Pyg6kMmpEVvXKrD6 o/v3WqK1wmiQP5dubXy82dm71ivl+JC7Q+Ee6nmDMnvfGidwW5rm0BCMkXDrwE0c91 BASTZWMgAvCZA== Date: Fri, 20 Oct 2023 18:06:31 -0700 From: Jakub Kicinski To: Stanislav Fomichev Message-ID: <20231020180631.0f7eaebb@kernel.org> In-Reply-To: <20231019174944.3376335-4-sdf@google.com> References: <20231019174944.3376335-1-sdf@google.com> <20231019174944.3376335-4-sdf@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: PCZQGIOJVB75ONLZFGDOXQ7EMV3ADWPA X-Message-ID-Hash: PCZQGIOJVB75ONLZFGDOXQ7EMV3ADWPA X-MailFrom: kuba@kernel.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header 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 X-Mailman-Version: 3.3.8 Precedence: list Subject: [xdp-hints] Re: [PATCH bpf-next v4 03/11] tools: ynl: Print xsk-features from the sample List-Id: XDP hardware hints design discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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/ ? > 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 >= ? > + if (d->xsk_features & (1U << i)) > + printf(" %s", netdev_xsk_flags_str(1 << i)); > + }