netdev
[Top] [All Lists]

Re: [leo@yuriev.ru: [PATCH] ethernet-bridge: update skb->priority in cas

To: Ben Greear <greearb@xxxxxxxxxxxxxxx>, leo@xxxxxxxxx
Subject: Re: [leo@yuriev.ru: [PATCH] ethernet-bridge: update skb->priority in case forwarded frame has VLAN-header]
From: jamal <hadi@xxxxxxxxxx>
Date: 07 Mar 2005 07:48:16 -0500
Cc: Patrick McHardy <kaber@xxxxxxxxx>, Lennert Buytenhek <buytenh@xxxxxxxxxxxxxx>, shemminger@xxxxxxxx, netdev@xxxxxxxxxxx, leo@xxxxxxxxx
In-reply-to: <422A0C21.3050709@candelatech.com>
Organization: jamalopolous
References: <20050305141225.GA5180@xi.wantstofly.org> <4229D98F.9010008@trash.net> <422A0C21.3050709@candelatech.com>
Reply-to: hadi@xxxxxxxxxx
Sender: netdev-bounce@xxxxxxxxxxx
On Sat, 2005-03-05 at 14:44, Ben Greear wrote:
> Patrick McHardy wrote:
> > Lennert Buytenhek wrote:

>From looking at the patch:
------
+               /*
+                *   We map VLAN_TCI priority (0..7) to skb->priority (0..15) 
+                *   most similarly e.g. 0->0, 1->1, .., 7->7
+                */
+               skb->priority = (vlan_TCI >> 13) & 7;
------

This is wrong. IEEE priorities are opposite of IETF priorities (as used by
skb->prio).
Unless you install a prio qdisc and rewrite the priomap, you are screwed.
So you should do opposite mapping, i.e something along the lines of
VLAN_TCI priority (0..7) to skb->priority (15..8) i,e

skb->priority = 15 - vlan_TCI;

cheers,
jamal


<Prev in Thread] Current Thread [Next in Thread>