]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx4_en: Extend checksum offloading by CHECKSUM COMPLETE
authorShani Michaeli <shanim@mellanox.com>
Sun, 9 Nov 2014 11:51:53 +0000 (13:51 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 11 Nov 2014 18:20:02 +0000 (13:20 -0500)
commit88cf0898d76add7146bae2ec5a0ba41a5a4e0047
tree9f4f031bb3a33ea164aa2014294c027c478e1d7e
parent774cc820e15c78b166f163cafcf7f1b3ef6889b8
net/mlx4_en: Extend checksum offloading by CHECKSUM COMPLETE

When processing received traffic, pass CHECKSUM_COMPLETE status to the
stack, with calculated checksum for non TCP/UDP packets (such
as GRE or ICMP).

Although the stack expects checksum which doesn't include the pseudo
header, the HW adds it. To address that, we are subtracting the pseudo
header checksum from the checksum value provided by the HW.

In the IPv6 case, we also compute/add the IP header checksum which
is not added by the HW for such packets.

Cc: Jerry Chu <hkchu@google.com>
Signed-off-by: Shani Michaeli <shanim@mellanox.com>
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
drivers/net/ethernet/mellanox/mlx4/en_netdev.c
drivers/net/ethernet/mellanox/mlx4/en_port.c
drivers/net/ethernet/mellanox/mlx4/en_rx.c
drivers/net/ethernet/mellanox/mlx4/main.c
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
include/linux/mlx4/device.h