Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp13395292rwb; Sun, 27 Nov 2022 05:11:48 -0800 (PST) X-Google-Smtp-Source: AA0mqf6II1PKmEcD9S5P1qQMZC7+UXwWrfbSLrFDE5dXPMg4V2aBjxhwdRtlgo6A2IKS57ebrOhB X-Received: by 2002:a17:90b:3748:b0:218:e0bf:9385 with SMTP id ne8-20020a17090b374800b00218e0bf9385mr22994415pjb.208.1669554708530; Sun, 27 Nov 2022 05:11:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669554708; cv=none; d=google.com; s=arc-20160816; b=TxDj2HU6OU2y/CXuPj53WKeFpNpanh4L1TKcX37dD+yQlloO/Xsb6QXX7mrEdNGYYQ W+RW6zsUMW82X/VsCTPVrS4p2paSV38VJZfyWXVnY0z1mBSkKEyrtGiSdLRnf77IzBQC OFX0yADf2kPRgV92MkjkK25HpA8cxOCOggjrdEBEY5tEHy9VP555Hrd7bAC4rsZwRys/ wnWi3QmPIt2G4X9IudHcAg1Is/zsgEIRis8s1sXkahRXF1S5/Eu210eRGRcR+DtYRauj duchPB8s9o+vtthDsKRevckJc8Xqk7cm6ygwnj+kjjYSLcSpjth2eHA24vDclT+HEp0a HtQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:sender :dkim-signature; bh=X/nDh8TpKOaetZNm9H4kb5l3sJZ9fC/4skJvrnTVrPc=; b=fDP18KVpuPqfDvdWdIiNKkmhAkcgLf16fb7vL4aFJtW/WqrNlPTFneT+mDtnMGmzW9 kepWj6ABvSElCOCRJlILss75wV27sPAE7ryPBmqUnv8+Xjc0rVSkyVS4ffhZNNh2v/Wp Wor2fIMD18KOgSVY8X4rEYKCOkjV4lcv77ekvLPwXFrmRjgI2nKQ2kh9UYw6HHTeuS2g B7kbG54KjlDLXzbRaqyxhJWFie92KT/M3DHPklxg7GSOkXDLOzi1+BYP4OGRgjWpEI1r M/8I3yf4vF9wL5+/4ylszFlnUa0BFH0dGAFPTGasRvicIrTapi/bUldNcY98U3NjEph1 In3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=A8rJC78D; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a4-20020a17090ad80400b0021920b5c516si3570411pjv.24.2022.11.27.05.11.32; Sun, 27 Nov 2022 05:11:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=A8rJC78D; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229609AbiK0NJw (ORCPT + 99 others); Sun, 27 Nov 2022 08:09:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbiK0NJv (ORCPT ); Sun, 27 Nov 2022 08:09:51 -0500 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FC701026; Sun, 27 Nov 2022 05:09:49 -0800 (PST) Received: by mail-pj1-x1035.google.com with SMTP id w4-20020a17090ac98400b002186f5d7a4cso11580283pjt.0; Sun, 27 Nov 2022 05:09:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=X/nDh8TpKOaetZNm9H4kb5l3sJZ9fC/4skJvrnTVrPc=; b=A8rJC78DONtVFCjU8YfRzhf/A8tTYx/cYxKJfHXanN+ASW+iocYY9tOWjvpvel5RhW 3jaaIhkLhABrzSdU7E5HbzW7UBKWAdKF7IIt/9Tnx+1E9D10jAxxLm6Gai74ho8jaaXy GQctii9VVE6lnI81Re32iQwHAmQbE2RBWEYLg0WA4YtbtGFDCuiFcDbcdKGrbMpU49I8 cGq3VeOTvV/WzhcBpIrNhEq7Ubm2CgZ4EXa63sp2VL5+0hRvLSnzrC8PFLvlzfvLQPj9 d3NFvD3/bpMOm84VwowrqAGhp+8qGy36vlM6vANwOHdS55la639OnFUJlYE0igne4Oqe nLbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=X/nDh8TpKOaetZNm9H4kb5l3sJZ9fC/4skJvrnTVrPc=; b=gIex8LvPPhy93oWXINIw06wrG+Zqepe0GykPBedENsoPjJ6vRp2TU/txH3C8XUJgbK htLuqNLz2KjpohRCDpMbYLYMFvPBWJh2+jR4ZWmsnYzGoQ65hM7vaJoqZGCQkgRhf5Va 4uMC9velzoHYE8DvIHOKxJgvo2HnlFn4ZBZsxQecUhTBT+UQT3qrgm7m3MIKNp0r0Wsf 5V6UuicisVsSSKn38w4Juk+gfS7jEkI9tk0Puqac2lzUXaIVXqV07hgCb3YjpcNKxT8e ceXsiHrCIvbokoNFRO51x7L96DbvIueOCB/INo3/weh/HVKYXa7quJAAPxATl33E2y8f bfnA== X-Gm-Message-State: ANoB5pnDxdP+2+BFJR9gCjrLmzsCaooeT36gmWYFRHQN8dVEFCXNjK+c mPGZ+oEXG7S0IRGsD9zGYmFB33szZyWlyw== X-Received: by 2002:a17:902:e886:b0:188:fb19:5f39 with SMTP id w6-20020a170902e88600b00188fb195f39mr30684526plg.21.1669554588631; Sun, 27 Nov 2022 05:09:48 -0800 (PST) Received: from localhost.localdomain (124x33x176x97.ap124.ftth.ucom.ne.jp. [124.33.176.97]) by smtp.gmail.com with ESMTPSA id q17-20020a170902eb9100b00188a908cbddsm6710225plg.302.2022.11.27.05.09.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Nov 2022 05:09:48 -0800 (PST) Sender: Vincent Mailhol From: Vincent Mailhol To: Jiri Pirko , netdev@vger.kernel.org, Jakub Kicinski Cc: "David S . Miller" , Eric Dumazet , Paolo Abeni , linux-kernel@vger.kernel.org, Boris Brezillon , Arnaud Ebalard , Srujana Challa , Kurt Kanzenbach , Andrew Lunn , Florian Fainelli , Vladimir Oltean , Michael Chan , Ioana Ciornei , Dimitris Michailidis , Yisen Zhuang , Salil Mehta , Jesse Brandeburg , Tony Nguyen , Sunil Goutham , Linu Cherian , Geetha sowjanya , Jerin Jacob , hariprasad , Subbaraya Sundeep , Taras Chornyi , Saeed Mahameed , Leon Romanovsky , Ido Schimmel , Petr Machata , Simon Horman , Shannon Nelson , drivers@pensando.io, Ariel Elior , Manish Chopra , Jonathan Lemon , Vadim Fedorenko , Richard Cochran , Vadim Pasternak , Shalom Toledo , linux-crypto@vger.kernel.org, intel-wired-lan@lists.osuosl.org, linux-rdma@vger.kernel.org, oss-drivers@corigine.com, Jiri Pirko , Herbert Xu , Hao Chen , Guangbin Huang , Minghao Chi , Shijith Thotton , Vincent Mailhol Subject: [PATCH net-next v3 0/5] net: devlink: return the driver name in devlink_nl_info_fill Date: Sun, 27 Nov 2022 22:09:14 +0900 Message-Id: <20221127130919.638324-1-mailhol.vincent@wanadoo.fr> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221122154934.13937-1-mailhol.vincent@wanadoo.fr> References: <20221122154934.13937-1-mailhol.vincent@wanadoo.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org The driver name is available in device_driver::name. Right now, drivers still have to report this piece of information themselves in their devlink_ops::info_get callback function. The goal of this series is to have the devlink core to report this information instead of the drivers. The first two patches clean up the mlxsw driver for both the ethtool and the devlink (both are supposed to return the same information so the ethtool got included as well). This is split in two patches because of the different Fixes tag. The third patch fulfills the actual goal of this series: modify devlink core to report the driver name and clean-up all drivers. Both as to be done in an atomic change to avoid attribute duplication. The fourth patch removes the devlink_info_driver_name_put() function to prevent future drivers from reporting the driver name themselves. Finally, the fifth and last patch allows the core to call devlink_nl_info_fill() even if the devlink_ops::info_get() callback is NULL. This allows to do further more clean up in the drivers. --- * Changelog * v2 -> v3 * [PATCH 3/5] remove the call to devlink_info_driver_name_put() in mlxsw driver as well (this was missing in v2, making the build fail... sorry for the noise). * add additional people in CC as pointed by netdev patchwork CI: https://patchwork.kernel.org/project/netdevbpf/list/?series=699451 * Use the "Link:" prefix before URL to silence checkpatch's line length warning. RFC v1 -> v2 * drop the RFC tag * big rework following the discussion on RFC: https://lore.kernel.org/netdev/20221122154934.13937-1-mailhol.vincent@wanadoo.fr/ Went from one patch to a series of five patches: * drop the idea to report the USB serial number following Greg's comment: https://lore.kernel.org/linux-usb/Y3+VfNdt%2FK7UtRcw@kroah.com/ Vincent Mailhol (5): mlxsw: minimal: fix mlxsw_m_module_get_drvinfo() to correctly report driver name mlxsw: core: fix mlxsw_devlink_info_get() to correctly report driver name net: devlink: let the core report the driver name instead of the drivers net: devlink: remove devlink_info_driver_name_put() net: devlink: make the devlink_ops::info_get() callback optional .../marvell/octeontx2/otx2_cpt_devlink.c | 4 --- drivers/net/dsa/hirschmann/hellcreek.c | 5 --- drivers/net/dsa/mv88e6xxx/devlink.c | 5 --- drivers/net/dsa/sja1105/sja1105_devlink.c | 12 ++----- .../net/ethernet/broadcom/bnxt/bnxt_devlink.c | 4 --- .../freescale/dpaa2/dpaa2-eth-devlink.c | 11 +----- .../ethernet/fungible/funeth/funeth_devlink.c | 7 ---- .../hisilicon/hns3/hns3pf/hclge_devlink.c | 5 --- .../hisilicon/hns3/hns3vf/hclgevf_devlink.c | 5 --- drivers/net/ethernet/intel/ice/ice_devlink.c | 6 ---- .../marvell/octeontx2/af/rvu_devlink.c | 7 ---- .../marvell/octeontx2/nic/otx2_devlink.c | 15 -------- .../marvell/prestera/prestera_devlink.c | 5 --- .../net/ethernet/mellanox/mlx5/core/devlink.c | 4 --- drivers/net/ethernet/mellanox/mlxsw/core.c | 5 --- drivers/net/ethernet/mellanox/mlxsw/minimal.c | 2 +- .../net/ethernet/netronome/nfp/nfp_devlink.c | 4 --- .../ethernet/pensando/ionic/ionic_devlink.c | 4 --- drivers/net/ethernet/qlogic/qed/qed_devlink.c | 4 --- drivers/net/netdevsim/dev.c | 3 -- drivers/ptp/ptp_ocp.c | 4 --- include/net/devlink.h | 2 -- net/core/devlink.c | 35 ++++++++++++------- 23 files changed, 27 insertions(+), 131 deletions(-) -- 2.37.4