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] [day] [month] [year] [list]
Date:   Mon, 18 Jul 2022 15:07:27 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Andrey Turkin <andrey.turkin@...il.com>
Cc:     netdev@...r.kernel.org, Ronak Doshi <doshir@...are.com>,
        VMware PV-Drivers Reviewers <pv-drivers@...are.com>
Subject: Re: [PATCH v2] vmxnet3: Implement ethtool's get_channels command

On Mon, 18 Jul 2022 04:51:10 +0000 Andrey Turkin wrote:
> +	if (IS_ENABLED(CONFIG_PCI_MSI) && adapter->intr.type == VMXNET3_IT_MSIX) {
> +		if (adapter->share_intr == VMXNET3_INTR_BUDDYSHARE) {
> +			ec->combined_count = adapter->num_tx_queues;
> +			ec->rx_count = 0;
> +			ec->tx_count = 0;
> +		} else {
> +			ec->combined_count = 0;
> +			ec->rx_count = adapter->num_rx_queues;
> +			ec->tx_count =
> +				adapter->share_intr == VMXNET3_INTR_TXSHARE ?
> +					       1 : adapter->num_tx_queues;
> +		}
> +	} else {
> +		ec->rx_count = 0;
> +		ec->tx_count = 0;
> +		ec->combined_count = 1;

No need to set the unused counts to 0.

Powered by blists - more mailing lists