From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-x64a.google.com (mail-pl1-x64a.google.com [IPv6:2607:f8b0:4864:20::64a]) by mail.toke.dk (Postfix) with ESMTPS id CF069A34D94 for ; Mon, 23 Oct 2023 19:27:33 +0200 (CEST) Authentication-Results: mail.toke.dk; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20230601 header.b=gtB18h6N Received: by mail-pl1-x64a.google.com with SMTP id d9443c01a7336-1c9d140fcddso24911335ad.1 for ; Mon, 23 Oct 2023 10:27:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1698082052; x=1698686852; darn=xdp-project.net; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=3x8IWIHro6S9iAiivi1t4u4+ws/ekOvXOMLmQjoGqFc=; b=gtB18h6N7EQfVEXUhtW3eaI8TVuVAiVKfjp4P4gBeiohTWSvyPu4BUhKyLat+5vTdl 4zyNkE9vjr3eIK7+vMoeL8yXq97+qfRfOaaI2K51fbcDgPwvTOkHutSCEczZk9teTL5m /8ajge02nr+pNeC+PUPst2XxJdid946tfxnNTHyTFWT5u4ecr2izk1S+8F8G8KJOWNml c8/X87oaOMAMpM3xTRtGpkcfcyBXCMWwaLDuwZxH+rq8w8sCIEFm/DciStakQFKEymG2 T3oqaDOjFAONVrgHltEGy9Wp5N+KH4rZOkB9UmM1vKBfGVYgrsWDNyMHtnQ8Mtb7hAQH sCfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698082052; x=1698686852; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3x8IWIHro6S9iAiivi1t4u4+ws/ekOvXOMLmQjoGqFc=; b=OCp2GY1/hQo8sj6KwZTAUfHka0QlWDPvMAU2K3IY9rvAfFOQhKqGHoa/JdOjw8/Qrg /r9ZM4fGY2/kf+k7aYXHjisjVPz8qbXz7JcQ6AuYsaGEQd39AwDzZnD/rqc7wIJhBXdq AOhzacOR+Xl6uEAzglZdO+G6A6MWWlfAA30pz7i9xnfpb08dvcYYS0vJ096wB7DHMEZo pf0ZE1OtWbWs+SvSzMJ7//9WoRs5lq16v4m5Aqnbvmf3WoGbOr5s7UBBVYawHtqtXbyJ 63b2AAGlbg0gyXIvLGNef13n6Tf2I1cgA7SnZHCbm6isQmUJnsGHp9YUiRxPP2xp8hKj aszg== X-Gm-Message-State: AOJu0YzT0jZph9OI8Uvc+V4Oi9YyZkXuw/DtQNMTws0qt1Ehs/6PUrOh loofQI24M+xqtqs1QkYPTUtuhfs= X-Google-Smtp-Source: AGHT+IHtHb2TP4Bg/q0ofYthEqbM7EIFTc9eSERbDcHP6IVJIP3T1WRVi+WZBJOXifgu6e7wWDmbqyY= X-Received: from sdf.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5935]) (user=sdf job=sendgmr) by 2002:a17:902:c942:b0:1c9:bdc5:c34d with SMTP id i2-20020a170902c94200b001c9bdc5c34dmr220149pla.11.1698082052176; Mon, 23 Oct 2023 10:27:32 -0700 (PDT) Date: Mon, 23 Oct 2023 10:27:30 -0700 In-Reply-To: <20231020180631.0f7eaebb@kernel.org> Mime-Version: 1.0 References: <20231019174944.3376335-1-sdf@google.com> <20231019174944.3376335-4-sdf@google.com> <20231020180631.0f7eaebb@kernel.org> Message-ID: From: Stanislav Fomichev To: Jakub Kicinski Content-Type: text/plain; charset="utf-8" Message-ID-Hash: 5INCZQRTRA6HZUDNRVTNVF24OOIFDSJP X-Message-ID-Hash: 5INCZQRTRA6HZUDNRVTNVF24OOIFDSJP X-MailFrom: 3BK02ZQMKCWkZKMNVVNSL.JVTeKW-OPUaZeKW-WYVQLJa.ULa@flex--sdf.bounces.google.com 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 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.