summaryrefslogtreecommitdiffstats
path: root/include/net/tcp.h
diff options
context:
space:
mode:
authorKrishna Kumar <krkumar2@in.ibm.com>2009-12-10 08:16:59 +0100
committerDavid S. Miller <davem@davemloft.net>2009-12-23 23:13:29 +0100
commitdef87cf42069a6d4fd42a2ede8f19c620a292568 (patch)
tree1e8e97b452dd95d389feb4f04c0f25b6a9264412 /include/net/tcp.h
parenttcp: Remove unrequired operations in tcp_push() (diff)
downloadlinux-def87cf42069a6d4fd42a2ede8f19c620a292568.tar.xz
linux-def87cf42069a6d4fd42a2ede8f19c620a292568.zip
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/net/tcp.h')
0 files changed, 0 insertions, 0 deletions