net: hns3: fix GRE checksum offload issue
authorJie Wang <wangjie125@huawei.com>
Mon, 18 Sep 2023 07:48:37 +0000 (15:48 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Oct 2023 12:56:40 +0000 (14:56 +0200)
commited6a0b21b6acd8128e10a9553e50b5dec0c18e82
tree75ad4977bd99bc8655aaa721da40c949808f95bc
parent430f18eed1c1b255cc3e51e0820f4cd6f2898827
net: hns3: fix GRE checksum offload issue

[ Upstream commit f9f651261130cdcb7adc9a3e365b356bc2749ab3 ]

The device_version V3 hardware can't offload the checksum for IP in GRE
packets, but can do it for NvGRE. So default to disable the checksum and
GSO offload for GRE, but keep the ability to enable it when only using
NvGRE.

Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC")
Signed-off-by: Jie Wang <wangjie125@huawei.com>
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c