On Wednesday 24 October 2012 14:24:43 Cosmin Ratiu wrote:
> Hello,
>
> We (Ixia) use the out of tree driver with modified linux 2.6.32 kernel.
> While rolling out DCB support, we've hit a couple of issues with version
> 3.11.33.
>
> This is the first one. I am attaching a crude patch we've used to fix the
> problem, please try to determine if this should go in or is not applicable
> to your driver.
Again, sorry for spam, here's the patch copy pasted:
ixgbe: select a proper queue for tx packets.
Packets transmitted in our tests do not use the skb->vlan_tci field.
PF_PACKET sockets could also be used to send vlan tagged packets
without using skb->vlan_tci.
The current code uses smp_processor_id() as default priority for
these kind of packets. If there are more that 8 cores, the selected
queue will be greater than 64, leading to a crash further down the tx
path.
In order to properly select the tx queue in DCB mode, we need to look
into the packet to get the priority. If that fails, use skb->priority
instead.
ixgbe_main.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
Signed-off-by: Cosmin Ratiu <[email protected]>
--- ixgbe_main.c
+++ ixgbe_main.c
@@ -7645,11 +7645,16 @@
#ifndef HAVE_MQPRIO
if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
struct ixgbe_ring_feature *f;
+ u16 vlan_tci;
+
if (skb->priority == TC_PRIO_CONTROL)
txq = adapter->dcb_tc - 1;
+ else if (skb->vlan_tci)
+ txq = (skb->vlan_tci & IXGBE_TX_FLAGS_VLAN_PRIO_MASK)
>> 13;
+ else if (!__vlan_get_tag(skb, &vlan_tci))
+ txq = vlan_tci >> 13;
else
- txq = (skb->vlan_tci & IXGBE_TX_FLAGS_VLAN_PRIO_MASK)
- >> 13;
+ txq = skb->priority & 7;
f = &adapter->ring_feature[RING_F_RSS];
txq *= f->indices;
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
E1000-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit
http://communities.intel.com/community/wired