summaryrefslogtreecommitdiff
path: root/net/ipv6/ip6_output.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2023-03-21 21:32:21 -0700
committerJakub Kicinski <kuba@kernel.org>2023-03-21 21:32:21 -0700
commit85496c9b3bf8dbe15e2433d3a0197954d323cadc (patch)
treed2312716d8e90eff12270a472646f82aab0e6f42 /net/ipv6/ip6_output.c
parentf6f4e739b16487c89d29ef8b425d019bed64f541 (diff)
parentfe602c87df1b6927562f4ee61edd851bb9578a49 (diff)
Merge branch 'net-remove-some-rcu_bh-cruft'
Eric Dumazet says: ==================== net: remove some rcu_bh cruft There is no point using rcu_bh variant hoping to free objects faster, especially hen using call_rcu() or kfree_rcu(). Disabling/enabling BH has a non-zero cost, and adds distracting hot spots in kernel profiles eg. in ip6_xmit(). ==================== Link: https://lore.kernel.org/r/20230321040115.787497-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv6/ip6_output.c')
-rw-r--r--net/ipv6/ip6_output.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index e5ed39a3c65f..0b6140f0179d 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -116,7 +116,7 @@ static int ip6_finish_output2(struct net *net, struct sock *sk, struct sk_buff *
return res;
}
- rcu_read_lock_bh();
+ rcu_read_lock();
nexthop = rt6_nexthop((struct rt6_info *)dst, daddr);
neigh = __ipv6_neigh_lookup_noref(dev, nexthop);
@@ -124,7 +124,7 @@ static int ip6_finish_output2(struct net *net, struct sock *sk, struct sk_buff *
if (unlikely(!neigh))
neigh = __neigh_create(&nd_tbl, nexthop, dev, false);
if (IS_ERR(neigh)) {
- rcu_read_unlock_bh();
+ rcu_read_unlock();
IP6_INC_STATS(net, idev, IPSTATS_MIB_OUTNOROUTES);
kfree_skb_reason(skb, SKB_DROP_REASON_NEIGH_CREATEFAIL);
return -EINVAL;
@@ -132,7 +132,7 @@ static int ip6_finish_output2(struct net *net, struct sock *sk, struct sk_buff *
}
sock_confirm_neigh(skb, neigh);
ret = neigh_output(neigh, skb, false);
- rcu_read_unlock_bh();
+ rcu_read_unlock();
return ret;
}
@@ -1150,11 +1150,11 @@ static int ip6_dst_lookup_tail(struct net *net, const struct sock *sk,
* dst entry of the nexthop router
*/
rt = (struct rt6_info *) *dst;
- rcu_read_lock_bh();
+ rcu_read_lock();
n = __ipv6_neigh_lookup_noref(rt->dst.dev,
rt6_nexthop(rt, &fl6->daddr));
err = n && !(READ_ONCE(n->nud_state) & NUD_VALID) ? -EINVAL : 0;
- rcu_read_unlock_bh();
+ rcu_read_unlock();
if (err) {
struct inet6_ifaddr *ifp;