netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: dmitry@broadcom.com
Cc: netdev@vger.kernel.org, eilong@broadcom.com
Subject: Re: [net-next 2/8] bnx2x: add select queue callback
Date: Fri, 10 Dec 2010 14:11:31 -0800 (PST)	[thread overview]
Message-ID: <20101210.141131.241939045.davem@davemloft.net> (raw)
In-Reply-To: <1291896556.8745.7.camel@lb-tlvb-dmitry>

From: "Dmitry Kravkov" <dmitry@broadcom.com>
Date: Thu, 9 Dec 2010 14:09:16 +0200

> +#endif
> +	/* Select queue (if defined) adjust for fcoe */
> +	fp_index = skb_tx_hash(dev, skb) - FCOE_CONTEXT_USE;
> +
> +	return (fp_index >= 0 ? fp_index : 0);

This doesn't make any sense, and it's one of the reasons I really
hate the fact that drivers sometimes need to override the
select_queue method.

Because 9 times out of 10 they get it wrong.

You're mapping queues 0 --> FCOE_CONTEXT_USE to zero.

But that's not what you actually want.

You're actually trying to make non-FCOE traffic hash only amongst the
non-FCOE queues.

So make your code actually do that instead of screwing up the
distribution of the hash result.

  reply	other threads:[~2010-12-10 22:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-09 12:09 [net-next 2/8] bnx2x: add select queue callback Dmitry Kravkov
2010-12-10 22:11 ` David Miller [this message]
2010-12-12 10:25   ` Eilon Greenstein

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=20101210.141131.241939045.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dmitry@broadcom.com \
    --cc=eilong@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).