[ovs-dev] [PATCH] datapath: Enable tunnel GSO for OVS bridge.

Pravin B Shelar pshelar at nicira.com
Thu Jun 5 00:14:57 UTC 2014


Signed-off-by: Pravin B Shelar <pshelar at nicira.com>
---
 .../linux/compat/include/linux/netdev_features.h     | 20 ++++++++++++++++++++
 datapath/vport-internal_dev.c                        |  5 ++++-
 2 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/datapath/linux/compat/include/linux/netdev_features.h b/datapath/linux/compat/include/linux/netdev_features.h
index 0259413..308d256 100644
--- a/datapath/linux/compat/include/linux/netdev_features.h
+++ b/datapath/linux/compat/include/linux/netdev_features.h
@@ -5,6 +5,26 @@
 #include_next <linux/netdev_features.h>
 #endif
 
+#ifndef NETIF_F_GSO_GRE
+#define NETIF_F_GSO_GRE
+#endif
+
+#ifndef NETIF_F_GSO_IPIP
+#define NETIF_F_GSO_IPIP
+#endif
+
+#ifndef NETIF_F_GSO_SIT
+#define NETIF_F_GSO_SIT
+#endif
+
+#ifndef NETIF_F_GSO_UDP_TUNNEL
+#define NETIF_F_GSO_UDP_TUNNEL
+#endif
+
+#ifndef NETIF_F_GSO_MPLS
+#define NETIF_F_GSO_MPLS
+#endif
+
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
 #define NETIF_F_HW_VLAN_CTAG_TX NETIF_F_HW_VLAN_TX
 #endif
diff --git a/datapath/vport-internal_dev.c b/datapath/vport-internal_dev.c
index 637d712..eb36d33 100644
--- a/datapath/vport-internal_dev.c
+++ b/datapath/vport-internal_dev.c
@@ -155,7 +155,10 @@ static void do_setup(struct net_device *netdev)
 	netdev->tx_queue_len = 0;
 
 	netdev->features = NETIF_F_LLTX | NETIF_F_SG | NETIF_F_FRAGLIST |
-			   NETIF_F_HIGHDMA | NETIF_F_HW_CSUM | NETIF_F_GSO_SOFTWARE;
+			   NETIF_F_HIGHDMA | NETIF_F_HW_CSUM |
+			   NETIF_F_GSO_SOFTWARE | NETIF_F_GSO_GRE |
+			   NETIF_F_GSO_IPIP | NETIF_F_GSO_SIT |
+			   NETIF_F_GSO_UDP_TUNNEL | NETIF_F_GSO_MPLS;
 
 	netdev->vlan_features = netdev->features;
 	netdev->features |= NETIF_F_HW_VLAN_CTAG_TX;
-- 
1.9.3




More information about the dev mailing list