]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: remove the sk_can_gso() check from tcp_set_skb_tso_segs()
authorEric Dumazet <edumazet@google.com>
Tue, 15 Oct 2013 19:24:54 +0000 (12:24 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 Oct 2013 20:08:08 +0000 (16:08 -0400)
commitf9368fa1e1295fc39560f98fa8b0d08f4fc49bcf
tree0b27f1be92b9291d8a618a2b79f97aa30a60ac20
parentb168da6e2fd043fbb7dd9e861c475f07ed95d340
tcp: remove the sk_can_gso() check from tcp_set_skb_tso_segs()

sk_can_gso() should only be used as a hint in tcp_sendmsg() to build GSO
packets in the first place. (As a performance hint)

Once we have GSO packets in write queue, we can not decide they are no
longer GSO only because flow now uses a route which doesn't handle
TSO/GSO.

Core networking stack handles the case very well for us, all we need
is keeping track of packet counts in MSS terms, regardless of
segmentation done later (in GSO or hardware)

Right now, if  tcp_fragment() splits a GSO packet in two parts,
@left and @right, and route changed through a non GSO device,
both @left and @right have pcount set to 1, which is wrong,
and leads to incorrect packet_count tracking.

This problem was added in commit 23486a56d0 ("[TCP]: skb pcount with MTU
discovery")

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