• Jakub Kicinski's avatar
    ipv6: gro: flush instead of assuming different flows on hop_limit mismatch · 6fc2f383
    Jakub Kicinski authored
    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: default avatarJakub Kicinski <kuba@kernel.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    6fc2f383
ip6_offload.c 11 KB