From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: wenxu@ucloud.cn, davem@davemloft.net
Cc: 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: Fri, 22 Feb 2019 12:06:57 +0300 [thread overview]
Message-ID: <8feb69cd-bc86-a2fc-646d-0349275e1736@cogentembedded.com> (raw)
In-Reply-To: <1550807549-22720-1-git-send-email-wenxu@ucloud.cn>
Hello!
On 22.02.2019 6:52, 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.
Connections? Way?
> A specific tunnel route based on the percpu dst_cache, It will not
> lookup route table each packet.
For each packet?
> This patch provide a based cpu id hash policy. The different
> connection run on differnt cpu and There will differnet hash
Different. Will be?
> 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(-)
>
> diff --git a/net/ipv4/route.c b/net/ipv4/route.c
> index ecc12a7..6cf2fd4 100644
> --- a/net/ipv4/route.c
> +++ b/net/ipv4/route.c
[...]
> @@ -1834,6 +1835,8 @@ int fib_multipath_hash(const struct net *net, const struct flowi4 *fl4,
> hash_keys.addrs.v4addrs.dst = fl4->daddr;
> }
> break;
> + case 2:
> + cpu = smp_processor_id() + 1;
Should be a comment /* fall through */ if this fall thru isn't in error.
> case 1:
> /* skb is currently provided only when forwarding */
> if (skb) {
[...]
MBR, Sergei
next prev parent reply other threads:[~2019-02-22 9:07 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 [this message]
2019-02-23 3:19 ` David Ahern
2019-02-23 9:14 ` Ido Schimmel
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=8feb69cd-bc86-a2fc-646d-0349275e1736@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=davem@davemloft.net \
--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 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).