• P
    udp6: fix jumbogram reception · cb891fa6
    Paolo Abeni 提交于
    Since commit 67a51780 ("ipv6: udp: leverage scratch area
    helpers") udp6_recvmsg() read the skb len from the scratch area,
    to avoid a cache miss.
    But the UDP6 rx path support RFC 2675 UDPv6 jumbograms, and their
    length exceeds the 16 bits available in the scratch area. As a side
    effect the length returned by recvmsg() is:
    <ingress datagram len> % (1<<16)
    
    This commit addresses the issue allocating one more bit in the
    IP6CB flags field and setting it for incoming jumbograms.
    Such field is still in the first cacheline, so at recvmsg()
    time we can check it and fallback to access skb->len if
    required, without a measurable overhead.
    
    Fixes: 67a51780 ("ipv6: udp: leverage scratch area helpers")
    Signed-off-by: NPaolo Abeni <pabeni@redhat.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    cb891fa6
udp.c 39.6 KB