]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: convert rx data path to not take refcnt on dst
authorWei Wang <weiwan@google.com>
Fri, 21 Jun 2019 00:36:40 +0000 (17:36 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 23 Jun 2019 20:24:17 +0000 (13:24 -0700)
commitec8a4256ce5bdf30bf5c1727618ac83b577030f0
treea5b60f021fa257770d786ffec2e5c656c97d6c2e
parent35614498d54bb4cee09c5a8552c3d4ec2f3aecd2
ipv6: convert rx data path to not take refcnt on dst

ip6_route_input() is the key function to do the route lookup in the
rx data path. All the callers to this function are already holding rcu
lock. So it is fairly easy to convert it to not take refcnt on the dst:
We pass in flag RT6_LOOKUP_F_DST_NOREF and do skb_dst_set_noref().
This saves a few atomic inc or dec operations and should boost
performance overall.
This also makes the logic more aligned with v4.

Signed-off-by: Wei Wang <weiwan@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Acked-by: Mahesh Bandewar <maheshb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/route.c