• Eric Dumazet's avatar
    net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends · 88078d98
    Eric Dumazet authored
    After working on IP defragmentation lately, I found that some large
    packets defeat CHECKSUM_COMPLETE optimization because of NIC adding
    zero paddings on the last (small) fragment.
    
    While removing the padding with pskb_trim_rcsum(), we set skb->ip_summed
    to CHECKSUM_NONE, forcing a full csum validation, even if all prior
    fragments had CHECKSUM_COMPLETE set.
    
    We can instead compute the checksum of the part we are trimming,
    usually smaller than the part we keep.
    Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    88078d98
skbuff.c 137 KB