mirror of
https://github.com/openvswitch/ovs
synced 2025-10-15 14:17:18 +00:00
datapath: vport: Remove compat support
Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
This commit is contained in:
@@ -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
|
||||
|
@@ -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)
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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 */
|
||||
|
@@ -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();
|
||||
|
||||
|
@@ -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 */
|
||||
|
@@ -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. */
|
||||
|
@@ -1341,8 +1341,6 @@
|
||||
An Ethernet tunnel over the experimental, UDP-based VXLAN
|
||||
protocol described at
|
||||
<code>http://tools.ietf.org/html/draft-mahalingam-dutt-dcops-vxlan-03</code>.
|
||||
VXLAN is currently supported only with the Linux kernel datapath
|
||||
with kernel version 2.6.26 or later.
|
||||
</p>
|
||||
<p>
|
||||
Open vSwitch uses UDP destination port 4789. The source port used for
|
||||
@@ -1354,8 +1352,7 @@
|
||||
<dt><code>lisp</code></dt>
|
||||
<dd>
|
||||
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).
|
||||
</dd>
|
||||
|
||||
<dt><code>patch</code></dt>
|
||||
|
Reference in New Issue
Block a user