]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: gro: flush instead of assuming different flows on hop_limit mismatch
authorJakub Kicinski <kuba@kernel.org>
Tue, 25 Jan 2022 04:44:44 +0000 (20:44 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Jan 2022 13:05:11 +0000 (13:05 +0000)
commit7f510730634a6408708bca6a43f799aa1560122f
treee077ef05f168076713ff4fd8ecc1b111fc8605db
parent931fa9d8f37884c0d11c968541c83e8e5abcb5d5
ipv6: gro: flush instead of assuming different flows on hop_limit mismatch

IPv6 GRO considers packets to belong to different flows when their
hop_limit is different. This seems counter-intuitive, the flow is
the same. hop_limit may vary because of various bugs or hacks but
that doesn't mean it's okay for GRO to reorder packets.

Practical impact of this problem on overall TCP performance
is unclear, but TCP itself detects this reordering and bumps
TCPSACKReorder resulting in user complaints.

Eric warns that there may be performance regressions in setups
which do packet spraying across links with similar RTT but different
hop count. To be safe let's target -next and not treat this
as a fix. If the packet spraying is using flow label there should
be no difference in behavior as flow label is checked first.

Note that the code plays an easy to miss trick by upcasting next_hdr
to a u16 pointer and compares next_hdr and hop_limit in one go.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_offload.c