All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@mellanox.com>
To: David Ahern <dsahern@gmail.com>
Cc: "wenxu@ucloud.cn" <wenxu@ucloud.cn>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next] route: Add a new fib_multipath_hash_policy base on cpu id for tunnel packet
Date: Sat, 23 Feb 2019 09:14:52 +0000	[thread overview]
Message-ID: <20190223091445.GA6394@splinter> (raw)
In-Reply-To: <593cc423-c510-b67b-de43-be6cac662bc1@gmail.com>

On Fri, Feb 22, 2019 at 10:19:41PM -0500, David Ahern wrote:
> On 2/21/19 10:52 PM, wenxu@ucloud.cn wrote:
> > From: wenxu <wenxu@ucloud.cn>
> > 
> > Current fib_multipath_hash_policy can make hash based on the L3 or
> > L4. But it only work on the outer IP. So a specific tunnel always
> > has the same hash value. But a specific tunnel may contain so many
> > inner connection. However there is no good ways for tunnel packet.
> > A specific tunnel route based on the percpu dst_cache, It will not
> > lookup route table each packet.
> > 
> > This patch provide a based cpu id hash policy. The different
> > connection run on differnt cpu and There will differnet hash
> > value for percpu dst_cache.
> > 
> > Signed-off-by: wenxu <wenxu@ucloud.cn>
> > ---
> >  net/ipv4/route.c           | 6 ++++++
> >  net/ipv4/sysctl_net_ipv4.c | 2 +-
> >  2 files changed, 7 insertions(+), 1 deletion(-)
> > 
> 
> This multipath hash policy is global - for all fib lookups, not just
> tunnels.
> 
> The suggestion by Nik is worth exploring - an option to add the mark to
> the hash (e.g., L3 header + mark) which makes this more generic.
> 
> If the policy options are changed, the call to call_netevent_notifiers
> needs to be updated to handle a failure. For example, the mlxsw handler
> needs to be able to veto an option it does not support.

Did the author consider using a UDP-based tunnel like FOU? Then L4 mode
should work just fine. I believe most hardware routers do not take inner
headers into account either.

https://lwn.net/Articles/614348/
https://people.netfilter.org/pablo/netdev0.1/papers/UDP-Encapsulation-in-Linux.pdf

      reply	other threads:[~2019-02-23  9:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-22  3:52 [PATCH net-next] route: Add a new fib_multipath_hash_policy base on cpu id for tunnel packet wenxu
2019-02-22  9:06 ` Sergei Shtylyov
2019-02-23  3:19 ` David Ahern
2019-02-23  9:14   ` Ido Schimmel [this message]

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=20190223091445.GA6394@splinter \
    --to=idosch@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=wenxu@ucloud.cn \
    /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.