Commit ec550d24 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

net: ip_append_data() optim

Compiler is not smart enough to avoid a conditional branch.
Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c32d83c0
...@@ -837,10 +837,9 @@ int ip_append_data(struct sock *sk, ...@@ -837,10 +837,9 @@ int ip_append_data(struct sock *sk,
inet->cork.length = 0; inet->cork.length = 0;
sk->sk_sndmsg_page = NULL; sk->sk_sndmsg_page = NULL;
sk->sk_sndmsg_off = 0; sk->sk_sndmsg_off = 0;
if ((exthdrlen = rt->dst.header_len) != 0) { exthdrlen = rt->dst.header_len;
length += exthdrlen; length += exthdrlen;
transhdrlen += exthdrlen; transhdrlen += exthdrlen;
}
} else { } else {
rt = (struct rtable *)inet->cork.dst; rt = (struct rtable *)inet->cork.dst;
if (inet->cork.flags & IPCORK_OPT) if (inet->cork.flags & IPCORK_OPT)
......
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