netdev
[Top] [All Lists]

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

To: Patrick McHardy <kaber@xxxxxxxxx>
Subject: Re: [leo@xxxxxxxxx: [PATCH] ethernet-bridge: update skb->priority in case forwarded frame has VLAN-header]
From: Ben Greear <greearb@xxxxxxxxxxxxxxx>
Date: Sat, 05 Mar 2005 11:44:33 -0800
Cc: Lennert Buytenhek <buytenh@xxxxxxxxxxxxxx>, shemminger@xxxxxxxx, netdev@xxxxxxxxxxx, leo@xxxxxxxxx
In-reply-to: <4229D98F.9010008@xxxxxxxxx>
Organization: Candela Technologies
References: <20050305141225.GA5180@xxxxxxxxxxxxxxxxx> <4229D98F.9010008@xxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.3) Gecko/20041020
Patrick McHardy wrote:
Lennert Buytenhek wrote:

----- Forwarded message from Leo Yuriev <leo@xxxxxxxxx> -----

From: Leo Yuriev <leo@xxxxxxxxx>
To: Lennert Buytenhek <buytenh@xxxxxxx>,
    Alexey Kuznetsov <kuznet@xxxxxxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx
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 <leo@xxxxxxxxx>


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 <greearb@xxxxxxxxxxxxxxx>
Candela Technologies Inc  http://www.candelatech.com


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