From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796444276; b=ilmIVpFI11b5MTAfM3ydsWbUUp4T1UElDq0zTnMSffS9sRgPV6bF8cBUlbJxJ/FWMyyB RYyDgfRSiQzlFjaE4X+vXME639M9rSRhFE1/hgJFbM1XjF9F2zelqdb8KKVBW37kNh6BT p27HSQQta0A6TFO9fjZo22KaAXZQvLpLCrACIWFfWfBcsRCWfSZPee+q1CSqO0RiW0mw/ H//E4Q/XC5Lhv7jSuB9BucJDBA1FrcRdI23mdUMF16x0wvEmBE+tfb/gTRgnubDZVR7/v RnWyazwCstZVdlnxBiRCrKiS2f1+piqXGjyCWuRPDFWaKGUlJYGcLuTp9g/mEUT3kIg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796444276; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=Agj9TynkHbKI5/wyxdxEc9cmUN7l7JwqrfjKunLKnUk=; b=g8LzeIm6dFjTWXY8Y4vB1aoJfQcX4Vx7I26B4jU4uatu26pd9ZkCFlYF9rKr6XSER8ky TefYhPqG8K5xGwDiTRuvcX9QGsOqUAygB4n6326szbm2fqciVxOUeJJQHdP1gcS4DxVVB CYr7Zqn+Fh40bJVehivmsc3K0/v+pNAd65y4ISBZz3L3Eqx3zJ0BOr37EbAekKXfFEyTm gtL1EZyWHxUUhdgrwy6h8CxN2XVTiE7OaIy0Io0kGC+8P788HAkPOgk2hRSmj/h3UtImS QaNzjX1sg8nC2l5vAtxVv5vH5JifsHjaPfDgG9DDJl+HAx61P+GpdB2vW3LyZcSFo/g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="Wpe/pf7X"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BAE91606A338; Sat, 5 Dec 2026 04:17:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Wpe/pf7X Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7C83C1F00A07; Sat, 5 Dec 2026 04:17:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796444276; bh=Agj9TynkHbKI5/wyxdxEc9cmUN7l7JwqrfjKunLKnUk=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=Wpe/pf7Xt31g/qq3aMXdapvJfkTpuZvK23LqhIcUf2SOaXBmlhxtNI4EmPbvYMHlm pOOnqm/UMnhyqkktItsv+3we9iwuhkh6a6JiNgmdODkA8bglGbDOWH4o7TNU1abhBd ggovkPX4vtKNZw+BBW3SsTMyDjVgMLkTPv1ImFhY6Qdqi6eKhVn4ynXfdckVniklqD ivMWyqFvW1/OTuM6pDkZcHWqw1kCGja834DJO2RC1mvmgpbc2RdRFDWbQrQm99YOrN wyOHKFZ0tLfZZ4SYIbJO+lqLJDph/KqWR1m8BQ1YaeNNkGnEPUtfEtlK4++myEgJU8 jc9MR15k1tQUA== Subject: Re: [PATCH net-next v19 2/4] hinic3: Add ethtool statistic ops part(2/2) From: netdev-bot+sashiko@kernel.org To: gongfan1@huawei.com Cc: wudi234@huawei.com, tengpeisen@huawei.com, netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, andrew+netdev@lunn.ch, ioana.ciornei@nxp.com, maxime.chevallier@bootlin.com, mohsin.bashr@gmail.com, dimitri.daskalakis1@gmail.com, hramamurthy@google.com, larysa.zaremba@intel.com, vadim.fedorenko@linux.dev, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, zhoushuai28@huawei.com, wulike1@huawei.com Date: Sat, 05 Dec 2026 04:17:55 +0000 Message-ID: <179644427505.3146.7330788653597759385@kernel.org> In-Reply-To: References: X-sashiko-severity: Low Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Thank you for your contribution! Sashiko AI review found more severe issue(s) in other patches of this series. This mail is only an FYI, in case you want to address the nit picks below when you respin. Low priority / nit picks for your consideration: - [Low] The commit message does not mention a structural and behavioural change. -- hinic3: Add ethtool statistic ops part(2/2) This commit adds five standard ethtool statistics callbacks to hinic3 (eth-phy, eth-mac, eth-ctrl, rmon and pause). Each one reads the physical port counters from firmware with hinic3_get_phy_port_stats(). The commit also adds a separate VF ethtool_ops table and selects between the PF and VF tables in hinic3_set_ethtool_ops(). > diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_ethtool.c b/drivers/net/ethernet/huawei/hinic3/hinic3_ethtool.c > index 0ec5d7f21e098..1a62668a65f77 100644 > --- a/drivers/net/ethernet/huawei/hinic3/hinic3_ethtool.c > +++ b/drivers/net/ethernet/huawei/hinic3/hinic3_ethtool.c [ ... ] > @@ -674,9 +867,32 @@ static const struct ethtool_ops hinic3_ethtool_ops = { > .get_strings = hinic3_get_strings, > .get_sset_count = hinic3_get_sset_count, > .get_ethtool_stats = hinic3_get_ethtool_stats, > + .get_eth_phy_stats = hinic3_get_eth_phy_stats, > + .get_eth_mac_stats = hinic3_get_eth_mac_stats, > + .get_eth_ctrl_stats = hinic3_get_eth_ctrl_stats, > + .get_rmon_stats = hinic3_get_rmon_stats, > + .get_pause_stats = hinic3_get_pause_stats, > +}; > + > +static const struct ethtool_ops hinic3vf_ethtool_ops = { > + .supported_coalesce_params = ETHTOOL_COALESCE_USECS | > + ETHTOOL_COALESCE_PKT_RATE_RX_USECS, > + .get_link_ksettings = hinic3_get_link_ksettings, > + .get_drvinfo = hinic3_get_drvinfo, > + .get_msglevel = hinic3_get_msglevel, > + .set_msglevel = hinic3_set_msglevel, > + .get_link = ethtool_op_get_link, > + .get_strings = hinic3_get_strings, > + .get_sset_count = hinic3_get_sset_count, > + .get_ethtool_stats = hinic3_get_ethtool_stats, > }; > > void hinic3_set_ethtool_ops(struct net_device *netdev) > { > - netdev->ethtool_ops = &hinic3_ethtool_ops; > + struct hinic3_nic_dev *nic_dev = netdev_priv(netdev); > + > + if (!HINIC3_IS_VF(nic_dev->hwdev)) > + netdev->ethtool_ops = &hinic3_ethtool_ops; > + else > + netdev->ethtool_ops = &hinic3vf_ethtool_ops; > } [Severity: Low] This isn't a bug, but could the commit message describe the PF/VF split? The commit message only says: This commit adds five standard ethtool statistics callbacks to the hinic3 driver: get_eth_phy_stats, get_eth_mac_stats, get_eth_ctrl_stats, get_rmon_stats and get_pause_stats. Each callback reads the physical port counters from firmware via hinic3_get_phy_port_stats() and copies them into the standard ethtool structures. The patch also does two other things: - It adds hinic3vf_ethtool_ops, which is mostly a copy of hinic3_ethtool_ops. - hinic3_set_ethtool_ops() now chooses between the two tables based on HINIC3_IS_VF(). So VF netdevs get none of the new eth-phy, eth-mac, eth-ctrl, rmon or pause stats groups. The exclusion looks intentional. It matches the !HINIC3_IS_VF() check around the port stats in hinic3_get_ethtool_stats(), presumably because VFs cannot query the physical port counters. The driver now keeps two ops tables that have to stay in sync. Any op added only to hinic3_ethtool_ops will be missing on VFs without warning. The later patch in this series, "hinic3: Add ethtool pause param ops", adds get/set_pauseparam only to the PF table. That commit message does not explain the split either. Would it help to say in the commit message that VFs are excluded on purpose, and why? -- Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/cover.1796348433.git.gongfan1%40huawei.com