From: Victor Julien <victor@inliniac.net>
To: David Miller <davem@davemloft.net>, tom@herbertland.com
Cc: netdev@vger.kernel.org, eric@regit.org
Subject: Re: [PATCH] packet: Use symmetric hash for PACKET_FANOUT_HASH.
Date: Mon, 4 Jul 2016 10:41:07 +0200 [thread overview]
Message-ID: <577A2123.8020005@inliniac.net> (raw)
In-Reply-To: <20160702.163825.1446208948440189011.davem@davemloft.net>
On 02-07-16 22:38, David Miller wrote:
> From: Tom Herbert <tom@herbertland.com>
> Date: Fri, 1 Jul 2016 14:16:54 -0700
>
>> On Fri, Jul 1, 2016 at 2:07 PM, David Miller <davem@davemloft.net> wrote:
>>> From: Tom Herbert <tom@herbertland.com>
>>> Date: Fri, 1 Jul 2016 13:52:58 -0700
>>>
>>>> Why are symmetric hashes required?
>>>
>>> Because they want load balancing, such that one flow only can overrun
>>> one single socket not all of the ones in the fanout.
>>>
>> I'm still missing it. Why is this any different than what we need with
>> something like SO_REUSEPORT?
>
> Because local sockets only demux on RX packets for a flow so they
> don't need a symmetric hash, and in fact wouldn't even notice if the
> hash was symmetric or not.
>
> Programs like suricata that are operating as a bump in the stack see
> both directions of traffic for a flow and therefore for them whether
> the hash is symmetric is an issue.
Tools like Suricata, Bro, Snort, netsniff-ng are often used to sit on
the side and receive a copy of the traffic from a tap or span port. This
leads to both sides of connections coming in on the RX side. As the said
tools often rely on the hashing for load balancing to multiple
threads/processes, the hashing should be done symmetrically.
--
---------------------------------------------
Victor Julien
http://www.inliniac.net/
PGP: http://www.inliniac.net/victorjulien.asc
---------------------------------------------
next prev parent reply other threads:[~2016-07-04 8:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-01 20:08 [PATCH] packet: Use symmetric hash for PACKET_FANOUT_HASH David Miller
2016-07-01 20:52 ` Tom Herbert
2016-07-01 21:07 ` David Miller
2016-07-01 21:16 ` Tom Herbert
2016-07-02 20:38 ` David Miller
2016-07-04 8:41 ` Victor Julien [this message]
2016-07-04 9:29 ` Hannes Frederic Sowa
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=577A2123.8020005@inliniac.net \
--to=victor@inliniac.net \
--cc=davem@davemloft.net \
--cc=eric@regit.org \
--cc=netdev@vger.kernel.org \
--cc=tom@herbertland.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).