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>
This commit is contained in:
Daniel Borkmann
2014-08-27 11:11:27 +02:00
committed by David S. Miller
parent a3bf5c429e
commit 10c51b5623
5 changed files with 13 additions and 9 deletions

View File

@@ -115,7 +115,7 @@ static void queue_process(struct work_struct *work)
continue;
}
txq = netdev_get_tx_queue(dev, skb_get_queue_mapping(skb));
txq = skb_get_tx_queue(dev, skb);
local_irq_save(flags);
HARD_TX_LOCK(dev, txq, smp_processor_id());

View File

@@ -3286,7 +3286,6 @@ static void pktgen_xmit(struct pktgen_dev *pkt_dev)
{
struct net_device *odev = pkt_dev->odev;
struct netdev_queue *txq;
u16 queue_map;
int ret;
/* If device is offline, then don't send */
@@ -3324,8 +3323,7 @@ static void pktgen_xmit(struct pktgen_dev *pkt_dev)
if (pkt_dev->delay && pkt_dev->last_ok)
spin(pkt_dev, pkt_dev->next_tx);
queue_map = skb_get_queue_mapping(pkt_dev->skb);
txq = netdev_get_tx_queue(odev, queue_map);
txq = skb_get_tx_queue(odev, pkt_dev->skb);
local_bh_disable();