From 3dd7c5a4dbb54fb68eeb7acfd0fce1238435b0e7 Mon Sep 17 00:00:00 2001
From: Pravin B Shelar
Date: Tue, 27 Aug 2013 13:24:50 -0700
Subject: [PATCH] datapath: vport: Remove compat support
Signed-off-by: Pravin B Shelar
Acked-by: Jesse Gross
---
datapath/linux/compat/include/linux/if.h | 7 -------
datapath/linux/compat/include/net/ip.h | 6 ------
datapath/vport-internal_dev.c | 13 -------------
datapath/vport-lisp.c | 4 ----
datapath/vport-netdev.c | 16 +---------------
datapath/vport-vxlan.c | 4 ----
datapath/vport.c | 2 --
vswitchd/vswitch.xml | 5 +----
8 files changed, 2 insertions(+), 55 deletions(-)
diff --git a/datapath/linux/compat/include/linux/if.h b/datapath/linux/compat/include/linux/if.h
index f53cf9798..c4c656ce3 100644
--- a/datapath/linux/compat/include/linux/if.h
+++ b/datapath/linux/compat/include/linux/if.h
@@ -3,13 +3,6 @@
#include_next
-#include
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
-
-#define IFF_XMIT_DST_RELEASE 0
-
-#endif /* linux kernel < 2.6.31 */
-
#ifndef IFF_TX_SKB_SHARING
#define IFF_TX_SKB_SHARING 0
#endif
diff --git a/datapath/linux/compat/include/net/ip.h b/datapath/linux/compat/include/net/ip.h
index 1dccdea1a..4193d3290 100644
--- a/datapath/linux/compat/include/net/ip.h
+++ b/datapath/linux/compat/include/net/ip.h
@@ -4,12 +4,6 @@
#include_next
#include
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)
-
-extern int __ip_local_out(struct sk_buff *skb);
-extern int ip_local_out(struct sk_buff *skb);
-
-#endif /* linux kernel < 2.6.25 */
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0)
static inline bool ip_is_fragment(const struct iphdr *iph)
diff --git a/datapath/vport-internal_dev.c b/datapath/vport-internal_dev.c
index db55ee0e5..904c0b32b 100644
--- a/datapath/vport-internal_dev.c
+++ b/datapath/vport-internal_dev.c
@@ -41,9 +41,6 @@
struct internal_dev {
struct vport *vport;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
- struct net_device_stats stats;
-#endif
};
static struct internal_dev *internal_dev_priv(struct net_device *netdev)
@@ -59,11 +56,7 @@ static struct rtnl_link_stats64 *internal_dev_get_stats(struct net_device *netde
#else
static struct net_device_stats *internal_dev_sys_stats(struct net_device *netdev)
{
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
- struct net_device_stats *stats = &internal_dev_priv(netdev)->stats;
-#else
struct net_device_stats *stats = &netdev->stats;
-#endif
#endif
struct vport *vport = ovs_internal_dev_get_vport(netdev);
struct ovs_vport_stats vport_stats;
@@ -187,10 +180,8 @@ static void do_setup(struct net_device *netdev)
netdev->features = NETIF_F_LLTX | NETIF_F_SG | NETIF_F_FRAGLIST |
NETIF_F_HIGHDMA | NETIF_F_HW_CSUM | NETIF_F_TSO;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
netdev->vlan_features = netdev->features;
netdev->features |= NETIF_F_HW_VLAN_CTAG_TX;
-#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)
netdev->hw_features = netdev->features & ~NETIF_F_LLTX;
@@ -287,10 +278,6 @@ static int internal_dev_recv(struct vport *vport, struct sk_buff *skb)
netif_rx(skb);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
- netdev->last_rx = jiffies;
-#endif
-
return len;
}
diff --git a/datapath/vport-lisp.c b/datapath/vport-lisp.c
index 80e980a22..3c6e78469 100644
--- a/datapath/vport-lisp.c
+++ b/datapath/vport-lisp.c
@@ -20,7 +20,6 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
#include
#include
@@ -646,6 +645,3 @@ const struct vport_ops ovs_lisp_vport_ops = {
.get_options = lisp_get_options,
.send = lisp_tnl_send,
};
-#else
-#warning LISP tunneling will not be available on kernels before 2.6.26
-#endif /* Linux kernel < 2.6.26 */
diff --git a/datapath/vport-netdev.c b/datapath/vport-netdev.c
index 50373b1ab..1c2d7c5e3 100644
--- a/datapath/vport-netdev.c
+++ b/datapath/vport-netdev.c
@@ -80,7 +80,7 @@ static struct sk_buff *netdev_frame_hook(struct sk_buff *skb)
return NULL;
}
-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)
/*
* Used as br_handle_frame_hook. (Cannot run bridge at the same time, even on
* different set of devices!)
@@ -92,17 +92,6 @@ static struct sk_buff *netdev_frame_hook(struct net_bridge_port *p,
netdev_port_receive((struct vport *)p, skb);
return NULL;
}
-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-/*
- * Used as br_handle_frame_hook. (Cannot run bridge at the same time, even on
- * different set of devices!)
- */
-/* Called with rcu_read_lock and bottom-halves disabled. */
-static int netdev_frame_hook(struct net_bridge_port *p, struct sk_buff **pskb)
-{
- netdev_port_receive((struct vport *)p, *pskb);
- return 1;
-}
#else
#error
#endif
@@ -186,9 +175,6 @@ static struct vport *netdev_create(const struct vport_parms *parms)
goto error_master_upper_dev_unlink;
dev_set_promiscuity(netdev_vport->dev, 1);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
- dev_disable_lro(netdev_vport->dev);
-#endif
netdev_vport->dev->priv_flags |= IFF_OVS_DATAPATH;
rtnl_unlock();
diff --git a/datapath/vport-vxlan.c b/datapath/vport-vxlan.c
index c614eff39..d7dd6b8f4 100644
--- a/datapath/vport-vxlan.c
+++ b/datapath/vport-vxlan.c
@@ -20,7 +20,6 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
#include
#include
@@ -206,6 +205,3 @@ const struct vport_ops ovs_vxlan_vport_ops = {
.get_options = vxlan_get_options,
.send = vxlan_tnl_send,
};
-#else
-#warning VXLAN tunneling will not be available on kernels before 2.6.26
-#endif /* Linux kernel < 2.6.26 */
diff --git a/datapath/vport.c b/datapath/vport.c
index f26beaf5e..f62201d82 100644
--- a/datapath/vport.c
+++ b/datapath/vport.c
@@ -44,10 +44,8 @@ static const struct vport_ops *vport_ops_list[] = {
&ovs_gre_vport_ops,
&ovs_gre64_vport_ops,
#endif
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
&ovs_vxlan_vport_ops,
&ovs_lisp_vport_ops,
-#endif
};
/* Protected by RCU read lock for reading, ovs_mutex for writing. */
diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml
index e62594097..9a48eb10f 100644
--- a/vswitchd/vswitch.xml
+++ b/vswitchd/vswitch.xml
@@ -1341,8 +1341,6 @@
An Ethernet tunnel over the experimental, UDP-based VXLAN
protocol described at
http://tools.ietf.org/html/draft-mahalingam-dutt-dcops-vxlan-03
.
- VXLAN is currently supported only with the Linux kernel datapath
- with kernel version 2.6.26 or later.
Open vSwitch uses UDP destination port 4789. The source port used for
@@ -1354,8 +1352,7 @@
lisp
A layer 3 tunnel over the experimental, UDP-based Locator/ID
- Separation Protocol (RFC 6830). LISP is currently supported only
- with the Linux kernel datapath with kernel version 2.6.26 or later.
+ Separation Protocol (RFC 6830).
patch
--
2.20.1