lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240619170424.5592d6f6@kernel.org>
Date: Wed, 19 Jun 2024 17:04:24 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Jon Kohler <jon@...anix.com>
Cc: Przemek Kitszel <przemyslaw.kitszel@...el.com>, Christian Benvenuti
 <benve@...co.com>, Satish Kharat <satishkh@...co.com>, "David S. Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni
 <pabeni@...hat.com>, "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, Larysa
 Zaremba <larysa.zaremba@...el.com>
Subject: Re: [PATCH] enic: add ethtool get_channel support

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ