]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx4_en: don't set CHECKSUM_COMPLETE on SCTP packets
authorDavide Caratti <dcaratti@redhat.com>
Thu, 3 Aug 2017 20:54:48 +0000 (22:54 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Aug 2017 00:59:57 +0000 (17:59 -0700)
commitf5bee5b2960a78a174ca3fc212c3cb31378e8341
tree44a5a7ef50e0b595c18bcfa766737b3dd962feb1
parentdcb6b21bbd19528bc61c8bcacf9c9b1cbbdc952b
net/mlx4_en: don't set CHECKSUM_COMPLETE on SCTP packets

if the NIC fails to validate the checksum on TCP/UDP, and validation of IP
checksum is successful, the driver subtracts the pseudo-header checksum
from the value obtained by the hardware and sets CHECKSUM_COMPLETE. Don't
do that if protocol is IPPROTO_SCTP, otherwise CRC32c validation fails.

V2: don't test MLX4_CQE_STATUS_IPV6 if MLX4_CQE_STATUS_IPV4 is set

Reported-by: Shuang Li <shuali@redhat.com>
Fixes: 88cf0898d76a ("net/mlx4_en: Extend checksum offloading by CHECKSUM COMPLETE")
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Acked-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_rx.c