Skip to content

Commit eb6b9a8

Browse files
Dmitry Kravkovdavem330
authored andcommitted
ip_gre: propogate target device GSO capability to the tunnel device
Signed-off-by: Dmitry Kravkov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent aa0e51c commit eb6b9a8

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

net/ipv4/ip_gre.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,8 +1103,14 @@ static int ipgre_tunnel_bind_dev(struct net_device *dev)
11031103
tunnel->hlen = addend;
11041104
/* TCP offload with GRE SEQ is not supported. */
11051105
if (!(tunnel->parms.o_flags & GRE_SEQ)) {
1106-
dev->features |= NETIF_F_GSO_SOFTWARE;
1107-
dev->hw_features |= NETIF_F_GSO_SOFTWARE;
1106+
/* device supports enc gso offload*/
1107+
if (tdev->hw_enc_features & NETIF_F_GRE_GSO) {
1108+
dev->features |= NETIF_F_TSO;
1109+
dev->hw_features |= NETIF_F_TSO;
1110+
} else {
1111+
dev->features |= NETIF_F_GSO_SOFTWARE;
1112+
dev->hw_features |= NETIF_F_GSO_SOFTWARE;
1113+
}
11081114
}
11091115

11101116
return mtu;

0 commit comments

Comments
 (0)