aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2016-05-03 10:31:00 -0400
committerDavid S. Miller <davem@davemloft.net>2016-05-04 14:16:48 -0400
commitba162f8eed61a7e71e26455ce1cff5b5898a3579 (patch)
tree40195ab3c626cdd68034123f7b70bd4be9104da1 /include/linux/netdevice.h
parent4d0e965732db6f7cce78e6b8f5d3073249004c3a (diff)
netdevice: add helper to update trans_start
trans_start exists twice: - as member of net_device (legacy) - as member of netdev_queue In order to get rid of the legacy case, add a helper for the dev->trans_update (this patch), then convert spots that do dev->trans_start = jiffies to use this helper (next patch). This would then allow us to change the helper so that it updates the trans_stamp of netdev queue 0 instead. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index bcf012637d10..f53412cccbaa 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -3481,6 +3481,12 @@ static inline void txq_trans_update(struct netdev_queue *txq)
3481 txq->trans_start = jiffies; 3481 txq->trans_start = jiffies;
3482} 3482}
3483 3483
3484/* legacy drivers only, netdev_start_xmit() sets txq->trans_start */
3485static inline void netif_trans_update(struct net_device *dev)
3486{
3487 dev->trans_start = jiffies;
3488}
3489
3484/** 3490/**
3485 * netif_tx_lock - grab network device transmit lock 3491 * netif_tx_lock - grab network device transmit lock
3486 * @dev: network device 3492 * @dev: network device