Subject: Re: [[email-masked]: [PATCH] ethernet-bridge: update skb->priority in case forwarded frame has VLAN-header]

From: Ben Greear <[email-masked]>
Date: Sat, 05 Mar 2005 11:44:33 -0800

Patrick McHardy wrote:
> Lennert Buytenhek wrote:
> 
>> ----- Forwarded message from Leo Yuriev <[email-masked]> -----
>>
>> From: Leo Yuriev <[email-masked]>
>> To: Lennert Buytenhek <[email-masked]>,
>>     Alexey Kuznetsov <[email-masked]>
>> Cc: [email-masked]
>> Subject: [PATCH] ethernet-bridge: update skb->priority in case 
>> forwarded frame has VLAN-header
>>
>> Kernel 2.6 (2.6.11)
>>
>> When ethernet-bridge forward a packet and such ethernet-frame has
>> VLAN-tag, bridge should update skb->prioriry for properly QoS
>> handling.
>>
>> This small patch does this. Currently vlan_TCI-priority directly
>> mapped to skb->priority, but this looks enough.
>>
>> Patch-by: Leo Yuriev <[email-masked]>
> 
> 
> It needs to verify the tag is present and accessible using
> pskb_may_pull(). But I think an ebtables target similar to the iptables
> CLASSIFY target is a better place for this. It could allow setting
> skb->priority to an arbitary value or derive it from vlan priority or IP
> tos.

The VLAN code has it's own (user-configurable) mapping from skb->priority to .1q priority,
and .1q priority to skb->priority.  You might want to clone or somehow
use the .1q mapping logic to allow something other than just a straight
.1q -> skb->priority mapping.

Ben

> Regards
> Patrick

-- 
Ben Greear <[email-masked]>
Candela Technologies Inc  http://www.candelatech.com