Skip to contentSkip to conversation

802.1p, skb->priority, CoS for transit traffic not working?

DISCUSSION Denys Fedoryshchenko 2 participants 3 messages Oct 5, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

I'm trying to set CoS tag, to manage priorities on my microwave link. Possible such setup will be very useful also to set classify traffic passing QoS. A lot of hardware support this simple L2 QoS.

Hardware: RTL8139, since it doesn't have VLAN tags acceleration, i can use tcpdump to see priority flag.

Commands i did to setup test VLAN,

vconfig add eth2 10
ifconfig eth2.10 3.3.3.3 netmask 255.255.255.0
vconfig set_egress_map eth2.10 1 1
vconfig set_egress_map eth2.10 2 2
vconfig set_egress_map eth2.10 3 3
vconfig set_egress_map eth2.10 4 4

First, i made it works locally, with Patrick McHardy patch
http://marc.info/?l=lartc&m=101914368423554&w=2

Source PC: ping -P 2 3.3.3.1

Destination PC:
19:31:21.738317 00:0a:cd:14:6b:6f > 00:05:5d:2f:9b:ba, ethertype 802.1Q (0x8100), length 102: vlan 10, p 2, ethertype IPv4, (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84) 3.3.3.3 > 3.3.3.1: ICMP echo request, id 62505, seq 15, length 64
19:31:22.738376 00:0a:cd:14:6b:6f > 00:05:5d:2f:9b:ba, ethertype 802.1Q (0x8100), length 102: vlan 10, p 2, ethertype IPv4, (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84) 3.3.3.3 > 3.3.3.1: ICMP echo request, id 62505, seq 16, length 64
19:31:23.738398 00:0a:cd:14:6b:6f > 00:05:5d:2f:9b:ba, ethertype 802.1Q (0x8100), length 102: vlan 10, p 2, ethertype IPv4, (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84) 3.3.3.3 > 3.3.3.1: ICMP echo request, id 62505, seq 17, length 64

But next step is to manage traffic over iproute2. Sure it is not clear for me how it works, and for example i am feeling prio qdisc is not thing i need, at all.
I've tried , smth like this (not sure how it was, but on stats it was showing packets hit filter).

tc qdisc del dev eth2.10 root
tc qdisc add dev eth2.10 root handle 1: prio
/sbin/tc filter add dev eth2.10 parent 1:0 protocol all u32 match u32 0 0 classid 1:3

And i try even new Intel patch, "action skbedit", it works on stats, but doesn't set anything. I try ingress(on incoming interface) and egress (outgoing).

tc qdisc del dev eth2.10 root
tc qdisc add dev eth2.10 root handle 1: prio
/sbin/tc filter add dev eth2.10 parent 1:0 protocol all u32 match u32 0 0 action skbedit queue_mapping 2

and ingress
tc qdisc del dev eth0 ingress
tc qdisc add dev eth0 ingress
tc filter add dev eth0 parent ffff: protocol all u32 match u32 0 0 action skbedit queue_mapping 3

Is there a way to make work changing transit packets 802.1p values?

#1 lore raw
Quoted 5 lines · Denys Fedoryshchenko

I'm trying to set CoS tag, to manage priorities on my microwave link.
Possible such setup will be very useful also to set classify traffic passing QoS. A lot of hardware support this simple L2 QoS.

[...]
Is there a way to make work changing transit packets 802.1p values?

Bridging traffic to a VLAN device should work, you can then define the priority for the device. I'm not aware of an easier method, but I believe act_pedit should also be able to do this.

#2 lore raw
Quoted 11 lines · Patrick McHardy
Quoted 6 lines · Denys Fedoryshchenko

I'm trying to set CoS tag, to manage priorities on my microwave link. Possible such setup will be very useful also to set classify traffic passing QoS. A lot of hardware support this simple L2 QoS.

[...]
Is there a way to make work changing transit packets 802.1p values?

Bridging traffic to a VLAN device should work, you can then define the priority for the device. I'm not aware of an easier method, but I believe act_pedit should also be able to do this.

Seems my silly mistake, i used wrong option in skbedit (first which i seen in example).
Thanks to Intel guys, now it is possible also by this way:

tc qdisc del dev eth2.10 root
tc qdisc add dev eth2.10 root handle 1: prio
/sbin/tc filter add dev eth2.10 parent 1:0 protocol all u32 match u32 0 0 action skbedit priority 3

So it is possible now to do 802.1p marking on router(not bridge), by u32 filter or whatever.

tc qdisc del dev eth2.10 root
tc qdisc add dev eth2.10 root handle 1: prio
/sbin/tc filter add dev eth2.10 parent 1:0 protocol all u32 match u32 0 0 action skbedit priority 3

Like this it works

And thanks again, i am really impressed by opensource initiatives of Intel, and quality/performance/cost of their network products.