Commit 4b143ed7 authored by Pavel Begunkov's avatar Pavel Begunkov Committed by David S. Miller

ipv6: help __ip6_finish_output() inlining

There are two callers of __ip6_finish_output(), both are in
ip6_finish_output(). We can combine the call sites into one and handle
return code after, that will inline __ip6_finish_output().

Note, error handling under NET_XMIT_CN will only return 0 if
__ip6_finish_output() succeded, and in this case it return 0.
Considering that NET_XMIT_SUCCESS is 0, it'll be returning exactly the
same result for it as before.
Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c526fd8f
...@@ -198,7 +198,6 @@ static int ip6_finish_output(struct net *net, struct sock *sk, struct sk_buff *s ...@@ -198,7 +198,6 @@ static int ip6_finish_output(struct net *net, struct sock *sk, struct sk_buff *s
ret = BPF_CGROUP_RUN_PROG_INET_EGRESS(sk, skb); ret = BPF_CGROUP_RUN_PROG_INET_EGRESS(sk, skb);
switch (ret) { switch (ret) {
case NET_XMIT_SUCCESS: case NET_XMIT_SUCCESS:
return __ip6_finish_output(net, sk, skb);
case NET_XMIT_CN: case NET_XMIT_CN:
return __ip6_finish_output(net, sk, skb) ? : ret; return __ip6_finish_output(net, sk, skb) ? : ret;
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment