net: Do txq_trans_update() in netdev_start_xmit()
That way we don't have to audit every call site to make sure it is
doing this properly.
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/net/core/dev.c b/net/core/dev.c
index a6077ef..6392ada 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2666,10 +2666,8 @@
skb_len = skb->len;
trace_net_dev_start_xmit(skb, dev);
- rc = netdev_start_xmit(skb, dev);
+ rc = netdev_start_xmit(skb, dev, txq);
trace_net_dev_xmit(skb, rc, dev, skb_len);
- if (rc == NETDEV_TX_OK)
- txq_trans_update(txq);
return rc;
}
@@ -2685,7 +2683,7 @@
skb_len = nskb->len;
trace_net_dev_start_xmit(nskb, dev);
- rc = netdev_start_xmit(nskb, dev);
+ rc = netdev_start_xmit(nskb, dev, txq);
trace_net_dev_xmit(nskb, rc, dev, skb_len);
if (unlikely(rc != NETDEV_TX_OK)) {
if (rc & ~NETDEV_TX_MASK)
@@ -2694,7 +2692,6 @@
skb->next = nskb;
return rc;
}
- txq_trans_update(txq);
if (unlikely(netif_xmit_stopped(txq) && skb->next))
return NETDEV_TX_BUSY;
} while (skb->next);
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 12b1df9..05bc57e 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -91,9 +91,7 @@
skb->vlan_tci = 0;
}
- status = netdev_start_xmit(skb, dev);
- if (status == NETDEV_TX_OK)
- txq_trans_update(txq);
+ status = netdev_start_xmit(skb, dev, txq);
out:
return status;
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index d81b540..34bd2ff 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -3335,11 +3335,10 @@
goto unlock;
}
atomic_inc(&(pkt_dev->skb->users));
- ret = netdev_start_xmit(pkt_dev->skb, odev);
+ ret = netdev_start_xmit(pkt_dev->skb, odev, txq);
switch (ret) {
case NETDEV_TX_OK:
- txq_trans_update(txq);
pkt_dev->last_ok = 1;
pkt_dev->sofar++;
pkt_dev->seq_num++;