Subject: Re: [PATCH net-next-2.6 7/8] sfc: Set net_device::num_rx_queues once we know the correct value

From: Ben Hutchings <[email-masked]>
Date: Wed, 22 Sep 2010 02:31:36 +0100

On Tue, 2010-09-21 at 14:57 -0700, David Miller wrote:
> From: Ben Hutchings <[email-masked]>
> Date: Mon, 20 Sep 2010 20:05:46 +0100
> 
> > If RPS is enabled there's a separate kobject for each RX queue.  Those
> > other drivers probably should be setting it.
> > 
> > Oh, but this only exists if CONFIG_RPS is enabled.  I think we need an
> > inline function for setting this.
> 
> It's set in the core by alloc_netdev_mq(), you should never have to
> set this in your driver.

That specifies the maximum possible number of queues, but we don't
require that the actual number of TX queues (real_num_tx_queues) is the
same as the maximum (num_tx_queues) and nor should we assume that of RX
queues.  I don't think we should require that the maximum numbers of RX
and TX queues are the same either, for that matter.

> And that also takes care of the CONFIG_RPS dependency in one spot,
> another good argument for drivers never touching this value.
> 
> I'm not applying this patch.

Right, but we do need to have some way for drivers to specify the actual
number of RX queues.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.