netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael Chan" <mchan@broadcom.com>
To: "Ben Hutchings" <bhutchings@solarflare.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH 1/3 net-next] bnx2: Add support for ethtool --show-channels|--set-channels
Date: Tue, 7 Feb 2012 12:58:25 -0800	[thread overview]
Message-ID: <1328648307.8014.35.camel@nseg_linux_HP1.broadcom.com> (raw)
In-Reply-To: <1328645954.3549.17.camel@bwh-desktop>


On Tue, 2012-02-07 at 20:19 +0000, Ben Hutchings wrote:
> On Sun, 2012-02-05 at 17:24 -0800, Michael Chan wrote:
> > Allow the user to override the default number of RSS/TSS rings.
> > 
> > Signed-off-by: Michael Chan <mchan@broadcom.com>
> > ---
> >  drivers/net/ethernet/broadcom/bnx2.c |   99 ++++++++++++++++++++++++++++++---
> >  drivers/net/ethernet/broadcom/bnx2.h |    3 +
> >  2 files changed, 93 insertions(+), 9 deletions(-)
> > 
> > diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c
> > index 0a4c540..2ab31da 100644
> > --- a/drivers/net/ethernet/broadcom/bnx2.c
> > +++ b/drivers/net/ethernet/broadcom/bnx2.c
> > @@ -6246,7 +6246,16 @@ static int
> >  bnx2_setup_int_mode(struct bnx2 *bp, int dis_msi)
> >  {
> >  	int cpus = num_online_cpus();
> > -	int msix_vecs = min(cpus + 1, RX_MAX_RINGS);
> > +	int msix_vecs;
> > +
> > +	if (!bp->num_req_rx_rings)
> > +		msix_vecs = max(cpus + 1, bp->num_req_tx_rings);
> > +	else if (!bp->num_req_tx_rings)
> > +		msix_vecs = max(cpus, bp->num_req_rx_rings);
> > +	else
> > +		msix_vecs = max(bp->num_req_rx_rings, bp->num_req_tx_rings);
> > +
> > +	msix_vecs = min(msix_vecs, RX_MAX_RINGS);
> 
> If I read this correctly, IRQs may be shared between RX and TX queues
> i.e. there may be 'combined channels'.

It is true that an IRQ can have a TX and a RX queue, but they don't both
have to be enabled.  Because of that, it is easier to treat them as
independent queues.  They are independent in all aspects except the IRQ.

  reply	other threads:[~2012-02-07 21:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-06  1:24 [PATCH 1/3 net-next] bnx2: Add support for ethtool --show-channels|--set-channels Michael Chan
2012-02-06  1:24 ` [PATCH 2/3 net-next] bnx2: Add missing memory barrier in bnx2_start_xmit() Michael Chan
2012-02-06  1:24   ` [PATCH 3/3 net-next] cnic: Add FCoE parity error recovery Michael Chan
2012-02-06  3:46     ` David Miller
2012-02-06  3:46   ` [PATCH 2/3 net-next] bnx2: Add missing memory barrier in bnx2_start_xmit() David Miller
2012-02-06  3:46 ` [PATCH 1/3 net-next] bnx2: Add support for ethtool --show-channels|--set-channels David Miller
2012-02-07 20:19 ` Ben Hutchings
2012-02-07 20:58   ` Michael Chan [this message]
2012-02-07 22:01     ` Ben Hutchings
2012-02-07 22:36       ` Ben Hutchings
2012-02-08  1:19         ` Jesse Brandeburg

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=1328648307.8014.35.camel@nseg_linux_HP1.broadcom.com \
    --to=mchan@broadcom.com \
    --cc=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --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).