diff options
author | Daniel Borkmann <dborkman@redhat.com> | 2014-08-27 11:11:27 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-08-29 20:02:07 -0700 |
commit | 10c51b56232d24f150e39884a9e749fd99cbc60c (patch) | |
tree | 4baa9297a591c45bbb1a148bfc3c9c1822f6ce3a /net/sched/sch_generic.c | |
parent | a3bf5c429eb5f5ec4d364d51dfa8855efcc005f8 (diff) | |
download | linux-10c51b56232d24f150e39884a9e749fd99cbc60c.tar.gz linux-10c51b56232d24f150e39884a9e749fd99cbc60c.tar.bz2 linux-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 'net/sched/sch_generic.c')
-rw-r--r-- | net/sched/sch_generic.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index fc04fe93c2da..05b3f5d104af 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c @@ -63,7 +63,7 @@ static inline struct sk_buff *dequeue_skb(struct Qdisc *q) if (unlikely(skb)) { /* check the reason of requeuing without tx lock first */ - txq = netdev_get_tx_queue(txq->dev, skb_get_queue_mapping(skb)); + txq = skb_get_tx_queue(txq->dev, skb); if (!netif_xmit_frozen_or_stopped(txq)) { q->gso_skb = NULL; q->q.qlen--; @@ -183,10 +183,12 @@ static inline int qdisc_restart(struct Qdisc *q) skb = dequeue_skb(q); if (unlikely(!skb)) return 0; + WARN_ON_ONCE(skb_dst_is_noref(skb)); + root_lock = qdisc_lock(q); dev = qdisc_dev(q); - txq = netdev_get_tx_queue(dev, skb_get_queue_mapping(skb)); + txq = skb_get_tx_queue(dev, skb); return sch_direct_xmit(skb, q, dev, txq, root_lock); } |