tcp: GSO should be TSQ friendly
authorEric Dumazet <[email protected]>
Fri, 12 Apr 2013 11:31:52 +0000 (11:31 +0000)
committerDavid S. Miller <[email protected]>
Fri, 12 Apr 2013 22:17:06 +0000 (18:17 -0400)
commitd6a4a10411764cf1c3a5dad4f06c5ebe5194488b
tree54d1e4c0c92bc780d9e2f8a822c1c8dc271df70d
parentd14a489a411937fb9420fe2b05168ee9e1e06c9c
tcp: GSO should be TSQ friendly

I noticed that TSQ (TCP Small queues) was less effective when TSO is
turned off, and GSO is on. If BQL is not enabled, TSQ has then no
effect.

It turns out the GSO engine frees the original gso_skb at the time the
fragments are generated and queued to the NIC.

We should instead call the tcp_wfree() destructor for the last fragment,
to keep the flow control as intended in TSQ. This effectively limits
the number of queued packets on qdisc + NIC layers.

Signed-off-by: Eric Dumazet <[email protected]>
Cc: Tom Herbert <[email protected]>
Cc: Yuchung Cheng <[email protected]>
Cc: Nandita Dukkipati <[email protected]>
Cc: Neal Cardwell <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
include/net/tcp.h
net/ipv4/tcp.c
net/ipv4/tcp_output.c