With this change, the timestamp variable is only used in ag71xx_check_dma_stuck. Small tx speedup.
Based on a Qualcomm commit. ag->timestamp = jiffies was not replaced with netif_trans_update(dev) because of this quote:
It should be noted that after this series several instances
of netif_trans_update() are useless (if they occur in
.ndo_start_xmit and driver doesn't set LLTX flag -- stack already
did an update).
From: http://lists.openwall.net/netdev/2016/05/03/87
Signed-off-by: Rosen Penev <rosenp@gmail.com>
struct napi_struct napi;
u32 msg_enable;
- unsigned long timestamp;
-
/*
* From this point onwards we're not looking at per-packet fields.
*/
i = (ring->curr + n - 1) & ring_mask;
ring->buf[i].len = skb->len;
ring->buf[i].skb = skb;
- ag->timestamp = jiffies;
netdev_sent_queue(dev, skb->len);
static bool ag71xx_check_dma_stuck(struct ag71xx *ag)
{
+ unsigned long timestamp;
u32 rx_sm, tx_sm, rx_fd;
- if (likely(time_before(jiffies, ag->timestamp + HZ/10)))
+ timestamp = netdev_get_tx_queue(ag->dev, 0)->trans_start;
+ if (likely(time_before(jiffies, timestamp + HZ/10)))
return false;
if (!netif_carrier_ok(ag->dev))