diff mbox

[net-2.6] ixgbe: allow vlan egress priority mapping in DCB mode

Message ID 20090805012726.24350.63928.stgit@localhost.localdomain
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Kirsher, Jeffrey T Aug. 5, 2009, 1:27 a.m. UTC
From: Lucy Liu <lucy.liu@intel.com>

The skb priority to vlan-qos egress mapping that can be configured using
set_egress_map with vconfig is overriden by the DCB code in the driver.

This patch allows this existing mechanism to work and will increase the
configuration flexibility of DCB mode on Linux.

A hierarchy of configuration is:

1. Modifies the ixgbe_select_queue() routine for DCB mode to return the
priority value from the VLAN tag. It will normally be zero, unless the egress
priority map has modified it. This will get packets into the correct queue and
result in the queue_mapping field being set correctly.

2. Any tc filter which modifies queue_mapping will be honored, as the filters
are handled after the vlan egress map is handled.

Signed-off-by: Lucy Liu <lucy.liu@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/ixgbe/ixgbe_main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Miller Aug. 5, 2009, 2:44 a.m. UTC | #1
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 04 Aug 2009 18:27:28 -0700

> The skb priority to vlan-qos egress mapping that can be configured using
> set_egress_map with vconfig is overriden by the DCB code in the driver.
> 
> This patch allows this existing mechanism to work and will increase the
> configuration flexibility of DCB mode on Linux.

This is not the kind of bug fix which is appropriate at this
stage of -rcX development, so I'm only willing to put this
into net-next-2.6

Keep this in mind for future submissions for net-2.6
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Aug. 5, 2009, 8:06 p.m. UTC | #2
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 04 Aug 2009 18:27:28 -0700

> The skb priority to vlan-qos egress mapping that can be configured using
> set_egress_map with vconfig is overriden by the DCB code in the driver.
> 
> This patch allows this existing mechanism to work and will increase the
> configuration flexibility of DCB mode on Linux.

Applied to net-next-2.6, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 110c65a..0586774 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -5124,7 +5124,7 @@  static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb)
 		return smp_processor_id();
 
 	if (adapter->flags & IXGBE_FLAG_DCB_ENABLED)
-		return 0;  /* All traffic should default to class 0 */
+		return (skb->vlan_tci & IXGBE_TX_FLAGS_VLAN_PRIO_MASK) >> 13;
 
 	return skb_tx_hash(dev, skb);
 }