From: Franco Fichtner <franco@lastsummer.de>
To: Changli Gao <xiaosuo@gmail.com>
Cc: Tom Herbert <therbert@google.com>,
Eric Dumazet <eric.dumazet@gmail.com>,
David Miller <davem@davemloft.net>,
netdev@vger.kernel.org
Subject: Re: [PATCH v5] rfs: Receive Flow Steering
Date: Sun, 18 Apr 2010 12:06:24 +0100 [thread overview]
Message-ID: <4BCAE7B0.6070200@lastsummer.de> (raw)
In-Reply-To: <h2q412e6f7f1004171706w905cc5c8u51f82cad221642f4@mail.gmail.com>
Changli Gao wrote:
> On Sun, Apr 18, 2010 at 1:38 AM, Tom Herbert <therbert@google.com> wrote:
>
>> That's cool!, but I still like the idea that this hash is treated as
>> an opaque value getting the hash from the device to avoid the jhash
>> or cache misses on the packet can also be a win... Maybe connection
>> tracking/firewall could use the skb->rxhash which provides the
>> consistency and also eliminates the need to do more jhashes.
>>
>>
>
> consistent rxhash only adds the risk of the hash collision, and I
> don't think it is a big problem. For connection tracking/firewall use,
> I am afraid that we have to recompute this value after defrag. So we
> have to export the hash function we used in RPS.
>
> As NIC's hash function can be changed dynamically, the rxhash isn't
> consistent, so the rxhash can't be used by connection tracking, socket
> lookup and others come later.
>
>
I have to agree with Eric and Changli here.
It's especially true if you're passively tracking via one NIC, where all
traffic is just forwarded.
In this scenario, you need to compute consistent hashes. rxhashes by NIC
will be different for
"incoming" and "outgoing" traffic...
Where rxhash by NIC can be used (note: didn't say _useful_) are
scenarios with different net
ports for incoming and outgoing traffic (in active but also passive
traffic scenarios). Here,
rxhashes could be used on a per-port basis, but associating two
seemingly separate rxhashes
with one another to match CPUs is a really annoying task. This would
involve computing the
corresponding "txhash" and looking it up, which is what we'd be doing
with the jhash anyway.
For proper flow tracking Eric's suggestion is the way to go. And if
there are worries about
collisions, why not add IPPROTO_* to the mix.
Franco
next prev parent reply other threads:[~2010-04-18 10:28 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-16 5:47 [PATCH v5] rfs: Receive Flow Steering Tom Herbert
2010-04-16 6:33 ` David Miller
2010-04-16 6:56 ` Eric Dumazet
2010-04-16 7:18 ` Eric Dumazet
2010-04-16 7:26 ` David Miller
2010-04-16 7:48 ` Eric Dumazet
2010-04-17 7:52 ` [PATCH net-next-2.6] rps: rps_sock_flow_table is mostly read Eric Dumazet
2010-04-17 7:57 ` David Miller
2010-04-16 15:35 ` [PATCH v5] rfs: Receive Flow Steering Tom Herbert
2010-04-16 18:15 ` Eric Dumazet
2010-04-16 18:35 ` Tom Herbert
2010-04-16 18:53 ` Eric Dumazet
2010-04-16 20:42 ` Tom Herbert
2010-04-16 21:12 ` Eric Dumazet
2010-04-16 21:25 ` Eric Dumazet
2010-04-17 16:10 ` Eric Dumazet
2010-04-17 17:38 ` Tom Herbert
2010-04-18 0:06 ` Changli Gao
2010-04-18 11:06 ` Franco Fichtner [this message]
2010-04-19 20:09 ` David Miller
2010-04-19 20:23 ` David Miller
2010-04-19 20:32 ` Eric Dumazet
2010-04-19 21:19 ` David Miller
2010-04-26 8:41 ` Eric Dumazet
2010-04-27 21:59 ` David Miller
2010-04-27 22:08 ` Eric Dumazet
2010-04-27 22:10 ` David Miller
2010-04-19 23:38 ` Changli Gao
2010-04-20 5:59 ` Eric Dumazet
2010-04-20 7:56 ` [PATCH net-next-2.6] rps: consistent rxhash Eric Dumazet
2010-04-20 8:18 ` David Miller
2010-04-20 12:48 ` Franco Fichtner
2010-04-20 13:16 ` Eric Dumazet
2010-04-20 14:03 ` Franco Fichtner
2010-04-20 14:57 ` Eric Dumazet
2010-04-20 21:41 ` David Miller
2010-04-20 23:35 ` Changli Gao
2010-04-20 23:38 ` David Miller
2010-04-21 19:12 ` Tom Herbert
2010-04-23 20:44 ` David Miller
2010-05-06 8:06 ` David Miller
2010-05-06 14:45 ` Tom Herbert
2010-04-20 15:09 ` Tom Herbert
2010-04-21 9:29 ` Franco Fichtner
2010-04-21 9:39 ` Eric Dumazet
2010-04-21 11:06 ` Franco Fichtner
2010-04-21 11:16 ` Eric Dumazet
2010-04-20 15:04 ` [PATCH v5] rfs: Receive Flow Steering Tom Herbert
2010-04-20 15:39 ` Eric Dumazet
2010-04-16 19:37 ` Eric Dumazet
2010-04-16 22:49 ` David Miller
2010-04-16 22:53 ` David Miller
2010-04-16 22:57 ` David Miller
2010-04-17 0:22 ` Tom Herbert
2010-04-17 0:58 ` David Miller
2010-04-16 11:57 ` Andi Kleen
2010-04-16 13:32 ` jamal
2010-04-16 13:42 ` Andi Kleen
2010-04-16 14:05 ` jamal
2010-04-16 15:28 ` Andi Kleen
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=4BCAE7B0.6070200@lastsummer.de \
--to=franco@lastsummer.de \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=therbert@google.com \
--cc=xiaosuo@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.