/*
- * Copyright (c) 2009 Nicira Networks.
+ * Copyright (c) 2009, 2010 Nicira Networks.
* Distributed under the terms of the GNU GPL version 2.
*
* Significant portions of this file may be copied from parts of the Linux
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/ethtool.h>
+#include <linux/preempt.h>
#include <linux/rcupdate.h>
#include <linux/skbuff.h>
#include <linux/workqueue.h>
else
netif_rx_ni(skb);
netdev->last_rx = jiffies;
+
+ preempt_disable();
lb_stats = per_cpu_ptr(dp_dev->lstats, smp_processor_id());
lb_stats->rx_packets++;
lb_stats->rx_bytes += len;
+ preempt_enable();
+
return len;
}
netdev->dev_addr[1] = 0x23;
netdev->dev_addr[2] = 0x20;
- /* Set the top bits to indicate random Nicira address. */
- netdev->dev_addr[3] |= 0xc0;
+ /* Set the top bit to indicate random Nicira address. */
+ netdev->dev_addr[3] |= 0x80;
}
/* Create a datapath device associated with 'dp'. If 'dp_name' is null,