netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Jon Kohler <jon@nutanix.com>
Cc: Przemek Kitszel <przemyslaw.kitszel@intel.com>,
	Christian Benvenuti <benve@cisco.com>,
	Satish Kharat <satishkh@cisco.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Larysa Zaremba <larysa.zaremba@intel.com>
Subject: Re: [PATCH] enic: add ethtool get_channel support
Date: Wed, 19 Jun 2024 17:04:24 -0700	[thread overview]
Message-ID: <20240619170424.5592d6f6@kernel.org> (raw)
In-Reply-To: <2CB61A20-4055-49AF-A941-AF5376687244@nutanix.com>

On Tue, 18 Jun 2024 16:39:40 +0000 Jon Kohler wrote:
> Looking through how other drivers do this, I didn’t get a sense that
> any other drivers were stacking rx_count + combined_count together.
> 
> Also, enic and the underlying Cisco VIC hardware appears to be 
> fairly specific that the queues they provision at the hardware level are
> either RX or TX and not a unified ring or something to that effect.
> 
> I took that to mean that we would never call anything ‘combined’ in
> the context of this driver.

channel is a bit of an old term, think about interrupts more than
queues. ethtool man page has the most informative description.

Looking at this driver, specifically enic_dev_init() I'd venture
something along the lines of:

	switch (vnic_dev_get_intr_mode(enic->vdev)) { 
	default:
		channels->combined = 1;
		break;                
	case VNIC_DEV_INTR_MODE_MSIX: 
		channels->rx_count = enic->rq_count;
		channels->tx_count = enic->wq_count;
		break;
        }

Please not that you don't have to zero out unused fields, they come
zero-initilized.
-- 
pw-bot: cr

  reply	other threads:[~2024-06-20  0:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-18 16:01 [PATCH] enic: add ethtool get_channel support Jon Kohler
2024-06-18 16:20 ` Przemek Kitszel
2024-06-18 16:39   ` Jon Kohler
2024-06-20  0:04     ` Jakub Kicinski [this message]
2024-06-20 19:49       ` Jon Kohler
2024-06-20 19:58         ` Jakub Kicinski
2024-06-24 18:36           ` Jon Kohler
2024-06-19 17:59 ` Simon Horman
2024-06-19 18:01   ` Simon Horman

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=20240619170424.5592d6f6@kernel.org \
    --to=kuba@kernel.org \
    --cc=benve@cisco.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jon@nutanix.com \
    --cc=larysa.zaremba@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=satishkh@cisco.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).