]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
net/mlx4_en: Fix endianness bug in IPV6 csum calculation
authorDaniel Jurgens <danielj@mellanox.com>
Mon, 9 May 2016 08:09:18 +0000 (11:09 +0300)
committerKamal Mostafa <kamal@canonical.com>
Mon, 16 May 2016 17:27:27 +0000 (10:27 -0700)
commitd1476528d916d7b6926e5faf174ba1eb50174296
treea385c67f29b8f8083df66efb63d75525a5363566
parent18a5e1bbf47f96d4348d03aad682344c1f3aeaac
net/mlx4_en: Fix endianness bug in IPV6 csum calculation

BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1544978
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>
(cherry picked from commit 82d69203df634b4dfa765c94f60ce9482bcc44d6)
Signed-off-by: Talat Batheesh <talatb@mellanox.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Christopher Arges <chris.j.arges@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
drivers/net/ethernet/mellanox/mlx4/en_rx.c