• Saeed Mahameed's avatar
    net/mlx5e: Rx, Fixup skb checksum for packets with tail padding · 0aa1d186
    Saeed Mahameed authored
    When an ethernet frame with ip payload is padded, the padding octets are
    not covered by the hardware checksum.
    
    Prior to the cited commit, skb checksum was forced to be CHECKSUM_NONE
    when padding is detected. After it, the kernel will try to trim the
    padding bytes and subtract their checksum from skb->csum.
    
    In this patch we fixup skb->csum for any ip packet with tail padding of
    any size, if any padding found.
    FCS case is just one special case of this general purpose patch, hence,
    it is removed.
    
    Fixes: 88078d98 ("net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends"),
    Cc: Eric Dumazet <edumazet@google.com>
    Reviewed-by: default avatarTariq Toukan <tariqt@mellanox.com>
    Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
    0aa1d186
en_stats.h 7.89 KB