[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YtQinGiQHiSg1oiC@lunn.ch>
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