summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-08-30 04:07:24 (GMT)
committerDavid S. Miller <davem@davemloft.net>2014-09-02 00:39:55 (GMT)
commit10b3ad8c21bb4b135768c30dd4c51a1c744da699 (patch)
tree02acb0d328818c9216c93b6b46d62717e09cdc61 /include
parentdace1b54726bffe1c009f7661e3cee6b762f30c8 (diff)
downloadlinux-10b3ad8c21bb4b135768c30dd4c51a1c744da699.tar.xz
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netdevice.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 456eb1f..1617180 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -3437,11 +3437,17 @@ static inline netdev_tx_t __netdev_start_xmit(const struct net_device_ops *ops,
return ops->ndo_start_xmit(skb, dev);
}
-static inline netdev_tx_t netdev_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static inline netdev_tx_t netdev_start_xmit(struct sk_buff *skb, struct net_device *dev,
+ struct netdev_queue *txq)
{
const struct net_device_ops *ops = dev->netdev_ops;
+ int rc;
- return __netdev_start_xmit(ops, skb, dev);
+ rc = __netdev_start_xmit(ops, skb, dev);
+ if (rc == NETDEV_TX_OK)
+ txq_trans_update(txq);
+
+ return rc;
}
int netdev_class_create_file_ns(struct class_attribute *class_attr,