Skip to contentSkip to conversation

: netdev: Rationalize SKB queue mapping.

PATCH In review David Miller 1 participant 1 message Jul 3, 2008

Subsystems (2)
lore
Share & tools
lore

David Miller

author maintainer
#0 lore raw

PATCH 29/39 : netdev: Rationalize SKB queue mapping.

Always set it in dev_pick_tx().

There are two spots that need some adjustments. Namely pktgen (which has a roving queue mapping feature that is not currently handled correctly) and wireless which will need a queue mapping hook that dev_pick_tx() can invoke.

---
 net/core/dev.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
net/core/dev.c +4 -3
index cfda430..8ccf016 100644
@@ -1669,7 +1669,10 @@ out_kfree_skb:
 static struct netdev_queue *dev_pick_tx(struct net_device *dev,
 					struct sk_buff *skb)
 {
-	return netdev_get_tx_queue(dev, 0);
+	u16 queue_index = 0;
+
+	skb_set_queue_mapping(skb, queue_index);
+	return netdev_get_tx_queue(dev, queue_index);
 }
 
 int dev_queue_xmit(struct sk_buff *skb)
@@ -1737,8 +1740,6 @@ gso:
 		spin_lock(&txq->lock);
 		q = txq->qdisc;
 		if (q->enqueue) {
-			/* reset queue_mapping to zero */
-			skb_set_queue_mapping(skb, 0);
 			rc = q->enqueue(skb, q);
 			qdisc_run(txq);
 			spin_unlock(&txq->lock);
Signature · 1 line
1.5.6