aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJohn Fastabend <john.r.fastabend@intel.com>2010-02-27 06:28:24 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-27 06:28:24 -0500
commit2ea186ae533c7b4f4c56811b69d3e40a6209a9c0 (patch)
treec3d17233ec49eda1f49c4bcfc236e28f954f07fe /drivers/net
parentda3f5cf1f8ebb0fab5c5fd09adb189166594ad6c (diff)
ixgbe: move TC_PRIO_CONTROL check into ixgbe_select_queue()
Move TC_PRIO_CONTROL check and queue remapping into ixgbe_select_queue(). Remapping queues after the qdisc can result in the wrong qdisc queue being stopped with netif_stop_subqueue(). Even if this is resolved and the correct queue is stopped it can result in a queue being blocked by TC_PRIO_CONTROL frames uneccesarily. Moving this into the select_queue routine maintains alignment between tx_rings and qdisc queues. Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index a961da2f98c0..45e3532b166f 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -5639,8 +5639,14 @@ static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb)
5639 return txq; 5639 return txq;
5640 } 5640 }
5641#endif 5641#endif
5642 if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) 5642 if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
5643 return (skb->vlan_tci & IXGBE_TX_FLAGS_VLAN_PRIO_MASK) >> 13; 5643 if (skb->priority == TC_PRIO_CONTROL)
5644 txq = adapter->ring_feature[RING_F_DCB].indices-1;
5645 else
5646 txq = (skb->vlan_tci & IXGBE_TX_FLAGS_VLAN_PRIO_MASK)
5647 >> 13;
5648 return txq;
5649 }
5644 5650
5645 return skb_tx_hash(dev, skb); 5651 return skb_tx_hash(dev, skb);
5646} 5652}
@@ -5667,14 +5673,9 @@ static netdev_tx_t ixgbe_xmit_frame(struct sk_buff *skb,
5667 tx_flags <<= IXGBE_TX_FLAGS_VLAN_SHIFT; 5673 tx_flags <<= IXGBE_TX_FLAGS_VLAN_SHIFT;
5668 tx_flags |= IXGBE_TX_FLAGS_VLAN; 5674 tx_flags |= IXGBE_TX_FLAGS_VLAN;
5669 } else if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) { 5675 } else if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
5670 if (skb->priority != TC_PRIO_CONTROL) { 5676 tx_flags |= ((skb->queue_mapping & 0x7) << 13);
5671 tx_flags |= ((skb->queue_mapping & 0x7) << 13); 5677 tx_flags <<= IXGBE_TX_FLAGS_VLAN_SHIFT;
5672 tx_flags <<= IXGBE_TX_FLAGS_VLAN_SHIFT; 5678 tx_flags |= IXGBE_TX_FLAGS_VLAN;
5673 tx_flags |= IXGBE_TX_FLAGS_VLAN;
5674 } else {
5675 skb->queue_mapping =
5676 adapter->ring_feature[RING_F_DCB].indices-1;
5677 }
5678 } 5679 }
5679 5680
5680 tx_ring = adapter->tx_ring[skb->queue_mapping]; 5681 tx_ring = adapter->tx_ring[skb->queue_mapping];