From a5b7d883a873fce2f838d59185e70013afc6987d Mon Sep 17 00:00:00 2001 From: Jesse Gross Date: Tue, 23 Nov 2010 16:46:47 -0800 Subject: [PATCH] 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 --- datapath/vport-internal_dev.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/datapath/vport-internal_dev.c b/datapath/vport-internal_dev.c index ec0052ca..527131d1 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; } -- 2.30.2