lkml.org 
[lkml]   [2022]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH net-next 4/5] ipv6: help __ip6_finish_output() inlining
    Date
    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: Pavel Begunkov <asml.silence@gmail.com>
    ---
    net/ipv6/ip6_output.c | 1 -
    1 file changed, 1 deletion(-)

    diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
    index 1f3d777e7694..bda1d9f76f7e 100644
    --- a/net/ipv6/ip6_output.c
    +++ b/net/ipv6/ip6_output.c
    @@ -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);
    switch (ret) {
    case NET_XMIT_SUCCESS:
    - return __ip6_finish_output(net, sk, skb);
    case NET_XMIT_CN:
    return __ip6_finish_output(net, sk, skb) ? : ret;
    default:
    --
    2.36.0
    \
     
     \ /
      Last update: 2022-04-28 13:02    [W:3.238 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site