summaryrefslogtreecommitdiff
path: root/include/linux/rtnetlink.h
diff options
context:
space:
mode:
authorKrishna Kumar <krkumar2@in.ibm.com>2009-12-10 10:16:59 +0300
committerDavid S. Miller <davem@davemloft.net>2009-12-24 01:13:29 +0300
commitdef87cf42069a6d4fd42a2ede8f19c620a292568 (patch)
tree1e8e97b452dd95d389feb4f04c0f25b6a9264412 /include/linux/rtnetlink.h
parentafeca340c078e17ca233b3c68c3c3a70c56bfe1d (diff)
downloadlinux-def87cf42069a6d4fd42a2ede8f19c620a292568.tar.xz
tcp: Slightly optimize tcp_sendmsg
Slightly optimize tcp_sendmsg since NETIF_F_SG is used many times iteratively in the loop. The only other modification is to change: } else if (i == MAX_SKB_FRAGS || (!i && !(sk->sk_route_caps & NETIF_F_SG))) { to: } else if (i == MAX_SKB_FRAGS || !sg) { The reason why this change is correct: this code (other than the MAX_SKB_FRAGS case) executes only due to the else part of: "if (skb_tailroom(skb) > 0) {" - i.e. there was no space in the skb to put the data inline. Hence SG is false is a sufficient condition, and there is no way a fragment can be added to the skb. Changelog: - Added the above explanation for the change Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com> Acked-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/rtnetlink.h')
0 files changed, 0 insertions, 0 deletions