From: Eric Dumazet <eric.dumazet@gmail.com>
To: Vladislav Zolotarov <vladz@broadcom.com>
Cc: David Miller <davem@davemloft.net>,
"therbert@google.com" <therbert@google.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: RE: [PATCH] bnx2x: add support for receive hashing
Date: Sun, 11 Jul 2010 19:41:33 +0200 [thread overview]
Message-ID: <1278870093.2538.175.camel@edumazet-laptop> (raw)
In-Reply-To: <8628FE4E7912BF47A96AE7DD7BAC0AADDDE6470521@SJEXCHCCR02.corp.ad.broadcom.com>
Le dimanche 11 juillet 2010 à 10:22 -0700, Vladislav Zolotarov a écrit :
>
> > -----Original Message-----
> > From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org] On
> > Behalf Of Eric Dumazet
> > Sent: Sunday, July 11, 2010 7:45 PM
> > To: Vladislav Zolotarov
> > Cc: David Miller; therbert@google.com; netdev@vger.kernel.org
> > Subject: RE: [PATCH] bnx2x: add support for receive hashing
> >
> > Le dimanche 11 juillet 2010 à 06:16 -0700, Vladislav Zolotarov a écrit :
> > > Dave, it's obvious that there a demand for a new HW/FW configuration
> > > from our side - "rx hash enable" which is currently tightly coupled
> > > with the RSS capability. As long as RSS flow in our FW includes a few
> > > more things apart from just creating an RSS hash and as long as there
> > > are flows (even hypothetical) that demand the RSS hash regardless the
> > > RSS itself we started to work on separation of these two features from
> > > FW perspective. This of course will demand a new FW version but once
> > > we have it we'll be able to be more specific in HW configuration and
> > > have a cleaner code.
> > >
> > > Technically, our FW may provide the Rx HASH always and in a current
> > > driver configuration this is what it does.
> > > I wonder if the driver always provides the HW RX HASH in the
> > > skb->rxhash regardless the value of NETIF_F_RXHASH bit in a
> > > netdev->features will it cause any harm? If not we can get rid of two
> > > extra conditionals in the bnx2x_rx_int().
> >
> > Hi
> >
> > Please dont top-post on netdev, thanks.
>
> This discussion is directly related to Tom's patch that's why I'm posting on this thread.
>
Thats not the question. I am saying "dont top-post", not "dont change
the subject"
> >
> > NETIF_RX_HASH bit is needed so that we can disable skb->rxhash from a
> > particular NIC if we know the hardware provided rxhash is not fulfilling
> > our needs (We prefer spend some cpu cycles to recompute a software
> > rxhash).
> >
> > Software one for example deliver same rxhash values for both ways of a
> > TCP flow, it can help conntracking for example.
>
> I understand that, in that case the proper implementation would be to check the netdev->features when u decide to calculate the SW rxhash, isn't it?
>
Nope, please check get_rps_cpus()
We only do :
if (skb->rxhash)
goto got_hash; /* Skip hash computation on packet header */
That means if skb->rxhash is set, we dont force a recompute.
Your suggestion would move a test from device driver into
get_rps_cpus() ?
Given RPS is more targeted to old devices (not able to provide rxhash),
I am not sure it brings anything.
> >
> > The conditional in driver rx is cheap, since the condition is the same
> > for all packets and CPU can predicts the branch.
>
> Not exactly. Our FW/HW won't provide the rxhash for none-IP packets
> setting the hash CQE field to zero and clearing the
> ETH_FAST_PATH_RX_CQE_RSS_HASH_FLG in the CQE statsu_flags (for ARPs
> for instance). Branch prediction is nice but considering my previous
> remark why do we need this branch at all?
Please limit your lines to 70 chars
We want drivers to set skb->rxhash only if allowed to.
If you feel this is bad for your firmware/hardware/driver, dont set
skb->rxhash.
next prev parent reply other threads:[~2010-07-11 17:41 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-23 5:54 [PATCH] bnx2x: add support for receive hashing Tom Herbert
2010-04-23 7:11 ` David Miller
2010-04-26 17:20 ` Eric Dumazet
2010-04-26 17:38 ` Tom Herbert
2010-04-26 17:47 ` Ben Hutchings
2010-04-26 17:56 ` David Miller
2010-04-26 18:04 ` David Miller
2010-04-26 18:19 ` Tom Herbert
2010-04-26 18:22 ` David Miller
2010-04-26 20:19 ` Rick Jones
2010-04-26 20:40 ` David Miller
2010-04-26 20:48 ` Rick Jones
2010-04-26 20:53 ` David Miller
2010-04-26 21:12 ` Rick Jones
2010-04-27 18:31 ` Eilon Greenstein
2010-04-27 19:30 ` Eric Dumazet
2010-04-26 20:58 ` Stephen Hemminger
2010-04-26 21:11 ` jamal
2010-04-26 21:14 ` jamal
2010-04-26 23:27 ` Brian Bloniarz
2010-04-27 13:37 ` Brian Bloniarz
2010-04-27 14:30 ` Eric Dumazet
2010-04-27 15:44 ` Brian Bloniarz
2010-04-27 16:51 ` David Miller
2010-04-27 17:02 ` Brian Bloniarz
2010-04-27 17:06 ` David Miller
2010-04-27 17:13 ` Eric Dumazet
2010-04-27 17:20 ` David Miller
2010-04-27 17:37 ` Eric Dumazet
2010-04-27 20:21 ` [PATCH net-next-2.6] net: sk_add_backlog() take rmem_alloc into account Eric Dumazet
2010-04-27 21:43 ` David Miller
2010-04-27 22:11 ` David Miller
2010-04-27 22:19 ` Eric Dumazet
2010-04-28 15:41 ` Brian Bloniarz
2010-04-28 15:52 ` Eric Dumazet
2010-04-27 17:31 ` [PATCH] bnx2x: add support for receive hashing Tom Herbert
2010-04-27 17:36 ` Eric Dumazet
2010-07-04 16:36 ` Vladislav Zolotarov
2010-07-04 16:46 ` Vladislav Zolotarov
2010-07-06 7:16 ` Vladislav Zolotarov
2010-07-07 19:17 ` Tom Herbert
2010-07-08 8:40 ` Vladislav Zolotarov
2010-07-11 2:12 ` David Miller
2010-07-11 10:02 ` Vladislav Zolotarov
2010-07-11 13:16 ` Vladislav Zolotarov
2010-07-11 16:45 ` Eric Dumazet
2010-07-11 17:22 ` Vladislav Zolotarov
2010-07-11 17:41 ` Eric Dumazet [this message]
2010-07-11 18:18 ` Vladislav Zolotarov
2010-07-11 22:34 ` 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=1278870093.2538.175.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=therbert@google.com \
--cc=vladz@broadcom.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