lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 12 Dec 2013 12:19:41 -0800
From:	Tom Herbert <therbert@...gle.com>
To:	David Miller <davem@...emloft.net>
Cc:	Eric Dumazet <eric.dumazet@...il.com>,
	Linux Netdev List <netdev@...r.kernel.org>
Subject: Re: [PATCH] net: Cache route in IP tunnels

On Thu, Dec 12, 2013 at 10:54 AM, David Miller <davem@...emloft.net> wrote:
> From: Eric Dumazet <eric.dumazet@...il.com>
> Date: Wed, 11 Dec 2013 23:37:18 -0800
>
>> On Wed, 2013-12-11 at 22:17 -0800, Tom Herbert wrote:
>>> Avoid doing a route lookup on every packet being tunneled.
>>>
>>> In ip_tunnel.c cache the route returned from ip_route_output if
>>> the tunnel is "connected", that is all the routing parameters are
>>> taken from tunnel parms for a packet. Specifically, not NBMA tunnel
>>> and tos is from tunnel parms (not inner packet).
>>>
>>> Signed-off-by: Tom Herbert <therbert@...gle.com>
>>> ---
>>
>> Replacing per cpu dst (nh_pcpu_rth_output) with a single shared dst is
>> not going to be better on SMP.
>>
>> Do you have any performance data using multiqueue NIC, with say 32 cpus
>> and 32 TX queues ?
>>
>> I suspect a high false sharing on dst refcount.
>
> First off I'm glad someone looked into this, I've been meaning to play
> with this for a while.
>
> Secondly, Eric's concern is valid but we should keep in mind that IPV6
> tunnels do this kind of caching already so if it's undesirable we
> should perhaps undo the caching there too.
>
We could also use a per CPU dst cache in the tunnel. Might be
reasonable if people aren't configuring thousands of tunnels.

> But honestly I suspect that doing a lookup every packet is more
> expensive than false sharing on a cache entry, but I'm happy to be
> proven wrong :)

My performance runs were inconclusive, but I assumed that caching in
the tunnel would scale better with larger numbers of routes.

btw, I needed to disable gro on the tun interface. With it enabled,
performance in TCP_RR is abysmal. Looking into that.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ