]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.19/net-ipvlan-fix-ipvlan-device-tso-disabled-while-neti.patch
fixes for 4.19
[thirdparty/kernel/stable-queue.git] / queue-4.19 / net-ipvlan-fix-ipvlan-device-tso-disabled-while-neti.patch
1 From fd229152455d516eff6f05d5cba929eb66e68db1 Mon Sep 17 00:00:00 2001
2 From: Miaohe Lin <linmiaohe@huawei.com>
3 Date: Tue, 4 Jun 2019 06:07:34 +0000
4 Subject: net: ipvlan: Fix ipvlan device tso disabled while NETIF_F_IP_CSUM is
5 set
6
7 [ Upstream commit ceae266bf0ae6564ac16d086bf749a096fa90ded ]
8
9 There's some NICs, such as hinic, with NETIF_F_IP_CSUM and NETIF_F_TSO
10 on but NETIF_F_HW_CSUM off. And ipvlan device features will be
11 NETIF_F_TSO on with NETIF_F_IP_CSUM and NETIF_F_IP_CSUM both off as
12 IPVLAN_FEATURES only care about NETIF_F_HW_CSUM. So TSO will be
13 disabled in netdev_fix_features.
14 For example:
15 Features for enp129s0f0:
16 rx-checksumming: on
17 tx-checksumming: on
18 tx-checksum-ipv4: on
19 tx-checksum-ip-generic: off [fixed]
20 tx-checksum-ipv6: on
21
22 Fixes: a188222b6ed2 ("net: Rename NETIF_F_ALL_CSUM to NETIF_F_CSUM_MASK")
23 Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
24 Signed-off-by: David S. Miller <davem@davemloft.net>
25 Signed-off-by: Sasha Levin <sashal@kernel.org>
26 ---
27 drivers/net/ipvlan/ipvlan_main.c | 2 +-
28 1 file changed, 1 insertion(+), 1 deletion(-)
29
30 diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c
31 index 68b8007da82b..0115a2868933 100644
32 --- a/drivers/net/ipvlan/ipvlan_main.c
33 +++ b/drivers/net/ipvlan/ipvlan_main.c
34 @@ -178,7 +178,7 @@ static void ipvlan_port_destroy(struct net_device *dev)
35 }
36
37 #define IPVLAN_FEATURES \
38 - (NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_HIGHDMA | NETIF_F_FRAGLIST | \
39 + (NETIF_F_SG | NETIF_F_CSUM_MASK | NETIF_F_HIGHDMA | NETIF_F_FRAGLIST | \
40 NETIF_F_GSO | NETIF_F_TSO | NETIF_F_GSO_ROBUST | \
41 NETIF_F_TSO_ECN | NETIF_F_TSO6 | NETIF_F_GRO | NETIF_F_RXCSUM | \
42 NETIF_F_HW_VLAN_CTAG_FILTER | NETIF_F_HW_VLAN_STAG_FILTER)
43 --
44 2.20.1
45