From patchwork Thu Jul 27 16:29:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislav Fomichev X-Patchwork-Id: 13330369 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 343C019896 for ; Thu, 27 Jul 2023 16:30:07 +0000 (UTC) Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F7FA2D4B for ; Thu, 27 Jul 2023 09:30:06 -0700 (PDT) Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-583a4015791so11517937b3.1 for ; Thu, 27 Jul 2023 09:30:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1690475405; x=1691080205; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=+8C8WN8g4V3DRA6OM+WF8phKoBb7MuO1zg5ar7S8uBQ=; b=1CNPok2Ol/TFM4viHAeLfi+YN0MPjQDkIB3n6AJSfe6GguAQAiXt8LgLsk3/trE03g aKl+chZzpthEKoBmmQttsYSSUfKFCnTVaSMHIO8W87icnijfVFN5pV9f+8adf0X/aAZX lcP2a5ThhYdZQGhHv+40DHQJvD9Z0aHUC/tHCpdFhzO8DvAmHwPlCMYmDCt3z+diUv3P SzqZlQbAWdwcAAdooiHaohUFczHh0xpRrjJ3V0BuDQIY95Uf1n+kqEWQ23j1h76DqA0U UnO/iO55Ah04NLCTc9+HrYzU7pycBlV0OyXMEmKg0idEQ8vl0YCT5Z6c1V4jeTBlz53d U2pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690475405; x=1691080205; 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=+8C8WN8g4V3DRA6OM+WF8phKoBb7MuO1zg5ar7S8uBQ=; b=kI2VOvoEWmSxVh3AYZNwLrRRXU8Fcea+mU74MCtDfvXlPF+/CXwVi3yXt6XXAwyywJ q8lh/ywrPG6EjdCfZlj9ubkiK6yGSoKxZCW1GVRcc/uWNL5bjGHbODm5SzswoYRPto70 AKK/dPQrS7T5lA7yp01PEqY1un/1OE0LhwF0eUp28HndIXVvYaKZW2nj+SeekoS2fsAW 7cKVY8qIg3yIzHQa1aSoz5C0tOIZvPvsmwroQF/rplZA9SJNSyVzL0FucemEO3xM7MuM 6UtUMftfpq46PbO4R5pwdNV31MQFpAHOPHiGRGmsCk66lAEaSA5gvApxJ/uLfGprIIVn Joig== X-Gm-Message-State: ABy/qLYkkTP5ePWX5XddlofK4bY6bMijvbjJ0wnTkwjBrfmWaTWz2Vqr q8sONHo4U4/rp3Ys4Fzb6jN68MzqNWQlxtsVVuQiC5jZb+s4eFjhBU4eCGiaY9etcMk6x/KnK+V U9TA0/VWdNxWQOBm6IHr4EBklMNGFBZy2DLN/WHgRs4C8whfkqBk6cA== X-Google-Smtp-Source: APBJJlHtV/iZz6Y8lPZOk32gxC4zMWUL66fza84RzqSVzJLkvxjEGOJD9lt0u19pYsRoZ78iy2KQ8ck= X-Received: from sdf.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5935]) (user=sdf job=sendgmr) by 2002:a25:587:0:b0:d10:dd00:385 with SMTP id 129-20020a250587000000b00d10dd000385mr37998ybf.0.1690475405351; Thu, 27 Jul 2023 09:30:05 -0700 (PDT) Date: Thu, 27 Jul 2023 09:29:58 -0700 In-Reply-To: <20230727163001.3952878-1-sdf@google.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20230727163001.3952878-1-sdf@google.com> X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog Message-ID: <20230727163001.3952878-2-sdf@google.com> Subject: [PATCH net-next v2 1/4] ynl: expose xdp-zc-max-segs From: Stanislav Fomichev To: netdev@vger.kernel.org Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, Stanislav Fomichev X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org Also rename it to dashes, to match the rest. And fix unrelated spelling error while we're at it. Signed-off-by: Stanislav Fomichev --- Documentation/netlink/specs/netdev.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/netlink/specs/netdev.yaml b/Documentation/netlink/specs/netdev.yaml index e41015310a6e..1c7284fd535b 100644 --- a/Documentation/netlink/specs/netdev.yaml +++ b/Documentation/netlink/specs/netdev.yaml @@ -14,7 +14,7 @@ name: netdev - name: basic doc: - XDP feautues set supported by all drivers + XDP features set supported by all drivers (XDP_ABORTED, XDP_DROP, XDP_PASS, XDP_TX) - name: redirect @@ -63,7 +63,7 @@ name: netdev enum: xdp-act enum-as-flags: true - - name: xdp_zc_max_segs + name: xdp-zc-max-segs doc: max fragment count supported by ZC driver type: u32 checks: @@ -83,6 +83,7 @@ name: netdev attributes: - ifindex - xdp-features + - xdp-zc-max-segs dump: reply: *dev-all - From patchwork Thu Jul 27 16:29:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislav Fomichev X-Patchwork-Id: 13330370 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9F1981CA0E for ; Thu, 27 Jul 2023 16:30:09 +0000 (UTC) Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1E16198A for ; Thu, 27 Jul 2023 09:30:07 -0700 (PDT) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-5840614b13cso18564387b3.0 for ; Thu, 27 Jul 2023 09:30:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1690475407; x=1691080207; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=vSnIOQEtd8JLvzjpnMN8jpiUA8hMJ626P2zArmKB0JI=; b=nzvaibgkQNT9NREP+Qxlz/CeIFCfoeGtnZusVpcfot1eVS0b+X1FhdQ9YiMMvjg2ZC 8LdCId4RY/Ndfy2m1bNbWNaqek3F/4OBMrTLEgz8ZTavRmvhftdqkZhEQz8Lb6rhNZb3 6R1nuCbSmJ93KUctknvCq46Sdfp/mWSEwH2vrwWtTk1XsRCS8SFLKGsM82Ljet09dJ7l pJjYVUnSByeBkF4qwSTNu40YEEscagunMTfZNCRpDKCwg008CMIm1xBYpyBgh+egFwnD KCntWtBHBOYrlG6P2gdJai/kvt9t1uIlOkWzd+h8hMmWw5tGVEVZZsqz09ivY9BrZxvf FMww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690475407; x=1691080207; 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=vSnIOQEtd8JLvzjpnMN8jpiUA8hMJ626P2zArmKB0JI=; b=fhyjl+/70pbLyBpHD4UKfZS8g3NZaE3Mivzz1y2z68ky7uvPfydyc6RAKx1msi0n3u rlOLKB8JfFAhuQLHl2N2mRLr1aqn84g/HnSBBSmPa8iEkp3rYxagq8pTH67T+iDr9tR8 d5HzIOo+J1/9y0jxtSI3T63LgUiwdAbN4akLeqenjLd+ZY7mwux4KMVa6v0pReL3pXXt Y3imXJtJg/9TGXbhNcDKB2xvXkVge5GQrtciKN43S2BBhEveOmngm+yn7pjfRDxsJQOm UBp7r+y5zJaS31fDEXKAUa6mCjgqMafCakhUjoe4YAmeEGSld7Zg1oY8dFkaeOkkK6sv 9YTA== X-Gm-Message-State: ABy/qLbsxu/4szV7KwZONu5gI/yxZnDCb17C9X1qmafDaByKxxKwQuuf ZlSx/Ft2WeUmdmJoVKgVEatxFRqb81w/lvzNvylL5pSnoVJgborH0LKwNQBykAEiHQyp68zmjY1 HmrZFr/qR5yn9BoicIp/XegN9OqK7Ri7+/fLiaxlEOxb56AuTUSl7Jw== X-Google-Smtp-Source: APBJJlF1dXEWx050bfGbzAjA8LNXyteb6sLhECKQB11b8Z1gB6N6BcxUvLQhBNvULoyhoa2dkjEzTdA= X-Received: from sdf.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5935]) (user=sdf job=sendgmr) by 2002:a81:b648:0:b0:56c:ed45:442c with SMTP id h8-20020a81b648000000b0056ced45442cmr42537ywk.5.1690475407176; Thu, 27 Jul 2023 09:30:07 -0700 (PDT) Date: Thu, 27 Jul 2023 09:29:59 -0700 In-Reply-To: <20230727163001.3952878-1-sdf@google.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20230727163001.3952878-1-sdf@google.com> X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog Message-ID: <20230727163001.3952878-3-sdf@google.com> Subject: [PATCH net-next v2 2/4] ynl: mark max/mask as private for kdoc From: Stanislav Fomichev To: netdev@vger.kernel.org Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, Stanislav Fomichev X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org Simon mentioned in another thread that it makes kdoc happy and Jakub confirms that commit e27cb89a22ad ("scripts: kernel-doc: support private / public marking for enums") actually added the needed support. Signed-off-by: Stanislav Fomichev --- tools/net/ynl/ynl-gen-c.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/net/ynl/ynl-gen-c.py b/tools/net/ynl/ynl-gen-c.py index 71c5e79e877f..650be9b8b693 100755 --- a/tools/net/ynl/ynl-gen-c.py +++ b/tools/net/ynl/ynl-gen-c.py @@ -2125,6 +2125,7 @@ _C_KW = { if const.get('render-max', False): cw.nl() + cw.p('/* private: */') if const['type'] == 'flags': max_name = c_upper(name_pfx + 'mask') max_val = f' = {enum.get_mask()},' From patchwork Thu Jul 27 16:30:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislav Fomichev X-Patchwork-Id: 13330371 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C2561DA33 for ; Thu, 27 Jul 2023 16:30:11 +0000 (UTC) Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DC2F26AB for ; Thu, 27 Jul 2023 09:30:09 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id 3f1490d57ef6-d063bd0bae8so1089363276.0 for ; Thu, 27 Jul 2023 09:30:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1690475409; x=1691080209; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=/gMp5cncclcfe3yDM/AM8QV7eRFWNySks3s4/US2Rvk=; b=Z7WLT/n68JDpFlkRwTbC1LI+rELxk3nrYBFmwHH5r1LH56hHkUQjKefYUei2wu3lzZ MyClCUS6P3N0EHRIAlkCcdg8Ns3oj1g6E2XakcNOMoPgZY0TwMT3eG0xFwuUeBkBrv9k 3hzQTHFwC6OCJD92oKazw8q9QkCXZZ3AdeSfOFtGAIfQJphBNT3dBTolKn2xfZ9ZRxEl +FncUckjk1Usk4lRc0/T7+anAYMntduDqFgOspQGlD9yO1Hlbi3dw955jae0m+AXakL6 D19o9LjYF/t2wHGHBcx1RqSdgd94vMQkcCyS11fQjL2Ze5JQo8ac5aOA06PqcILheUKE 4cfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690475409; x=1691080209; 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=/gMp5cncclcfe3yDM/AM8QV7eRFWNySks3s4/US2Rvk=; b=OixaG5SXxMB4xwBSG2MrDnLKrEejdjCGJ2txNSinGTyL2BdcxZ8LHpJX+ult6RPlHN 5P5ocwb6NondKzksnMOEOZ/cewyE91Ybuv4eWqQN/J0f1ApMH99ORiDreGAhvrbztY2r s2HHTO7ksjb3MrrxKiWnWitWnMEiJDiZh1hZdMfDFcyyDkUAhMu/fEExbMA6VyrirGXO zx+UATHwpmR1iFMLFJcPHgYqeGG1NDkKmedXUKdgNru8sYUQ7NjLAdWfX+DV2dp1wqJV R0fLImjnM7WsVLif9a0GSdm9/9Y+cMeC/YcDV/K0IOkjBt1QQrYv0Lnbd0U9a9EsEb11 uDmA== X-Gm-Message-State: ABy/qLYoRvGORzINt0FSrbIBQXgr3b9ZXiZmbJdU/k5ZoGApX7PDV16m 0w883jphmTAQIPB9WMTxCL2InKNyW451nWhN3C6MFT5vhQY98i9vlz/l3HUnpBF6D98B9YEWIog +xkc9C5VZQYtNwTYjuHW0YFU/dCfSPVJuqPUS6AIAK1mwXyktHRTCrA== X-Google-Smtp-Source: APBJJlHF5gdoI8Ij9WsEwnbXgJyV+tsiaR2Vnn4npkX8tmZX5kI3Q7JfHZ6TYwVzMWcunVjGruKIeYs= X-Received: from sdf.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5935]) (user=sdf job=sendgmr) by 2002:a05:6902:1c9:b0:c78:c530:6345 with SMTP id u9-20020a05690201c900b00c78c5306345mr34119ybh.7.1690475408756; Thu, 27 Jul 2023 09:30:08 -0700 (PDT) Date: Thu, 27 Jul 2023 09:30:00 -0700 In-Reply-To: <20230727163001.3952878-1-sdf@google.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20230727163001.3952878-1-sdf@google.com> X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog Message-ID: <20230727163001.3952878-4-sdf@google.com> Subject: [PATCH net-next v2 3/4] ynl: regenerate all headers From: Stanislav Fomichev To: netdev@vger.kernel.org Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, Stanislav Fomichev X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org Also add support to pass topdir to ynl-regen.sh (Jakub) and call it from the makefile to update the UAPI headers. Signed-off-by: Stanislav Fomichev Co-developed-by: Jakub Kicinski --- include/uapi/linux/netdev.h | 3 ++- tools/include/uapi/linux/netdev.h | 3 ++- tools/net/ynl/Makefile | 1 + tools/net/ynl/generated/netdev-user.c | 6 ++++++ tools/net/ynl/generated/netdev-user.h | 2 ++ tools/net/ynl/ynl-regen.sh | 5 +++++ 6 files changed, 18 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/netdev.h b/include/uapi/linux/netdev.h index bf71698a1e82..c1634b95c223 100644 --- a/include/uapi/linux/netdev.h +++ b/include/uapi/linux/netdev.h @@ -11,7 +11,7 @@ /** * enum netdev_xdp_act - * @NETDEV_XDP_ACT_BASIC: XDP feautues set supported by all drivers + * @NETDEV_XDP_ACT_BASIC: XDP features set supported by all drivers * (XDP_ABORTED, XDP_DROP, XDP_PASS, XDP_TX) * @NETDEV_XDP_ACT_REDIRECT: The netdev supports XDP_REDIRECT * @NETDEV_XDP_ACT_NDO_XMIT: This feature informs if netdev implements @@ -34,6 +34,7 @@ enum netdev_xdp_act { NETDEV_XDP_ACT_RX_SG = 32, NETDEV_XDP_ACT_NDO_XMIT_SG = 64, + /* private: */ NETDEV_XDP_ACT_MASK = 127, }; diff --git a/tools/include/uapi/linux/netdev.h b/tools/include/uapi/linux/netdev.h index bf71698a1e82..c1634b95c223 100644 --- a/tools/include/uapi/linux/netdev.h +++ b/tools/include/uapi/linux/netdev.h @@ -11,7 +11,7 @@ /** * enum netdev_xdp_act - * @NETDEV_XDP_ACT_BASIC: XDP feautues set supported by all drivers + * @NETDEV_XDP_ACT_BASIC: XDP features set supported by all drivers * (XDP_ABORTED, XDP_DROP, XDP_PASS, XDP_TX) * @NETDEV_XDP_ACT_REDIRECT: The netdev supports XDP_REDIRECT * @NETDEV_XDP_ACT_NDO_XMIT: This feature informs if netdev implements @@ -34,6 +34,7 @@ enum netdev_xdp_act { NETDEV_XDP_ACT_RX_SG = 32, NETDEV_XDP_ACT_NDO_XMIT_SG = 64, + /* private: */ NETDEV_XDP_ACT_MASK = 127, }; diff --git a/tools/net/ynl/Makefile b/tools/net/ynl/Makefile index d664b36deb5b..8156f03e23ac 100644 --- a/tools/net/ynl/Makefile +++ b/tools/net/ynl/Makefile @@ -3,6 +3,7 @@ SUBDIRS = lib generated samples all: $(SUBDIRS) + ./ynl-regen.sh -f -p $(PWD)/../../../ $(SUBDIRS): @if [ -f "$@/Makefile" ] ; then \ diff --git a/tools/net/ynl/generated/netdev-user.c b/tools/net/ynl/generated/netdev-user.c index 4eb8aefef0cd..68b408ca0f7f 100644 --- a/tools/net/ynl/generated/netdev-user.c +++ b/tools/net/ynl/generated/netdev-user.c @@ -50,6 +50,7 @@ struct ynl_policy_attr netdev_dev_policy[NETDEV_A_DEV_MAX + 1] = { [NETDEV_A_DEV_IFINDEX] = { .name = "ifindex", .type = YNL_PT_U32, }, [NETDEV_A_DEV_PAD] = { .name = "pad", .type = YNL_PT_IGNORE, }, [NETDEV_A_DEV_XDP_FEATURES] = { .name = "xdp-features", .type = YNL_PT_U64, }, + [NETDEV_A_DEV_XDP_ZC_MAX_SEGS] = { .name = "xdp-zc-max-segs", .type = YNL_PT_U32, }, }; struct ynl_policy_nest netdev_dev_nest = { @@ -91,6 +92,11 @@ int netdev_dev_get_rsp_parse(const struct nlmsghdr *nlh, void *data) return MNL_CB_ERROR; dst->_present.xdp_features = 1; dst->xdp_features = mnl_attr_get_u64(attr); + } else if (type == NETDEV_A_DEV_XDP_ZC_MAX_SEGS) { + if (ynl_attr_validate(yarg, attr)) + return MNL_CB_ERROR; + dst->_present.xdp_zc_max_segs = 1; + dst->xdp_zc_max_segs = mnl_attr_get_u32(attr); } } diff --git a/tools/net/ynl/generated/netdev-user.h b/tools/net/ynl/generated/netdev-user.h index 5554dc69bb9c..0952d3261f4d 100644 --- a/tools/net/ynl/generated/netdev-user.h +++ b/tools/net/ynl/generated/netdev-user.h @@ -47,10 +47,12 @@ struct netdev_dev_get_rsp { struct { __u32 ifindex:1; __u32 xdp_features:1; + __u32 xdp_zc_max_segs:1; } _present; __u32 ifindex; __u64 xdp_features; + __u32 xdp_zc_max_segs; }; void netdev_dev_get_rsp_free(struct netdev_dev_get_rsp *rsp); diff --git a/tools/net/ynl/ynl-regen.sh b/tools/net/ynl/ynl-regen.sh index 8d4ca6a50582..bdba24066cf1 100755 --- a/tools/net/ynl/ynl-regen.sh +++ b/tools/net/ynl/ynl-regen.sh @@ -4,15 +4,18 @@ TOOL=$(dirname $(realpath $0))/ynl-gen-c.py force= +search= while [ ! -z "$1" ]; do case "$1" in -f ) force=yes; shift ;; + -p ) search=$2; shift 2 ;; * ) echo "Unrecognized option '$1'"; exit 1 ;; esac done KDIR=$(dirname $(dirname $(dirname $(dirname $(realpath $0))))) +pushd ${search:-$KDIR} >>/dev/null files=$(git grep --files-with-matches '^/\* YNL-GEN \(kernel\|uapi\|user\)') for f in $files; do @@ -30,3 +33,5 @@ for f in $files; do $TOOL --mode ${params[2]} --${params[3]} --spec $KDIR/${params[0]} \ $args -o $f done + +popd >>/dev/null From patchwork Thu Jul 27 16:30:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislav Fomichev X-Patchwork-Id: 13330372 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E975220FAD for ; Thu, 27 Jul 2023 16:30:12 +0000 (UTC) Received: from mail-pg1-x549.google.com (mail-pg1-x549.google.com [IPv6:2607:f8b0:4864:20::549]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 086DA26AB for ; Thu, 27 Jul 2023 09:30:12 -0700 (PDT) Received: by mail-pg1-x549.google.com with SMTP id 41be03b00d2f7-5634dbfb8b1so707521a12.1 for ; Thu, 27 Jul 2023 09:30:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1690475411; x=1691080211; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=7VDndtUhTmjZhFwzFz2FDQYmgm5v0x87/y1zJ2WzSNM=; b=o09wR1GBUQ0fLtNeGIGR+inuMHtaNtuSkmaRK8SOHIZ3bA0d0S3C5zmboHCrVlGVbO I/oQbnvjuQuNjBMw5+qhgJzMSW46OmVyOTBPm89W18rl8ne17KsLOPwqLRCY1Tp2Y/uP lasYE9NqUvaa9usIrMxSwAGFrW/NNcP3jpDqqG1tSNUlJvMYUeZMcHAlioe9JlqHVdtC IG6/4M8GiaKvK9gi9xg6lN956zn0mDkQSPT0u52mBPjl1acgGUfw50yHSBwrHYeic6pN oi8jjyVjT/mxYjHPaqvyKbfdMR2HYICHze61mzIMPmtFEeVopwIt6Q2rJCvICpfCLYGv x4Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690475411; x=1691080211; 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=7VDndtUhTmjZhFwzFz2FDQYmgm5v0x87/y1zJ2WzSNM=; b=WF+oItkfIyGejBUgL8LS0RxfTndRizqoD9Rd1IUaz/JYmzsFcWa5R16DXSQHx8Tih0 svp5+tsvFf47Umpstz1PIGjCKSMABbmTqeQNgJqnf1T164GXKHSDQEF/89bV/bS6PwFj VooBckk3Hp6hdLM64JfzQv5do5W6tznd+F/PZxfNvCKiiRJfttjOGd+y3arSNM01CRim mD2+enkuqy4SqAVMYPCpM4h1r9gZYYKO29WaN6SVMWl78Run5ybFRYYkN8LX5LycZHta w8R1Km2v5hbBGn6+DUoOfFSWRC3E49Xu4KBTN3SFFCyXxWFH0RMPsr3vLMSLZB1w56gC yKAw== X-Gm-Message-State: ABy/qLa3cgqtAb0k2ntgpfi3iJlhlBDCjOoiy+cFU4pRug/BO7zUvkIN 8X6q9igUFzG/HiuWSkDJiSUycE3pA+Jaij6SKCet/5B7Rg6HLHRvdOkoUQAgAF3ibDWwuiXSO0M /37qqrqEpCzVIHdHwLWncOByoImlDdkkUjOeMXyQ5vomHKAb2ciwZpA== X-Google-Smtp-Source: APBJJlFiIj/05iCTRMMvgFz0A0lSHRxD0cIR9qk4of0KMGMdM3pZobp8Ddt+dVih8UKDKvsqL231/Tc= X-Received: from sdf.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5935]) (user=sdf job=sendgmr) by 2002:a63:3ec5:0:b0:557:6227:bf47 with SMTP id l188-20020a633ec5000000b005576227bf47mr25875pga.9.1690475410216; Thu, 27 Jul 2023 09:30:10 -0700 (PDT) Date: Thu, 27 Jul 2023 09:30:01 -0700 In-Reply-To: <20230727163001.3952878-1-sdf@google.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20230727163001.3952878-1-sdf@google.com> X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog Message-ID: <20230727163001.3952878-5-sdf@google.com> Subject: [PATCH net-next v2 4/4] ynl: print xdp-zc-max-segs in the sample From: Stanislav Fomichev To: netdev@vger.kernel.org Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, Stanislav Fomichev X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org Technically we don't have to keep extending the sample, but it feels useful to run these tools locally to confirm everything is working. Signed-off-by: Stanislav Fomichev --- tools/net/ynl/samples/netdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/net/ynl/samples/netdev.c b/tools/net/ynl/samples/netdev.c index d31268aa47c5..06433400dddd 100644 --- a/tools/net/ynl/samples/netdev.c +++ b/tools/net/ynl/samples/netdev.c @@ -38,6 +38,8 @@ static void netdev_print_device(struct netdev_dev_get_rsp *d, unsigned int op) printf(" %s", netdev_xdp_act_str(1 << i)); } + printf(" xdp-zc-max-segs=%u", d->xdp_zc_max_segs); + name = netdev_op_str(op); if (name) printf(" (ntf: %s)", name);