]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Rx, Fixup skb checksum for packets with tail padding
authorSaeed Mahameed <saeedm@mellanox.com>
Tue, 12 Mar 2019 07:24:52 +0000 (00:24 -0700)
committerSaeed Mahameed <saeedm@mellanox.com>
Tue, 9 Apr 2019 19:33:50 +0000 (12:33 -0700)
commit972aed80157d437606dcdf84faff651f18c6ba29
tree95648030d96c8e9a4dc0c47152dbe8b3b3381853
parentd4559eafc8d42db784ec917cb1df73f37ef9585f
net/mlx5e: Rx, Fixup skb checksum for packets with tail padding

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: 7943627623eb ("net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends"),
Cc: Eric Dumazet <edumazet@google.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
drivers/net/ethernet/mellanox/mlx5/core/en_stats.h