From: "Matt Carlson" <mcarlson@broadcom.com>
To: "Ben Hutchings" <bhutchings@solarflare.com>
Cc: "Eric Dumazet" <eric.dumazet@gmail.com>,
"Matthew Carlson" <mcarlson@broadcom.com>,
"John Fastabend" <john.r.fastabend@intel.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"therbert@google.com" <therbert@google.com>
Subject: Re: [net-next-2.6 PATCH] net: netif_set_real_num_rx_queues may cap num_rx_queues at init time
Date: Wed, 6 Oct 2010 11:14:58 -0700 [thread overview]
Message-ID: <20101006181458.GA6817@mcarlson.broadcom.com> (raw)
In-Reply-To: <1286379105.2371.15.camel@achroite.uk.solarflarecom.com>
On Wed, Oct 06, 2010 at 08:31:45AM -0700, Ben Hutchings wrote:
> On Wed, 2010-10-06 at 17:23 +0200, Eric Dumazet wrote:
> > Le mercredi 06 octobre 2010 ?? 16:07 +0100, Ben Hutchings a ??crit :
> >
> > > The waste of memory is minimal now that we only allocate kobjects for
> > > real_num_rx_queues.
> >
> > Thats strange, here with tg3 (and mono queue device) :
> >
> > 0a:04.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5715S
> > Gigabit Ethernet (rev a3)
> >
> > grep . /sys/class/net/eth2/queues/rx-*/rps_cpus
> > /sys/class/net/eth2/queues/rx-0/rps_cpus:00000000
> > /sys/class/net/eth2/queues/rx-1/rps_cpus:00000000
> > /sys/class/net/eth2/queues/rx-2/rps_cpus:00000000
> > /sys/class/net/eth2/queues/rx-3/rps_cpus:00000000
> > /sys/class/net/eth2/queues/rx-4/rps_cpus:00000000
>
> It looks like I missed a necessary call to
> netif_set_real_num_rx_queues() in tg3. I suggest that Matt should check
> and correct this since I got the numbers wrong last time.
Yes. We were missing a call to this function in the legacy case.
[PATCH net-next] tg3: Set real_num_rx_queues for non-multiq devs
Commit 2ddaad397c47de012dfb956b0c05540da1a0dde5 entitled "tg3: Use
netif_set_real_num_{rx,tx}_queues()" added a new call to
netif_set_real_num_rx_queues in tg3_enable_msix(). This call also needs
to be added to the legacy path to correctly reflect the actual number of
rx queues.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
---
drivers/net/tg3.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 16e1a95..e5b9ec5 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -8906,6 +8906,7 @@ defcfg:
tp->irq_cnt = 1;
tp->napi[0].irq_vec = tp->pdev->irq;
netif_set_real_num_tx_queues(tp->dev, 1);
+ netif_set_real_num_rx_queues(tp->dev, 1);
}
}
--
1.7.2.2
next prev parent reply other threads:[~2010-10-06 18:15 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-04 22:00 [net-next-2.6 PATCH] net: netif_set_real_num_rx_queues may cap num_rx_queues at init time John Fastabend
2010-10-05 5:35 ` Eric Dumazet
2010-10-05 16:08 ` John Fastabend
2010-10-05 16:34 ` Ben Hutchings
2010-10-05 17:45 ` John Fastabend
2010-10-06 14:52 ` John Fastabend
2010-10-06 15:07 ` Ben Hutchings
2010-10-06 15:20 ` John Fastabend
2010-10-06 15:23 ` Eric Dumazet
2010-10-06 15:31 ` Ben Hutchings
2010-10-06 18:14 ` Matt Carlson [this message]
2010-10-06 18:49 ` Eric Dumazet
2010-10-06 20:41 ` David Miller
2010-10-06 15:20 ` Eric Dumazet
2010-10-07 6:16 ` Eric Dumazet
2010-10-07 6:35 ` David Miller
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=20101006181458.GA6817@mcarlson.broadcom.com \
--to=mcarlson@broadcom.com \
--cc=bhutchings@solarflare.com \
--cc=eric.dumazet@gmail.com \
--cc=john.r.fastabend@intel.com \
--cc=netdev@vger.kernel.org \
--cc=therbert@google.com \
/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).