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]
Date:   Sun, 17 Jul 2022 16:54:20 +0200
From:   Andrew Lunn <andrew@...n.ch>
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] vmxnet3: Implement ethtool's get_channels command

> +#if defined(CONFIG_PCI_MSI)
> +	if (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 {
> +#endif
> +		ec->rx_count = 0;
> +		ec->tx_count = 0;
> +		ec->combined_count = 1;
> +#if defined(CONFIG_PCI_MSI)
> +	}
> +#endif

This is pretty messy. Could you use IS_ENABLED(CONFIG_PCE_MSI)
instead?

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ