Signed-off-by: Pravin B Shelar <pshe...@nicira.com> --- 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 -- 7 files changed, 1 insertions(+), 51 deletions(-)
diff --git a/datapath/linux/compat/include/linux/if.h b/datapath/linux/compat/include/linux/if.h index f53cf97..c4c656c 100644 --- a/datapath/linux/compat/include/linux/if.h +++ b/datapath/linux/compat/include/linux/if.h @@ -3,13 +3,6 @@ #include_next <linux/if.h> -#include <linux/version.h> -#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 1dccdea..4193d32 100644 --- a/datapath/linux/compat/include/net/ip.h +++ b/datapath/linux/compat/include/net/ip.h @@ -4,12 +4,6 @@ #include_next <net/ip.h> #include <linux/version.h> -#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 db55ee0..904c0b3 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,12 +56,8 @@ 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 80e980a..3c6e784 100644 --- a/datapath/vport-lisp.c +++ b/datapath/vport-lisp.c @@ -20,7 +20,6 @@ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include <linux/version.h> -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) #include <linux/in.h> #include <linux/ip.h> @@ -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 50373b1..1c2d7c5 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 c614eff..d7dd6b8 100644 --- a/datapath/vport-vxlan.c +++ b/datapath/vport-vxlan.c @@ -20,7 +20,6 @@ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include <linux/version.h> -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) #include <linux/in.h> #include <linux/ip.h> @@ -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 f26beaf..f62201d 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. */ -- 1.7.1 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev