Vlan Priority CoS Mapping


From PicOS-2.11, the vlan priority cos mapping is disabled default, user can enable it and configure special mapping in ingress interface. Enable vlan priority cos mapping will make the ingress packes which with different vlan_pcp enter different queues.

 

1, Before PicOS-2.11, the vlan priority cos mapping is enabled defaultly, and cannot configure the mapping. 

2, If enable vlan-priority-cos-map and traffic can match the flow 'in_port=1,actions=output:2' in switch, the original traffic will send out from switch; if disable vlan-priority-cos-map, the traffic no mater attach which vlan_pcp will be change the vlan_pcp to 0 and send out from switch.

3, If enable vlan-priority-cos-map and cos-map , and traffic can match both of the mapping at same time, at last the cos-mapping working.

 

Command:

1, Check vlan priority cos mapping state:

ovs-vsctl show-vlan-priority-cos-map

2, Enable/disable vlan priority cos mapping:

ovs-vsctl set-vlan-priority-cos-map TRUE|FALSE

3, Once enable the mapping, user can see the default mapping is vlan_pcp 0~7 mapping queue 0~7.

ovs-vsctl show-vlan-priority-cos-map <interface>

4, configure the mapping:

ovs-vsctl set interface <interface> vlan_priority_mapping=<vlan_pcp>=q<queue number>[,<vlan_pcp>=q<queue number>,...]

5, user also can configure the untag packet same as one vlan_pcp and send to the mapping queue:

ovs-vsctl set interface <interface> vlan_priority_untagged=<vlan_pcp>

Example:

1, enable vlan-priority-cos-map, and show the mapping in interface te-1/1/9

admin@PICOS-OVS$ovs-vsctl set-vlan-priority-cos-map TRUE
admin@PICOS-OVS$ovs-vsctl show-vlan-priority-cos-map
vlan priority cos mapping: enabled
 
admin@PICOS-OVS$ovs-vsctl show-vlan-priority-cos-map te-1/1/9
vlan priority cos mapping: enabled 
{
    vlan-priority   queue
    -------------  -------
               0    q0
               1    q1
               2    q2
               3    q3
               4    q4
               5    q5
               6    q6
               7    q7
}

2, configure the mapping, vlan_pcp:7 enter queue3, vlan_pcp:6 enter queue2, and others enter default queue0.

admin@PICOS-OVS$ovs-vsctl set interface te-1/1/9 vlan_priority_mapping=7=q3,6=q2
admin@PICOS-OVS$
admin@PICOS-OVS$ovs-vsctl show-vlan-priority-cos-map te-1/1/9
vlan priority cos mapping: enabled 
{
    vlan-priority   queue
    -------------  -------
               6:   q2
               7:   q3
          others:   q0
}

3, set untag packets same as vlan_pcp:7 and enter queue3.

admin@PICOS-OVS$ovs-vsctl set interface te-1/1/9 vlan_priority_untagged=7

4, add flow entry, in_port is port te-1/1/9, the untag packets which enter from port te-1/1/9 will be send to queue3.

admin@PICOS-OVS$ovs-ofctl add-flow br0 in_port=9,actions=output:10

Copyright © 2024 Pica8 Inc. All Rights Reserved.