Skip to content

Commit

Permalink
ip_gre: propogate target device GSO capability to the tunnel device
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dmitry Kravkov authored and David S. Miller committed Feb 19, 2013
1 parent aa0e51c commit eb6b9a8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions net/ipv4/ip_gre.c
Original file line number Diff line number Diff line change
Expand Up @@ -1103,8 +1103,14 @@ static int ipgre_tunnel_bind_dev(struct net_device *dev)
tunnel->hlen = addend;
/* TCP offload with GRE SEQ is not supported. */
if (!(tunnel->parms.o_flags & GRE_SEQ)) {
dev->features |= NETIF_F_GSO_SOFTWARE;
dev->hw_features |= NETIF_F_GSO_SOFTWARE;
/* device supports enc gso offload*/
if (tdev->hw_enc_features & NETIF_F_GRE_GSO) {
dev->features |= NETIF_F_TSO;
dev->hw_features |= NETIF_F_TSO;
} else {
dev->features |= NETIF_F_GSO_SOFTWARE;
dev->hw_features |= NETIF_F_GSO_SOFTWARE;
}
}

return mtu;
Expand Down

0 comments on commit eb6b9a8

Please sign in to comment.