From: Jesse Gross Date: Wed, 24 Nov 2010 00:46:47 +0000 (-0800) Subject: datapath: Don't set dev->last_rx on kernels >= 2.6.29. X-Git-Tag: v1.1.0~768 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=a5b7d883a873fce2f838d59185e70013afc6987d;p=sliver-openvswitch.git datapath: Don't set dev->last_rx on kernels >= 2.6.29. 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 Acked-by: Ben Pfaff --- diff --git a/datapath/vport-internal_dev.c b/datapath/vport-internal_dev.c index ec0052ca1..527131d11 100644 --- a/datapath/vport-internal_dev.c +++ b/datapath/vport-internal_dev.c @@ -12,6 +12,7 @@ #include #include #include +#include #include "datapath.h" #include "vport-generic.h" @@ -273,7 +274,10 @@ static int internal_dev_recv(struct vport *vport, struct sk_buff *skb) netif_rx(skb); else netif_rx_ni(skb); + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29) netdev->last_rx = jiffies; +#endif return len; }