]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net/mlx4_en: Fix endianness bug in IPV6 csum calculation
authorDaniel Jurgens <danielj@mellanox.com>
Wed, 4 May 2016 12:00:33 +0000 (15:00 +0300)
committerDhaval Giani <dhaval.giani@oracle.com>
Fri, 20 Jan 2017 22:22:03 +0000 (17:22 -0500)
commit3ea3c01f65c8dd63da01d317907a537bd6385039
tree88c0d654816bd65f40502a2090816bca72a814d5
parentd694b38257ce8c0f5a8e4620eefc9c578984acd3
net/mlx4_en: Fix endianness bug in IPV6 csum calculation

Orabug: 25308084

[ Upstream commit 82d69203df634b4dfa765c94f60ce9482bcc44d6 ]

Use htons instead of unconditionally byte swapping nexthdr.  On a little
endian systems shifting the byte is correct behavior, but it results in
incorrect csums on big endian architectures.

Fixes: f8c6455bb04b ('net/mlx4_en: Extend checksum offloading by CHECKSUM COMPLETE')
Signed-off-by: Daniel Jurgens <danielj@mellanox.com>
Reviewed-by: Carol Soto <clsoto@us.ibm.com>
Tested-by: Carol Soto <clsoto@us.ibm.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit 8bba1625512245771bdb2cb1502697228fe7e1b2)
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
drivers/net/ethernet/mellanox/mlx4/en_rx.c