dev->last_rx is used for rebalancing in Linux bonding. However,
on a SMP machine it quickly becomes a very hot cacheline. On
kernels 2.6.29 and later the networking core will update last_rx
only if bonding is in use, so drivers do not need to set it at all.
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
#include <linux/ethtool.h>
#include <linux/rcupdate.h>
#include <linux/skbuff.h>
+#include <linux/version.h>
#include "datapath.h"
#include "vport-generic.h"
netif_rx(skb);
else
netif_rx_ni(skb);
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
netdev->last_rx = jiffies;
+#endif
return len;
}