πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #26484

Re: [PATCH net-next v24 14/14] virtio_net: Add get ethtool flow rules ops

#26484
From: netdev-bot+sashiko
Date: Thu, 03 Dec 2026 15:51
81 lines
11024 bytes
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 author's DCO sign-off in commit "virtio_net: Add get ethtool
  flow rules ops" misspells the author's name.
- [Low] Registering `.get_rxnfc = virtnet_get_rxnfc` in
  `virtnet_ethtool_ops` also changes channel-count behaviour, and the…

--

virtio_net: Add get ethtool flow rules ops

This adds a get_rxnfc ethtool op to virtio_net. It reports the rule count
(ETHTOOL_GRXCLSRLCNT), a single rule (ETHTOOL_GRXCLSRULE) and all rule
locations (ETHTOOL_GRXCLSRLALL), taken from the driver's ethtool flow
filter xarray.

> Signed-off-by: Dniel Jurgens <danielj@nvidia.com>

[Severity: Low]
This isn't a bug, but the author's sign-off has a typo: "Dniel" instead
of "Daniel". It doesn't match the Author: line, and checkpatch.pl reports
it as a From:/Signed-off-by: name mismatch.

> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index 6fcc157464f3e..a5fe4a5b383ed 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c

[ ... ]

> @@ -6712,6 +6786,7 @@ static const struct ethtool_ops virtnet_ethtool_ops = {
>  	.get_rxfh_fields = virtnet_get_hashflow,
>  	.set_rxfh_fields = virtnet_set_hashflow,
>  	.get_rx_ring_count = virtnet_get_rx_ring_count,
> +	.get_rxnfc = virtnet_get_rxnfc,
>  	.set_rxnfc = virtnet_set_rxnfc,
>  };

[Severity: Low]
Should the commit message mention that registering .get_rxnfc also
changes how ethtool -L behaves?

Before this patch, ethtool_get_max_rxnfc_channel() in
net/ethtool/common.c returned early:

	if (!ops->get_rxnfc)
		return -EOPNOTSUPP;

As a result, ethtool_check_max_channel() fell back to max_rxnfc_in_use = 0,
and flow rules never blocked a channel reduction.

With this op registered, the core now walks the installed rules, takes the
largest ring_cookie, and rejects the request in ethtool_check_max_channel():

	if (channels.combined_count + channels.rx_count <= max_rxnfc_in_use) {
		if (info)
			GENL_SET_ERR_MSG(info, "requested channel counts are too low for existing ntuple filter settings");
		return -EINVAL;
	}

The ioctl path, ethtool_set_channels(), and the netlink channels path
both apply this check.

The new behaviour looks correct. validate_flow_input() only checks
ring_cookie against curr_queue_pairs when a rule is inserted. Without
this op, a later "ethtool -L <dev> combined M" with M at or below a rule's
target queue would succeed and leave that rule steering to a queue the
driver no longer uses.

The commit message describes the patch only as read-only rule reporting.
Could it also say that the patch turns on the core's ntuple-aware channel
validation for virtio_net? Anyone backporting only the set_rxnfc patches
would then know they need this one as well.

-- 
Sashiko AI review Β· https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261202150502.3350030-1-shshitrit%40nvidia.com
Technical Details
Message-ID: <179631311569.3146.15980565420294958624@kernel.org>
Path: mbox-mo1.pugleaf.net!srl.newsdeef.eu.MISMATCH!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376739-linux-kernel-netdev=dewy.ru
References: <20261202150502.3350030-15-shshitrit@nvidia.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srl.newsdeef.eu.MISMATCH!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376739-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v24 14/14] virtio_net: Add get ethtool flow rules ops
Date: Thu, 03 Dec 2026 15:51:55 +0000
Organization: Usenet Network
Message-ID: <179631311569.3146.15980565420294958624@kernel.org>
References: <20261202150502.3350030-15-shshitrit@nvidia.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2534239"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:+KrfrMJN7Hb90cTpce507fzQ1uM= sha256:Lj7QLvRnKrlFKyhjbBqlcHAVreYI6bbeJt9VPbd3VNQ=
	sha1:wEkWajXo2hoXx1gu9nUxjFNzVdo= sha256:PudSQTsPv4Hq54OE7zY+6qFU2/RX8b82tJPYZJcgF3k=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id F15011179C4; Thu,  3 Dec 2026 18:52:24 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.64
X-Spam-Status: No, score=-3.64 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id Bc4J8xUS7ZOp;
	Thu,  3 Dec 2026 18:52:22 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-376739-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id BDAE71179BA; Thu,  3 Dec 2026 18:52:13 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 6E19F2A926; Thu,  3 Dec 2026 15:51:58 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1796313118;
	b=TbjEuQno4Sk3rdDFM5zNo6rcDNfCGVlhDT4ZbWE3ftzUItDOpGd91+ykRGYzjPUYkyh6
	 PLK2V7LE5/Vu6DmoS1iE/kzXddTeNDjZ9Xx4KHP1l1BmIoWjLZX/oRNOWVd5OtFkA9KcD
	 iR145SkBGkdi7jbxcE1SBnwvrSE7km20pbu3o+bAplpHDB3KP005y26qUSfCvlwffcb2r
	 QmnGx70xt+xBFuAvVkQKNbheIijQZniS8PjoPuvjiNgBybkUGKR1X8sWbzBlyfOuCeXeb
	 6ObiMDCr9lklIz+RUQ+3SXeIHpMZgCZQYnDuSYajFTekQ9l89RlT8eLj3nqN442kenQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796313118;
	h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc:
	 Date:Message-ID:In-Reply-To:References:X-sashiko-severity:
	 Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version;
	bh=QERWBbMX/wECHtUzeA9lYqWnJ3oJCY46arc146DPtYY=;
	b=rJgoL7W0/Pkc990QKfzY/a5deKMVq3sdi0YQQrrh50x9HwcGPHDojnKOfGRE08d2xKWq
	 ejkB6Nc6NCarf15PN1taLxmUEIiWkQPiY6BaouswD5kSrnxPMvFwPbZoH2raB9i1eCQCK
	 NjczvmuuAmPtMku/kAGI7ZK1Ah1rYoUEJ9nNrmcR/B4F1FUCRv9YPQ650IsCmiLL2/6Du
	 oK3Ectwnt8cHDT0XTdzjG6d077Iw1H1gfdnFkm+H9CYzjQF2qwd8zSTVNduQnQAtV1koT
	 /G7DMwwSUoqyRFKAGgpoasgnLHo+dG4e6vtyOr2dn2RTDRmE+9yF6D9/6j1nCTgrvcQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=LhW7HJ+V;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 46D93606A336;
	Thu,  3 Dec 2026 15:51:58 +0000 (UTC)
X-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=LhW7HJ+V
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1796313117;
	b=0pLxeebjHCa6AdX6xRmmh2k0ZQpcy/Ci1spn69dshRK7Ih8CwbQaCnuu3TJKJ9aBhZ9W
	 1iKuD1fGUoavJ1bTFFskS/Vko1cFLeXramBHpp+jMKBtiQeIq1n+E5v7aeuQuq2K+swBm
	 D7to6KAAs1tOw2twRNOMfqOYVBoSPUqGD+pJ3g3Z7wKykNxuy769/OoqAjdSmDPMJMqQf
	 z9AUs15dQpn7hPLqtmsr2KRC2fAk1/aEg5PsXIzIZ07R6DcRTUVMGOo/WzY7hv9BwkWSy
	 5oaWEQNpXbjdx0NPOG7oYuPpE+UUmZS45AVQN/AswI6qXwn9+YWM/OZPjfOWuN9Isfg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796313117;
	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=QERWBbMX/wECHtUzeA9lYqWnJ3oJCY46arc146DPtYY=;
	b=ML7D4fcXhxHa6MYMaRA1wfB6H7vIglYUw2uvoWw+Fh+R74dvBar7EdkkX4VfNfDvVKPy
	 yQhot7jQ+D2rDb1YZDvCPOejEZzU7DYowG52/urzEmvYOjaQTZbyN7r06DQYLZn31/PgP
	 aZasgtrPLTGByZq8pIAUEuF4ZEk+RciHbYU7sml4//pQ8vOImQHXJjM5BlV3E0zNE1wVh
	 LjrSazeg9FT4MNwLJ6dwhCeYk5AKZZeU9mInEiHLLY/qGtXiLGZi2RPpDKtM7vHhMU+cz
	 qxyQmY5+r6dLGw0Cb5V0DovzNLRCFXS2B+PpVG1tist3Xbkjftknaw6pzCydWQfQjTg==
X-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=LhW7HJ+V;
	arc=none smtp.remote-ip=100.103.45.18
X-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 666B9606A32C;
	Thu,  3 Dec 2026 15:51:57 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 24A791F00898;
	Thu,  3 Dec 2026 15:51:56 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1796313117;
	bh=QERWBbMX/wECHtUzeA9lYqWnJ3oJCY46arc146DPtYY=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=LhW7HJ+VzPVEuMeX2azRw/mCaJ9X/CCZHOLAjEASULjMe2rfgk42QjJ3s6JwauJFm
	 IBdiOYObkdpP8BuFp75PTp0V6nTZ+HdLmF5yp0fVMv4qpGXj3hvRYEZtNVOHofCwJV
	 hmmF9ocM9KtgbDKJCOePFvlT+ypTchFvQq+zlpaksiX7lUfWqrV/MYvlRUsyZsfkD+
	 TcfXgVCEyri0zL8SdB6wy3JGZqNtAG2Ms3DizW9Dicc6cuce7H94J/dMFOeowk9pju
	 65J69EGkWd26LwFR4w2U65QlBan0zEdFGaZL7P6hN0xF1o+7xwubcPk6M5jGwPFJn8
	 sHyjfWA2DfIkg==
X-Cc: netdev@vger.kernel.org, mst@redhat.com, jasowang@redhat.com,
 pabeni@redhat.com, virtualization@lists.linux.dev, parav@nvidia.com,
 yohadt@nvidia.com, xuanzhuo@linux.alibaba.com, eperezma@redhat.com,
 jgg@ziepe.ca, kevin.tian@intel.com, kuba@kernel.org, andrew+netdev@lunn.ch,
 edumazet@google.com, danielj@nvidia.com
X-In-Reply-To: <20261202150502.3350030-15-shshitrit@nvidia.com>
X-sashiko-severity: Low
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list