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

Reply via email to