[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5bb4b0b2-cc12-2cce-0122-54bd72ab04e7@gmail.com>
Date: Tue, 19 Nov 2019 08:39:00 -0700
From: David Ahern <dsahern@...il.com>
To: Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org
Cc: "David S. Miller" <davem@...emloft.net>,
Willem de Bruijn <willemdebruijn.kernel@...il.com>,
Edward Cree <ecree@...arflare.com>
Subject: Re: [PATCH net-next v3 1/2] ipv6: introduce and uses route look hints
for list input
On 11/19/19 7:38 AM, Paolo Abeni wrote:
> When doing RX batch packet processing, we currently always repeat
> the route lookup for each ingress packet. If policy routing is
> configured, and IPV6_SUBTREES is disabled at build time, we
> know that packets with the same destination address will use
> the same dst.
>
> This change tries to avoid per packet route lookup caching
> the destination address of the latest successful lookup, and
> reusing it for the next packet when the above conditions are
> in place. Ingress traffic for most servers should fit.
>
> The measured performance delta under UDP flood vs a recvmmsg
> receiver is as follow:
>
> vanilla patched delta
> Kpps Kpps %
> 1431 1674 +17
That's a nice boost...
> +static struct sk_buff *ip6_extract_route_hint(struct net *net,
> + struct sk_buff *skb)
> +{
> + if (IS_ENABLED(IPV6_SUBTREES) || fib6_has_custom_rules(net))
... but basing on SUBTREES being disabled is going to limit its use. If
no routes are source based (fib6_src is not set), you should be able to
re-use the hint with SUBTREES enabled. e.g., track fib6_src use with a
per-namespace counter - similar to fib6_rules_require_fldissect.
Powered by blists - more mailing lists