]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: gso: do not generate out of order packets
authorEric Dumazet <edumazet@google.com>
Wed, 15 May 2013 15:38:01 +0000 (15:38 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 16 May 2013 21:43:40 +0000 (14:43 -0700)
commita1c914392b6508b30dc3f41d75c05cd2f877c553
treecf3a50a628e14fe105a04050823e3051aebf92f3
parent4d1bae42d1cad6429ac0ef34cd511682bb5c7b6d
tcp: gso: do not generate out of order packets

GSO TCP handler has following issues :

1) ooo_okay from original GSO packet is duplicated to all segments
2) segments (but the last one) are orphaned, so transmit path can not
get transmit queue number from the socket. This happens if GSO
segmentation is done before stacked device for example.

Result is we can send packets from a given TCP flow to different TX
queues (if using multiqueue NICS). This generates OOO problems and
spurious SACK & retransmits.

Fix this by keeping socket pointer set for all segments.

This means that every segment must also have a destructor, and the
original gso skb truesize must be split on all segments, to keep
precise sk->sk_wmem_alloc accounting.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Maciej Żenczykowski <maze@google.com>
Cc: Tom Herbert <therbert@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp.c