提交 ec550d24 编写于 作者: E Eric Dumazet 提交者: David S. Miller

net: ip_append_data() optim

Compiler is not smart enough to avoid a conditional branch.
Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c32d83c0
......@@ -837,10 +837,9 @@ int ip_append_data(struct sock *sk,
inet->cork.length = 0;
sk->sk_sndmsg_page = NULL;
sk->sk_sndmsg_off = 0;
if ((exthdrlen = rt->dst.header_len) != 0) {
exthdrlen = rt->dst.header_len;
length += exthdrlen;
transhdrlen += exthdrlen;
}
} else {
rt = (struct rtable *)inet->cork.dst;
if (inet->cork.flags & IPCORK_OPT)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册