[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190206103258.GK21401@unicorn.suse.cz>
Date: Wed, 6 Feb 2019 11:32:58 +0100
From: Michal Kubecek <mkubecek@...e.cz>
To: netdev@...r.kernel.org
Cc: Jeff Kirsher <jeffrey.t.kirsher@...el.com>, linville@...driver.com,
Nicholas Nunley <nicholas.d.nunley@...el.com>,
nhorman@...hat.com, sassmann@...hat.com
Subject: Re: [PATCH v2 3/6] ethtool: introduce new ioctl for per-queue
settings
On Tue, Feb 05, 2019 at 04:01:03PM -0800, Jeff Kirsher wrote:
> +static int find_max_num_queues(struct cmd_context *ctx)
> +{
> + struct ethtool_channels echannels;
> +
> + echannels.cmd = ETHTOOL_GCHANNELS;
> + if (send_ioctl(ctx, &echannels))
> + return -1;
> +
> + return MAX(MAX(echannels.rx_count, echannels.tx_count),
> + echannels.combined_count);
> +}
Is the outer MAX() correct here? From the documentation to -L option, it
rather seems we might want
return MAX(echannels.rx_count, echannels.tx_count) +
echannels.combined_count;
But I can't find any NIC around which would have non-zero rx_count or
tx_count so that I cannot check.
Michal Kubecek
Powered by blists - more mailing lists