netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Matt Carlson" <mcarlson@broadcom.com>
To: "Ben Hutchings" <bhutchings@solarflare.com>
Cc: "David Miller" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-net-drivers@solarflare.com"
	<linux-net-drivers@solarflare.com>,
	"Matthew Carlson" <mcarlson@broadcom.com>,
	"Michael Chan" <mchan@broadcom.com>
Subject: Re: [PATCH net-next-2.6 16/17] tg3: Use netif_set_real_num_{rx,tx}_queues()
Date: Mon, 27 Sep 2010 14:41:07 -0700	[thread overview]
Message-ID: <20100927214107.GA32336@mcarlson.broadcom.com> (raw)
In-Reply-To: <1285612357.2263.319.camel@achroite.uk.solarflarecom.com>

On Mon, Sep 27, 2010 at 11:32:37AM -0700, Ben Hutchings wrote:
> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
> ---
> This *always* sets real_num_tx_queues to 1, so this could be improved.
> For now, do a simple conversion.
> 
> Ben.
> 
>  drivers/net/tg3.c |    8 ++++++--
>  1 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
> index fdb438d..ca41140 100644
> --- a/drivers/net/tg3.c
> +++ b/drivers/net/tg3.c
> @@ -8821,7 +8821,11 @@ static bool tg3_enable_msix(struct tg3 *tp)
>  	for (i = 0; i < tp->irq_max; i++)
>  		tp->napi[i].irq_vec = msix_ent[i].vector;
>  
> -	tp->dev->real_num_tx_queues = 1;
> +	netif_set_real_num_tx_queues(tp->dev, 1);
> +	if (netif_set_real_num_rx_queues(tp->dev, tp->irq_cnt)) {

This should be tp->irq_cnt - 1, not tp->irq_cnt.  The first MSI-X vector
only handles link interrupts and device errors.

> +		pci_disable_msix(tp->pdev);
> +		return false;
> +	}
>  	if (tp->irq_cnt > 1)
>  		tp->tg3_flags3 |= TG3_FLG3_ENABLE_RSS;
>
> @@ -8856,7 +8860,7 @@ defcfg:
>  	if (!(tp->tg3_flags2 & TG3_FLG2_USING_MSIX)) {
>  		tp->irq_cnt = 1;
>  		tp->napi[0].irq_vec = tp->pdev->irq;
> -		tp->dev->real_num_tx_queues = 1;
> +		netif_set_real_num_tx_queues(tp->dev, 1);
>  	}
>  }
>  
> -- 
> 1.7.2.1
> 
> 
> 
> -- 
> 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.
> 
> 


  reply	other threads:[~2010-09-27 21:41 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-27 18:23 [PATCH net-next-2.6 00/17] netdev: Fix queue count initialisation Ben Hutchings
2010-09-27 18:24 ` [PATCH net-next-2.6 01/17] net: Allow changing number of RX queues after device allocation Ben Hutchings
2010-09-27 18:24 ` [PATCH net-next-2.6 02/17] net: Add netif_copy_real_num_queues() for use by virtual net drivers Ben Hutchings
2010-09-27 18:25 ` [PATCH net-next-2.6 03/17] bnx2: Use netif_set_real_num_{rx,tx}_queues() Ben Hutchings
2010-09-27 18:25 ` [PATCH net-next-2.6 04/17] bnx2x: " Ben Hutchings
2010-09-28  9:26   ` Vladislav Zolotarov
2010-09-28 12:59     ` Vladislav Zolotarov
2010-09-28 17:39       ` David Miller
2010-09-27 18:25 ` [PATCH net-next-2.6 05/17] cxgb3: " Ben Hutchings
2010-09-27 18:25 ` [PATCH net-next-2.6 06/17] cxgb4: " Ben Hutchings
2010-09-27 18:26 ` [PATCH net-next-2.6 07/17] cxgb4vf: " Ben Hutchings
2010-09-27 18:27 ` [PATCH net-next-2.6 08/17] gianfar: Use netif_set_real_num_rx_queues() Ben Hutchings
2010-09-27 18:28 ` [PATCH net-next-2.6 09/17] igb: Use netif_set_real_num_{rx,tx}_queues() Ben Hutchings
2010-09-27 18:28 ` [PATCH net-next-2.6 10/17] ixgbe: " Ben Hutchings
2010-09-27 18:29 ` [PATCH net-next-2.6 11/17] mlx4_en: " Ben Hutchings
2010-09-27 18:30 ` [PATCH net-next-2.6 12/17] mv643xx_eth: " Ben Hutchings
2010-09-28  4:18   ` Lennert Buytenhek
2010-09-27 18:30 ` [PATCH net-next-2.6 13/17] myri10ge: " Ben Hutchings
2010-09-27 18:30 ` [PATCH net-next-2.6 14/17] niu: " Ben Hutchings
2010-09-27 18:31 ` [PATCH net-next-2.6 15/17] sfc: " Ben Hutchings
2010-09-27 18:32 ` [PATCH net-next-2.6 16/17] tg3: " Ben Hutchings
2010-09-27 21:41   ` Matt Carlson [this message]
2010-09-27 21:44     ` Matt Carlson
2010-09-28  5:13       ` David Miller
2010-09-27 18:32 ` [PATCH net-next-2.6 17/17] 8021q: Use netif_copy_real_num_queues() to set queue counts Ben Hutchings
2010-09-28  5:12 ` [PATCH net-next-2.6 00/17] netdev: Fix queue count initialisation David Miller
2010-09-28 12:02   ` Ben Hutchings
2010-09-28 12:07     ` Eric Dumazet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100927214107.GA32336@mcarlson.broadcom.com \
    --to=mcarlson@broadcom.com \
    --cc=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=linux-net-drivers@solarflare.com \
    --cc=mchan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).