[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100927214416.GA32384@mcarlson.broadcom.com>
Date: Mon, 27 Sep 2010 14:44:16 -0700
From: "Matt Carlson" <mcarlson@...adcom.com>
To: "Matt Carlson" <mcarlson@...adcom.com>
cc: "Ben Hutchings" <bhutchings@...arflare.com>,
"David Miller" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-net-drivers@...arflare.com" <linux-net-drivers@...arflare.com>,
"Michael Chan" <mchan@...adcom.com>
Subject: Re: [PATCH net-next-2.6 16/17] tg3: Use
netif_set_real_num_{rx,tx}_queues()
On Mon, Sep 27, 2010 at 02:41:07PM -0700, Matt Carlson wrote:
> On Mon, Sep 27, 2010 at 11:32:37AM -0700, Ben Hutchings wrote:
> > Signed-off-by: Ben Hutchings <bhutchings@...arflare.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.
I need to correct myself. If the irq_cnt > 1, then it needs to be
tp->irq_cnt - 1. If the irq_cnt == 1, then it should be 1.
> > + 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.
> >
> >
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists