aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-08-31 03:40:16 -0400
committerDavid S. Miller <davem@davemloft.net>2010-08-31 16:37:06 -0400
commit4dc89133f49b8cfd77ba7e83f5960aed63aaa99e (patch)
tree7629fa72b5a13cbf48d43659bb396984caf7362a /include/linux/netdevice.h
parentba4fd9d8282f7f856f2287fe8be784d1dfdda28b (diff)
net: add a comment on netdev->last_rx
As some driver authors seem to reintroduce dev->last_rx use, add a comment to strongly discourage this. Since commit 6cf3f41e6c0 (bonding, net: Move last_rx update into bonding recv logic), network drivers dont need to update last_rx themselves, unless they use this field to implement a timeout. Not updating last_rx helps not dirtying a cache line, improving performance in SMP. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 0cf9448a32c4..c82220a9f3d5 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -953,7 +953,14 @@ struct net_device {
953/* 953/*
954 * Cache line mostly used on receive path (including eth_type_trans()) 954 * Cache line mostly used on receive path (including eth_type_trans())
955 */ 955 */
956 unsigned long last_rx; /* Time of last Rx */ 956 unsigned long last_rx; /* Time of last Rx
957 * This should not be set in
958 * drivers, unless really needed,
959 * because network stack (bonding)
960 * use it if/when necessary, to
961 * avoid dirtying this cache line.
962 */
963
957 /* Interface address info used in eth_type_trans() */ 964 /* Interface address info used in eth_type_trans() */
958 unsigned char *dev_addr; /* hw address, (before bcast 965 unsigned char *dev_addr; /* hw address, (before bcast
959 because most packets are 966 because most packets are