* [net-next-2.6 PATCH] ixgbe: move TC_PRIO_CONTROL check into ixgbe_select_queue()
@ 2010-02-27 0:21 Jeff Kirsher
2010-02-27 11:28 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Jeff Kirsher @ 2010-02-27 0:21 UTC (permalink / raw)
To: davem; +Cc: netdev, gospo, John Fastabend, Peter P Waskiewicz Jr,
Jeff Kirsher
From: John Fastabend <john.r.fastabend@intel.com>
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>
---
drivers/net/ixgbe/ixgbe_main.c | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index a961da2..45e3532 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];
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [net-next-2.6 PATCH] ixgbe: move TC_PRIO_CONTROL check into ixgbe_select_queue()
2010-02-27 0:21 [net-next-2.6 PATCH] ixgbe: move TC_PRIO_CONTROL check into ixgbe_select_queue() Jeff Kirsher
@ 2010-02-27 11:28 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-02-27 11:28 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, john.r.fastabend, peter.p.waskiewicz.jr
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Fri, 26 Feb 2010 16:21:36 -0800
> From: John Fastabend <john.r.fastabend@intel.com>
>
> 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>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-02-27 11:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-27 0:21 [net-next-2.6 PATCH] ixgbe: move TC_PRIO_CONTROL check into ixgbe_select_queue() Jeff Kirsher
2010-02-27 11:28 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).