From: John Fastabend Date: Sat, 27 Feb 2010 11:28:24 +0000 (-0800) Subject: ixgbe: move TC_PRIO_CONTROL check into ixgbe_select_queue() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2ea186ae533c7b4f4c56811b69d3e40a6209a9c0;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git 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 Acked-by: Peter P Waskiewicz Jr Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller --- 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) return txq; } #endif - if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) - return (skb->vlan_tci & IXGBE_TX_FLAGS_VLAN_PRIO_MASK) >> 13; + if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) { + if (skb->priority == TC_PRIO_CONTROL) + txq = adapter->ring_feature[RING_F_DCB].indices-1; + else + txq = (skb->vlan_tci & IXGBE_TX_FLAGS_VLAN_PRIO_MASK) + >> 13; + return txq; + } return skb_tx_hash(dev, skb); } @@ -5667,14 +5673,9 @@ static netdev_tx_t ixgbe_xmit_frame(struct sk_buff *skb, tx_flags <<= IXGBE_TX_FLAGS_VLAN_SHIFT; tx_flags |= IXGBE_TX_FLAGS_VLAN; } else if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) { - if (skb->priority != TC_PRIO_CONTROL) { - tx_flags |= ((skb->queue_mapping & 0x7) << 13); - tx_flags <<= IXGBE_TX_FLAGS_VLAN_SHIFT; - tx_flags |= IXGBE_TX_FLAGS_VLAN; - } else { - skb->queue_mapping = - adapter->ring_feature[RING_F_DCB].indices-1; - } + tx_flags |= ((skb->queue_mapping & 0x7) << 13); + tx_flags <<= IXGBE_TX_FLAGS_VLAN_SHIFT; + tx_flags |= IXGBE_TX_FLAGS_VLAN; } tx_ring = adapter->tx_ring[skb->queue_mapping];