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)
#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;
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;
netif_rx(skb);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
- netdev->last_rx = jiffies;
-#endif
-
return len;
}