Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Shuah Khan <shuah@kernel.org>,
	toke@redhat.com
Subject: [PATCH RFC v2 1/5] veth: always report zero combined channels
Date: Fri, 16 Jul 2021 17:34:19 +0200	[thread overview]
Message-ID: <74b6e46e1af511d48c59b5c254c35ab1cc1600a9.1626449533.git.pabeni@redhat.com> (raw)
In-Reply-To: <cover.1626449533.git.pabeni@redhat.com>

veth get_channel currently reports for channels being both RX/TX and
combined. As Jakub noted:

"""
ethtool man page is relatively clear, unfortunately the kernel code
is not and few read the man page. A channel is approximately an IRQ,
not a queue, and IRQ can't be dedicated and combined simultaneously
"""

This patch changes the information exposed by veth_get_channels,
setting max_combined to zero, being more consistent with the above
statement. The ethtool_channels is always cleared by the caller, we just
need to avoid setting the 'combined' fields.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
 drivers/net/veth.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index bdb7ce3cb054..4b3e2617fdb5 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -226,8 +226,6 @@ static void veth_get_channels(struct net_device *dev,
 	channels->rx_count = dev->real_num_rx_queues;
 	channels->max_tx = dev->real_num_tx_queues;
 	channels->max_rx = dev->real_num_rx_queues;
-	channels->combined_count = min(dev->real_num_rx_queues, dev->real_num_tx_queues);
-	channels->max_combined = min(dev->real_num_rx_queues, dev->real_num_tx_queues);
 }
 
 static const struct ethtool_ops veth_ethtool_ops = {
-- 
2.26.3


  reply	other threads:[~2021-07-16 15:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-16 15:34 [PATCH RFC v2 0/5] veth: more flexible channels number configuration Paolo Abeni
2021-07-16 15:34 ` Paolo Abeni [this message]
2021-07-16 15:34 ` [PATCH RFC v2 2/5] veth: factor out initialization helper Paolo Abeni
2021-07-16 15:34 ` [PATCH RFC v2 3/5] veth: implement support for set_channel ethtool op Paolo Abeni
2021-07-16 15:34 ` [PATCH RFC v2 4/5] veth: create by default nr_possible_cpus queues Paolo Abeni
2021-07-16 15:34 ` [PATCH RFC v2 5/5] selftests: net: veth: add tests for set_channel Paolo Abeni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=74b6e46e1af511d48c59b5c254c35ab1cc1600a9.1626449533.git.pabeni@redhat.com \
    --to=pabeni@redhat.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=toke@redhat.com \
    --subject='Re: [PATCH RFC v2 1/5] veth: always report zero combined channels' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).