]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
vtnet: fix TSO for TCP/IPv6
authorMichael Tuexen <tuexen@FreeBSD.org>
Thu, 18 Mar 2021 20:25:47 +0000 (21:25 +0100)
committerMichael Tuexen <tuexen@FreeBSD.org>
Thu, 18 Mar 2021 20:35:49 +0000 (21:35 +0100)
commit11660fa28fd39a644cb7d30a4378cf4751b89f15
tree0ca7ab8318e6080882ee3d0ee89c784f68c3ba30
parentfaa41af1fed350327cc542cb240ca2c6e1e8ba0c
vtnet: fix TSO for TCP/IPv6

The decision whether a TCP packet is sent over IPv4 or IPv6 was
based on ethertype, which works correctly. In D27926 the criteria
was changed to checking if the CSUM_IP_TSO flag is set in the
csum-flags and then considering it to be TCP/IPv4.
However, the TCP stack sets the flag to CSUM_TSO for IPv4 and IPv6,
where CSUM_TSO is defined as CSUM_IP_TSO|CSUM_IP6_TSO.
Therefore TCP/IPv6 packets gets mis-classified as TCP/IPv4,
which breaks TSO for TCP/IPv6.
This patch bases the check again on the ethertype.
This fix is instantly MFCed.

Approved by: re(gjb)
PR: 254366
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D29331

(cherry picked from commit d4697a6b56168876fc0ffec1a0bb1b24d25b198e)
(cherry picked from commit 6064ea8172f078c54954bc6e8865625feb7979fe)
sys/dev/virtio/network/if_vtnet.c