[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190118.110620.376531200797865804.davem@davemloft.net>
Date: Fri, 18 Jan 2019 11:06:20 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: wenxu@...oud.cn
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH net-next] ip_gre: Make none-tunnel-dst gre port work
with lwtunnel
From: wenxu@...oud.cn
Date: Tue, 15 Jan 2019 10:44:35 +0800
> + tun_info = skb_tunnel_info(skb);
> + if (tun_info && (tun_info->mode & IP_TUNNEL_INFO_TX) &&
> + ip_tunnel_info_af(tun_info) == AF_INET &&
> + tun_info->key.u.ipv4.dst) {
> + struct iphdr tnl_params_info;
> +
> + memcpy(&tnl_params_info, tnl_params,
> + sizeof(tnl_params_info));
It is not at all reasonable to build and memcpy an entire extra iphdr
on the cpu stack, for every packet transmit. That's terrible for
performance.
Please find a more minimal and efficient way to achieve the behavior
you are looking for.
Thank you.
Powered by blists - more mailing lists