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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Aug 2017 02:31:22 +0000 (19:31 -0700)
commit35d90144e2ceb19a8c649fd1422d507eac946893
tree17adf93f542cf4cef13ba52507fde0bb322340d5
parent1b582a2c366da54463e3dc97360751f21fa46453
net/mlx4_en: don't set CHECKSUM_COMPLETE on SCTP packets

[ Upstream commit e718fe450e616227b74d27a233cdf37b4df0c82b ]

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: f8c6455bb04b ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx4/en_rx.c