#include "vport-netdev.h"
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37) && \
- !defined(HAVE_VLAN_BUG_WORKAROUND)
+ !defined(HAVE_VLAN_BUG_WORKAROUND)
#include <linux/module.h>
-static int vlan_tso __read_mostly = 0;
+static int vlan_tso __read_mostly;
module_param(vlan_tso, int, 0644);
MODULE_PARM_DESC(vlan_tso, "Enable TSO for VLAN packets");
#else
struct netdev_vport *netdev_vport;
int err;
- vport = vport_alloc(sizeof(struct netdev_vport), &netdev_vport_ops, parms);
+ vport = vport_alloc(sizeof(struct netdev_vport),
+ &netdev_vport_ops, parms);
if (IS_ERR(vport)) {
err = PTR_ERR(vport);
goto error;
vport_receive(vport, skb);
}
-static inline unsigned packet_length(const struct sk_buff *skb)
+static unsigned packet_length(const struct sk_buff *skb)
{
unsigned length = skb->len - ETH_HLEN;
/* Returns null if this device is not attached to a datapath. */
struct vport *netdev_get_vport(struct net_device *dev)
{
-#ifdef IFF_BRIDGE_PORT
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
#if IFF_BRIDGE_PORT != IFF_OVS_DATAPATH
if (likely(dev->priv_flags & IFF_OVS_DATAPATH))
#else
- if (likely(rcu_access_pointer(dev->rx_handler) == netdev_frame_hook))
+ if (likely(rcu_access_pointer(dev->rx_handler) == netdev_frame_hook))
#endif
return (struct vport *)rcu_dereference_rtnl(dev->rx_handler_data);
else