From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by mail.toke.dk (Postfix) with ESMTPS id 0EC71A39671 for ; Thu, 2 Nov 2023 23:58:46 +0100 (CET) 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=aa1zR4H6 Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-5b0c27d504fso12020607b3.1 for ; Thu, 02 Nov 2023 15:58:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1698965924; x=1699570724; 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=yIQWlqlKx7HVoISOZnXwD//BGCQLkTId8oEkXKIs8r4=; b=aa1zR4H6UX6QCDNGnOKiyyyKMCGMCSC+OjH5lDtBn+xzebZ/1l3f8C2dn44kWWseGX 8kFqvbLYYsGQfDWEXj4Oj45AGxdjuNhZhcxTaTrVvKivJhwCnZ8dFeUazxkQ3vSJHFPO 6FUSN/yjb3ZLMiTo/xEY49Se59QbgNUvq8VW0gQP62Tmo2IJ3IqVVQTBOmnW7qbiq36/ 0XsSpGQG3wdZKzQOCnQK2JgV1IW2/PSKdECFD166EpDrFNUdl8gNlolzoVSaN9pLYuHy 1TDjrGXhFyZJQQwq7sjLkLgbBNWjlYwAhrA1x2MyNobG9aIHTVqWwf114QTLV38XO6I8 64ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698965924; x=1699570724; 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=yIQWlqlKx7HVoISOZnXwD//BGCQLkTId8oEkXKIs8r4=; b=OzbiwFj8iRm6FKHGffAXoaXuVXNciPmKGd9/Hy8Af+jR12QF/9tQnR8ds6eLyt8R9N 1B0d3+rcgLYvrlsO9UNZIoNW1Kctv/M8bgRy5IHKzQNjDyVgprRAkpenCd1vmW6yy45K nI2t6XfGfH/M3dfsHInimFs16fGehlAMNWw9SUYvaZdTJ4Q6IaX5XA62bfClPWrWlxRk MszbxNt+pMmhWNrginm1ZZHQbLr3bsoQ5FIrh8IFbTl8grWqRM4dYHRtM9q2lsuOJ0A6 0NPrxMh1vDU3sX8FPUr7qOojt1ywGAgA79fNOqGijT/NnX2f6LZl+uYxE9inJCwT+QiE xKKA== X-Gm-Message-State: AOJu0Yzs+Vh/NnN3CKOkor+T9rXfSq3g6z9DdpZ9OsKld7JV0jPN/RQx CLfQKZ5rN+O0GxFjUQoHVei7/V8= X-Google-Smtp-Source: AGHT+IGxEl/+xuhibdGZev48+wG7/mtLXtVNyeGjcD7sBqjMuhiBM+KGfxbvnH9d9S2CPir4NbnlgGQ= X-Received: from sdf.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5935]) (user=sdf job=sendgmr) by 2002:a05:690c:88d:b0:5a8:207a:143a with SMTP id cd13-20020a05690c088d00b005a8207a143amr26239ywb.0.1698965924683; Thu, 02 Nov 2023 15:58:44 -0700 (PDT) Date: Thu, 2 Nov 2023 15:58:27 -0700 In-Reply-To: <20231102225837.1141915-1-sdf@google.com> Mime-Version: 1.0 References: <20231102225837.1141915-1-sdf@google.com> X-Mailer: git-send-email 2.42.0.869.gea05f2083d-goog Message-ID: <20231102225837.1141915-4-sdf@google.com> From: Stanislav Fomichev To: bpf@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Message-ID-Hash: ZVLJRU6JCKSYGBERGEQDAB6ICT7HJ3K3 X-Message-ID-Hash: ZVLJRU6JCKSYGBERGEQDAB6ICT7HJ3K3 X-MailFrom: 3pClEZQMKCTknYabjjbgZ.XjhsYk-cdionsYk-kmjeZXo.iZo@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: 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, sdf@google.com, haoluo@google.com, jolsa@kernel.org, kuba@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] [PATCH bpf-next v5 03/13] 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: In a similar fashion we do for the other bit masks. Fix mask parsing (>= vs >) while we are it. Signed-off-by: Stanislav Fomichev --- tools/net/ynl/samples/netdev.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/net/ynl/samples/netdev.c b/tools/net/ynl/samples/netdev.c index b828225daad0..591b90e21890 100644 --- a/tools/net/ynl/samples/netdev.c +++ b/tools/net/ynl/samples/netdev.c @@ -33,17 +33,23 @@ static void netdev_print_device(struct netdev_dev_get_rsp *d, unsigned int op) return; printf("xdp-features (%llx):", d->xdp_features); - for (int i = 0; d->xdp_features > 1U << i; i++) { + for (int i = 0; d->xdp_features >= 1U << i; i++) { if (d->xdp_features & (1U << i)) printf(" %s", netdev_xdp_act_str(1 << i)); } printf(" xdp-rx-metadata-features (%llx):", d->xdp_rx_metadata_features); - for (int i = 0; d->xdp_rx_metadata_features > 1U << i; i++) { + for (int i = 0; d->xdp_rx_metadata_features >= 1U << i; i++) { if (d->xdp_rx_metadata_features & (1U << i)) 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++) { + if (d->xsk_features & (1U << i)) + printf(" %s", netdev_xsk_flags_str(1 << i)); + } + printf(" xdp-zc-max-segs=%u", d->xdp_zc_max_segs); name = netdev_op_str(op); -- 2.42.0.869.gea05f2083d-goog