Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4221807rwb; Sun, 13 Nov 2022 01:14:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf4cFH6HBa8jPlSYG7dTzP6lecnsICq+ebq9PG1+OeXIZzFjDpPc9e5BB8dd6Na5u4sULFV8 X-Received: by 2002:a17:906:148c:b0:7ad:f0ae:bc88 with SMTP id x12-20020a170906148c00b007adf0aebc88mr7339138ejc.188.1668330892479; Sun, 13 Nov 2022 01:14:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668330892; cv=none; d=google.com; s=arc-20160816; b=y/61Y8l8lZtzl1WEF7gPNvReSVxN4stjd0OiPtpDEhCW7o7nTKuhrntag4fXil8mkS Om1Tn79FjZXnp0Ehq7IDAAKbc/U7MhcFvIeDEqsDulrWM1s2uCDcCOowv68KpzJuwpGu NUBktGeIqh3VJ0xEIUyi03SXZNzWA3aDwkgSMJsktrSRpjkup7O4/6b3+P+xbte6Ne0H Ul5MCA2YlPaDfYhoXwA3qgGNB0ttqUTVAeisIVnP+aZFo0SSDEkY2I2XxlB6VeKXPlG+ Dml2zqqsCiQLbofPafRTyDOMeldW4M667tGJU6rYmhPPSUnat89Yo+wYS3bQ8vqazafa 77Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=heUtXGPam79Tm5qX9rx0j3gm+/BuxAoCOT+cdmLId2I=; b=E1vgnNaRJ9JtD3MeRQQhxl03viDrOZ1sDa/p3e6RggrI6qZ73Z9Qx+aknKM5G02Dve Jt5QnlbSE66ralj0OI77X/gzlFtCwKXruCOPwgKebz7LnAg5Gn41JUdW9iNO7Kb38noP 4bSc9SJnpzAy5sYlCc0Znub1v4prHxs1/iePvbWwO3SE3RzkwlcB9atbDncyMoFGT+XG YCqJizwE7rLGpyPZYKBy4DouzWzs9lihiOK4reYmUvFSJTQ2ZIVx5sGTdcLW79NFuoEx FVapRJf2U/OCbnWbbE47HshVMIyYOQp6QYtjTDptBuXbM5BBR15Jx1A1vl9kM3HR030b bmEQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mellanox.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z9-20020a50cd09000000b0046462065e1dsi6165825edi.291.2022.11.13.01.14.30; Sun, 13 Nov 2022 01:14:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mellanox.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235211AbiKMH6m (ORCPT + 89 others); Sun, 13 Nov 2022 02:58:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234204AbiKMH6l (ORCPT ); Sun, 13 Nov 2022 02:58:41 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00BD8AE7C; Sat, 12 Nov 2022 23:58:39 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 95A02B80B2F; Sun, 13 Nov 2022 07:58:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 768EBC433D7; Sun, 13 Nov 2022 07:58:36 +0000 (UTC) Date: Sun, 13 Nov 2022 09:58:32 +0200 From: Leon Romanovsky To: Vincent Mailhol Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, Andrew Lunn , Oleksij Rempel , Dan Williams , Petr Machata , Hao Chen , Amit Cohen , "Gustavo A. R. Silva" , Sean Anderson , linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v2] ethtool: doc: clarify what drivers can implement in their get_drvinfo() Message-ID: References: <20221111030838.1059-1-mailhol.vincent@wanadoo.fr> <20221111064054.371965-1-mailhol.vincent@wanadoo.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221111064054.371965-1-mailhol.vincent@wanadoo.fr> X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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-kernel@vger.kernel.org On Fri, Nov 11, 2022 at 03:40:54PM +0900, Vincent Mailhol wrote: > Many of the drivers which implement ethtool_ops::get_drvinfo() will > prints the .driver, .version or .bus_info of struct ethtool_drvinfo. > To have a glance of current state, do: > > $ git grep -W "get_drvinfo(struct" > > Printing in those three fields is useless because: > > - since [1], the driver version should be the kernel version (at > least for upstream drivers). Arguably, out of tree drivers might > still want to set a custom version, but out of tree is not our > focus. > > - since [2], the core is able to provide default values for .driver > and .bus_info. > > In summary, drivers may provide @fw_version and @erom_version, the > rest is expected to be done by the core. Update the doc to reflect the > facts. > > Also update the dummy driver and simply remove the callback in order > not to confuse the newcomers: most of the drivers will not need this > callback function any more. > > [1] commit 6a7e25c7fb48 ("net/core: Replace driver version to be > kernel version") > Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6a7e25c7fb482dba3e80fec953f1907bcb24d52c > > [2] commit edaf5df22cb8 ("ethtool: ethtool_get_drvinfo: populate > drvinfo fields even if callback exits") > Link: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=edaf5df22cb8e7e849773ce69fcc9bc20ca92160 > > CC: Leon Romanovsky > Signed-off-by: Vincent Mailhol > --- > Arguably, dummy.c is code and not documentation, but for me, it makes > sense to treat it as documentation, thus I am putting everything in > one single patch. If to judge by newcomers submissions, many of them don't read documentation. Thanks, Reviewed-by: Leon Romanovsky