net: hns3: Fix for geneve tx checksum bug
authorYi Li <yili@winhong.com>
Wed, 26 Aug 2020 05:11:50 +0000 (13:11 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Sep 2020 11:55:33 +0000 (13:55 +0200)
commitc63f823048a7cf67f51ea96518fb9df951642662
tree6213d9db72353e0e7bdbcdf4710c7dd001320497
parent79a1d64700261bf1ebeb90c7da630b4373a9bb14
net: hns3: Fix for geneve tx checksum bug

[ Upstream commit a156998fc92d3859c8e820f1583f6d0541d643c3 ]

when skb->encapsulation is 0, skb->ip_summed is CHECKSUM_PARTIAL
and it is udp packet, which has a dest port as the IANA assigned.
the hardware is expected to do the checksum offload, but the
hardware will not do the checksum offload when udp dest port is
6081.

This patch fixes it by doing the checksum in software.

Reported-by: Li Bing <libing@winhong.com>
Signed-off-by: Yi Li <yili@winhong.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c