aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2014-08-27 11:11:27 +0200
committerDavid S. Miller <davem@davemloft.net>2014-08-29 20:02:07 -0700
commit10c51b56232d24f150e39884a9e749fd99cbc60c (patch)
tree4baa9297a591c45bbb1a148bfc3c9c1822f6ce3a /include/linux/netdevice.h
parentr8169: add missing MODULE_FIRMWARE. (diff)
downloadlinux-dev-10c51b56232d24f150e39884a9e749fd99cbc60c.tar.xz
linux-dev-10c51b56232d24f150e39884a9e749fd99cbc60c.zip
net: add skb_get_tx_queue() helper
Replace occurences of skb_get_queue_mapping() and follow-up netdev_get_tx_queue() with an actual helper function. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> 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 429801370d0c..dfc1d8b8bd0f 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1747,6 +1747,12 @@ struct netdev_queue *netdev_get_tx_queue(const struct net_device *dev,
return &dev->_tx[index];
}
+static inline struct netdev_queue *skb_get_tx_queue(const struct net_device *dev,
+ const struct sk_buff *skb)
+{
+ return netdev_get_tx_queue(dev, skb_get_queue_mapping(skb));
+}
+
static inline void netdev_for_each_tx_queue(struct net_device *dev,
void (*f)(struct net_device *,
struct netdev_queue *,