From: David Ahern <dsahern@gmail.com>
To: wenxu@ucloud.cn, davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH net-next v2] ip_tunnel: Add dst_cache management lwtunnel_state of ip tunnel
Date: Thu, 21 Feb 2019 22:39:04 -0500 [thread overview]
Message-ID: <f228c250-ccde-d9e5-8072-8d5bee736f71@gmail.com> (raw)
In-Reply-To: <1550804401-16232-1-git-send-email-wenxu@ucloud.cn>
On 2/21/19 10:00 PM, wenxu@ucloud.cn wrote:
> From: wenxu <wenxu@ucloud.cn>
>
> The lwtunnel_state is not init the dst_cache Which make the
> ip_md_tunnel_xmit can't use the dst_cache. It will lookup
> route table every packets.
>
> Signed-off-by: wenxu <wenxu@ucloud.cn>
> ---
> net/ipv4/ip_tunnel_core.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c
> index 9a0e67b..f91ef7a 100644
> --- a/net/ipv4/ip_tunnel_core.c
> +++ b/net/ipv4/ip_tunnel_core.c
> @@ -252,6 +252,12 @@ static int ip_tun_build_state(struct nlattr *attr,
>
> tun_info = lwt_tun_info(new_state);
>
> + err = dst_cache_init(&tun_info->dst_cache, GFP_ATOMIC);
build_state is called with rtnl held. Unless I am missing something, you
don't need ATOMIC here.
next prev parent reply other threads:[~2019-02-22 3:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-22 3:00 [PATCH net-next v2] ip_tunnel: Add dst_cache management lwtunnel_state of ip tunnel wenxu
2019-02-22 3:39 ` David Ahern [this message]
2019-02-22 4:14 ` wenxu
2019-02-22 15:03 ` David Ahern
2019-02-22 15:21 ` wenxu
2019-02-22 22:16 ` David Ahern
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=f228c250-ccde-d9e5-8072-8d5bee736f71@gmail.com \
--to=dsahern@gmail.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).