提交 ba162f8e 编写于 作者: F Florian Westphal 提交者: David S. Miller

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: NFlorian Westphal <fw@strlen.de>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 4d0e9657
...@@ -3481,6 +3481,12 @@ static inline void txq_trans_update(struct netdev_queue *txq) ...@@ -3481,6 +3481,12 @@ static inline void txq_trans_update(struct netdev_queue *txq)
txq->trans_start = jiffies; txq->trans_start = jiffies;
} }
/* legacy drivers only, netdev_start_xmit() sets txq->trans_start */
static inline void netif_trans_update(struct net_device *dev)
{
dev->trans_start = jiffies;
}
/** /**
* netif_tx_lock - grab network device transmit lock * netif_tx_lock - grab network device transmit lock
* @dev: network device * @dev: network device
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册