Page MenuHomeFreeBSD

Fix TSO for TCP/IPv6
ClosedPublic

Authored by tuexen on Mar 18 2021, 7:59 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 11 2024, 1:48 AM
Unknown Object (File)
Jan 15 2024, 7:22 AM
Unknown Object (File)
Dec 20 2023, 3:29 PM
Unknown Object (File)
Dec 20 2023, 7:12 AM
Unknown Object (File)
Dec 14 2023, 10:45 PM
Unknown Object (File)
Oct 29 2023, 1:26 AM
Unknown Object (File)
Oct 11 2023, 7:13 AM
Unknown Object (File)
Sep 5 2023, 9:34 AM
Subscribers
None

Details

Summary

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 fixes the bug reported in PR254366.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

tuexen created this revision.
This revision was not accepted when it landed; it landed in state Needs Review.Mar 18 2021, 8:33 PM
This revision was automatically updated to reflect the committed changes.