Quality Of Service
1. Introduction
This document describes QoS-related configuration and retrieval of status information.
2. Set the default priority on a port.
The interface (port) name is '1'
The default priority is set to 3.
IPATCH
request message.
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
ieee802-dot1q-bridge:bridge-port/default-priority"
: 3
Let’s confirm that the default priority indeed has been changed:
FETCH
request message.
- "/ietf-interfaces:interfaces/interface[name='1']/\
ieee802-dot1q-bridge:bridge-port/default-priority"
FETCH
response message.
- ? "/ietf-interfaces:interfaces/interface/ieee802-dot1q-bridge:bridge-port/\
default-priority"
: 3
3. Set the PCP decoding map on a port.
It is the 'pcp-decoding-map/priority-map' that does the mapping of
TAG PCP value to priority (queue) and drop eligibility.
By default, there is no 'priority-map' meaning mapping is not enabled, meaning the frame
is assigned the port default priority.
The interface (port) name is '1'
Let’s start by showing that the 'pcp-decoding-map' is empty:
FETCH
request message:
- "/ietf-interfaces:interfaces/interface[name='1']/\
ieee802-dot1q-bridge:bridge-port/pcp-decoding-table/pcp-decoding-map"
FETCH
response message:
- ? "/ietf-interfaces:interfaces/interface/ieee802-dot1q-bridge:bridge-port/\
pcp-decoding-table/pcp-decoding-map"
: []
Create an empty 'priority-map' meaning mapping is enabled and do default mapping as defined in 802.1.
PCP 0 -> (Prio 1 - dei false) PCP 1 -> (Prio 0 - dei false) PCP 2 -> (Prio 2 - dei false) PCP 3 -> (Prio 3 - dei false) PCP 4 -> (Prio 4 - dei false) PCP 5 -> (Prio 5 - dei false) PCP 6 -> (Prio 6 - dei false) PCP 7 -> (Prio 7 - dei false)
IPATCH
request message.
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
ieee802-dot1q-bridge:bridge-port/pcp-decoding-table/pcp-decoding-map"
: pcp: 8P0D
The FETCH will only return elements in 'priority-map' that are NOT default.
Show that the 'priority-map' is empty:
FETCH
request message:
- "/ietf-interfaces:interfaces/interface[name='1']/\
ieee802-dot1q-bridge:bridge-port/pcp-decoding-table/pcp-decoding-map"
FETCH
response message:
- ? "/ietf-interfaces:interfaces/interface/ieee802-dot1q-bridge:bridge-port/\
pcp-decoding-table/pcp-decoding-map"
: - pcp: 8P0D
priority-map: []
PATCH an element in 'priority-map' that is not default:
PCP 2 → (Prio 7 - dei false)
IPATCH
request message.
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
ieee802-dot1q-bridge:bridge-port/pcp-decoding-table/\
pcp-decoding-map[pcp='8P0D']/priority-map"
: priority-code-point: 2
priority: 7
drop-eligible: false
Let’s confirm that an element in 'priority-map' is as expected (NOT default):
FETCH
request message.
- "/ietf-interfaces:interfaces/interface[name='1']/\
ieee802-dot1q-bridge:bridge-port/pcp-decoding-table/pcp-decoding-map"
FETCH
response message.
- ? "/ietf-interfaces:interfaces/interface/ieee802-dot1q-bridge:bridge-port/\
pcp-decoding-table/pcp-decoding-map"
: - pcp: 8P0D
priority-map:
- priority-code-point: 2
priority: 7
drop-eligible: false
4. Set the PCP encoding map on a port.
It is the 'pcp-encoding-map/priority-map' that does the mapping of
priority (queue) and drop eligibility to egress TAG PCP value.
By default, there is no 'priority-map' meaning mapping is not enabled, meaning the egress TAG PCP value
is assigned to the ingress TAG PCP (classified PCP).
The interface (port) name is '1'
Let’s start by showing that the 'pcp-encoding-map' is empty:
FETCH
request message:
- "/ietf-interfaces:interfaces/interface[name='1']/\
ieee802-dot1q-bridge:bridge-port/pcp-encoding-table/pcp-encoding-map"
FETCH
response message:
- ? "/ietf-interfaces:interfaces/interface/ieee802-dot1q-bridge:bridge-port/\
pcp-encoding-table/pcp-encoding-map"
: []
Create an empty 'priority-map' meaning mapping is enabled and do default mapping as defined in 802.1.
(Prio 0 - dei false) -> PCP 1 (Prio 1 - dei false) -> PCP 0 (Prio 2 - dei false) -> PCP 2 (Prio 3 - dei false) -> PCP 3 (Prio 4 - dei false) -> PCP 4 (Prio 5 - dei false) -> PCP 5 (Prio 6 - dei false) -> PCP 6 (Prio 7 - dei false) -> PCP 7
IPATCH
request message.
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
ieee802-dot1q-bridge:bridge-port/pcp-encoding-table/pcp-encoding-map"
: pcp: 8P0D
The FETCH will only return elements in 'priority-map' that are NOT default.
Show that the 'priority-map' is empty:
FETCH
request message:
- "/ietf-interfaces:interfaces/interface[name='1']/\
ieee802-dot1q-bridge:bridge-port/pcp-encoding-table/pcp-encoding-map"
FETCH
response message:
- ? "/ietf-interfaces:interfaces/interface/ieee802-dot1q-bridge:bridge-port/\
pcp-encoding-table/pcp-encoding-map"
: - pcp: 8P0D
priority-map: []
PATCH an element in 'priority-map' that is not default:
(Prio 7 - dei false) → PCP 2
IPATCH
request message.
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
ieee802-dot1q-bridge:bridge-port/pcp-encoding-table/\
pcp-encoding-map[pcp='8P0D']/priority-map"
: priority: 7
dei: false
priority-code-point: 2
Let’s confirm that an element in 'priority-map' is as expected (NOT default):
FETCH
request message.
- "/ietf-interfaces:interfaces/interface[name='1']/\
ieee802-dot1q-bridge:bridge-port/pcp-encoding-table/pcp-encoding-map"
FETCH
response message.
- ? "/ietf-interfaces:interfaces/interface/ieee802-dot1q-bridge:bridge-port/\
pcp-encoding-table/pcp-encoding-map"
: - pcp: 8P0D
priority-map:
- priority: 7
dei: false
priority-code-point: 2
5. Configure traffic-class Shaping on a port.
The interface (port) name is '1'
For each traffic class (priority), it is possible to enable a traffic-class (priority) shaper. By default, no shaper is enabled.
The shaper can be either Credit Based or Single Leaky.
Let’s show that no shaper is enabled.
FETCH
request message.
- "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-qos/config/traffic-class-shapers"
FETCH
response message.
- ? "/ietf-interfaces:interfaces/interface/mchp-velocitysp-port:eth-qos/config/\
traffic-class-shapers"
: []
Enable Credit Based shaping on traffic class 3 with idle-slope 100 MB.
IPATCH
request message.
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-qos/config/traffic-class-shapers"
: traffic-class: 3
credit-based:
idle-slope: 100000
Let’s confirm that the shaper for traffic class indeed has been changed:
FETCH
request message.
- "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-qos/config/traffic-class-shapers"
FETCH
response message.
- ? "/ietf-interfaces:interfaces/interface/mchp-velocitysp-port:eth-qos/config/\
traffic-class-shapers"
: - traffic-class: 3
credit-based:
idle-slope: 100000
Enable Single Leaky Bucket shaping on traffic class 7 with CBS 2000 Bytes and CIR 50 MB.
IPATCH
request message.
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-qos/config/traffic-class-shapers"
: traffic-class: 7
single-leaky-bucket:
committed-information-rate: 50000
committed-burst-size: 2000
Let’s confirm that the shaper for traffic class indeed has been changed:
FETCH
request message.
- "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-qos/config/traffic-class-shapers"
FETCH
response message.
- ? "/ietf-interfaces:interfaces/interface/mchp-velocitysp-port:eth-qos/config/\
traffic-class-shapers"
: - traffic-class: 3
credit-based:
idle-slope: 100000
- traffic-class: 7
single-leaky-bucket:
committed-information-rate: 50000
committed-burst-size: 2000
6. Configure Weighted Round Robin scheduling on a port.
In WRR, each traffic-class is given a percentage of the available bandwidth.
To configure this, there is a list that contains the scheduler bandwidth in percent per traffic-class.
The list only contains traffic-classes that are part of WRR.
The first traffic-class in the list is always 0, the next is always one higher.
The traffic-classes not in the list use strict scheduling.
Let’s show that no traffic-class is part of WRR - meaning the list is empty.
The interface (port) name is '1'
FETCH
request message.
- "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-qos/config/traffic-class-schedulers-bandwidth"
FETCH
response message.
- ? "/ietf-interfaces:interfaces/interface/mchp-velocitysp-port:eth-qos/config/\
traffic-class-schedulers-bandwidth"
: []
Enable WRR on traffic-class 0 - 1 - 2.
Bandwidth in percent are 10 - 40 - 50.
The traffic-classes 3 - 4 - 5 - 6 - 7 are running strict scheduling.
The interface (port) name is '1'
IPATCH
request message.
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-qos/config/\
traffic-class-schedulers-bandwidth"
: - 10
- 40
- 50
Let’s confirm that the WRR configuration is applied:
FETCH
request message.
- "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-qos/config/traffic-class-schedulers-bandwidth"
FETCH
response message.
- ? "/ietf-interfaces:interfaces/interface/mchp-velocitysp-port:eth-qos/config/\
traffic-class-schedulers-bandwidth"
: - 10
- 40
- 50
7. Configure Port Policing on a port.
On each port, a number of policers can be enabled. The maximum number of policers is hardware dependent.
Which frames to be policed can be selected by the frame_selector
.
In case a frame is selected by multiple policies, the most conservative with the lowest rate wins.
A Port Policer ensures that the selected frames at port ingress are limited to a configured rate
.
The rate can burst at a higher rate until a configured number of bytes (burst-size
) has been received.
By default, policers are disabled.
Let’s show that no Port Policer is enabled - the port-policers
list is empty.
The interface (port) name is '1'
FETCH
request message.
- "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-qos/config/port-policers"
FETCH
response message.
- ? "/ietf-interfaces:interfaces/interface/mchp-velocitysp-port:eth-qos/config/\
port-policers"
: []
7.1. Enable Policing of unknown unicast frames.
The index is 1.
The rate is 1000 frames per second.
The burst capacity is 2000 bytes.
IPATCH
request message.
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-qos/config/port-policers"
: index: 1
frame-selector: unknown-unicast
frame-rate:
rate: 1000
burst-size: 2000
Let’s confirm that the Port Policer indeed has been enabled:
FETCH
request message.
- "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-qos/config/port-policers"
FETCH
response message.
- ? "/ietf-interfaces:interfaces/interface/mchp-velocitysp-port:eth-qos/config/\
port-policers"
: - index: 1
frame-selector: unknown-unicast
frame-rate:
rate: 1000
burst-size: 2000
7.2. Enable Policing of known multicast frames.
First, add a static entry in the FDB. This is now a known multicast MAC.
The vid is the default VLAN-ID 1.
The destination port is 2.
iPATCH
request message:
- ? "/ieee802-dot1q-bridge:bridges/bridge[name='b0']/component[name='c0']/\
filtering-database/filtering-entry"
: database-id: 0
address: 01-00-00-00-00-01
vids: '1'
entry-type: static
port-map:
- port-ref: 2
Then enable the Port Policer.
The index is 4.
The rate is 1000000 bits per second.
The burst capacity is 3000 bytes.
IPATCH
request message.
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-qos/config/port-policers"
: index: 4
frame-selector: known-multicast
bit-rate:
rate: '1000000'
burst-size: 3000
Let’s confirm that two port policers have been enabled:
FETCH
request message.
- "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-qos/config/port-policers"
FETCH
response message.
- ? "/ietf-interfaces:interfaces/interface/mchp-velocitysp-port:eth-qos/config/\
port-policers"
: - index: 1
frame-selector: unknown-unicast
frame-rate:
rate: 1000
burst-size: 2000
- index: 4
frame-selector: known-multicast
bit-rate:
rate: '1000000'
burst-size: 3000
7.3. Delete a Port Policer.
The unknown-unicast Port Policer with index 1 is deleted.
IPATCH
request message.
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-qos/config/port-policers[index='1']"
:
Let’s confirm that now only the known-multicast Port Policer is enabled:
FETCH
request message.
- "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-qos/config/port-policers"
FETCH
response message.
- ? "/ietf-interfaces:interfaces/interface/mchp-velocitysp-port:eth-qos/config/\
port-policers"
: - index: 4
frame-selector: known-multicast
bit-rate:
rate: '1000000'
burst-size: 3000
8. Use case - how to utilize the PCP decoding and encoding
The PCP decoding and encoding can be used to control priority (queue) classification of ingress frames based
on TAG PCP value and control the TAG PCP value of an egress frame based on the classified priority.
To forward frames from ingress port to egress port, a VLAN10 is created with two ports:
Port1: TAG aware. UN-TAGGED frames are classified to port default VID. Tagged frames are classified to TAG VID
Port2: TAG aware. Frames are transmitted with classified VID as TAG VID value.
To exemplify the decoding and encoding, Port1 is considered the ingress port and Port2 is the egress port.
8.1. Set the VLAN TAG port type of the ports.
The interface (port) names '1' and '2' must have 'port-type' as 'c-vlan-bridge-port' meaning C-TAG aware.
IPATCH
request message.
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
ieee802-dot1q-bridge:bridge-port/port-type"
: ieee802-dot1q-bridge:c-vlan-bridge-port
IPATCH
request message.
- ? "/ietf-interfaces:interfaces/interface[name='2']/\
ieee802-dot1q-bridge:bridge-port/port-type"
: ieee802-dot1q-bridge:c-vlan-bridge-port
8.2. Set the default VID on the port.
The interface (port) name '1' must have 'pvid' set to 10 in order to classify UN-TAGGED frames to VLAN10.
IPATCH
request message.
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
ieee802-dot1q-bridge:bridge-port/pvid"
: 10
8.3. Set the default Priority on the port.
The interface (port) name '1' must have 'default-priority' set to 4 in order to classify UN-TAGGED frames to priority (queue) 4.
IPATCH
request message.
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
ieee802-dot1q-bridge:bridge-port/default-priority"
: 4
8.4. Add the VLAN.
VLAN10 must have interface (port) names '1' and '2' as members.
IPATCH
request message.
- ? "/ieee802-dot1q-bridge:bridges/bridge[name='b0']/component[name='c0']/\
filtering-database/vlan-registration-entry"
: database-id: 0
vids: '10'
entry-type: static
port-map:
- port-ref: 1
static-vlan-registration-entries:
vlan-transmitted: tagged
- port-ref: 2
static-vlan-registration-entries:
vlan-transmitted: tagged
8.5. Create decoding 'priority-map'.
Create an empty 'priority-map' on ingress Port1.
IPATCH
request message.
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
ieee802-dot1q-bridge:bridge-port/pcp-decoding-table/pcp-decoding-map"
: pcp: 8P0D
Add elements in Port1 'priority-map':
PCP 0 → (Prio 1 - dei false)
PCP 1 → (Prio 0 - dei false)
PCP 2 → (Prio 7 - dei false)
PCP 3 → (Prio 2 - dei false)
PCP 4 → (Prio 5 - dei false)
PCP 5 → (Prio 6 - dei false)
PCP 6 → (Prio 3 - dei false)
PCP 7 → (Prio 4 - dei false)
IPATCH
request message.
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
ieee802-dot1q-bridge:bridge-port/pcp-decoding-table/\
pcp-decoding-map[pcp='8P0D']/priority-map"
: - priority-code-point: 0
priority: 1
drop-eligible: false
- priority-code-point: 1
priority: 0
drop-eligible: false
- priority-code-point: 2
priority: 7
drop-eligible: false
- priority-code-point: 3
priority: 2
drop-eligible: false
- priority-code-point: 4
priority: 5
drop-eligible: false
- priority-code-point: 5
priority: 6
drop-eligible: false
- priority-code-point: 6
priority: 3
drop-eligible: false
- priority-code-point: 7
priority: 4
drop-eligible: false
8.6. Create encoding 'priority-map'.
Create an empty 'priority-map' on egress Port2.
IPATCH
request message.
- ? "/ietf-interfaces:interfaces/interface[name='2']/\
ieee802-dot1q-bridge:bridge-port/pcp-encoding-table/pcp-encoding-map"
: pcp: 8P0D
Add elements in Port2 'priority-map':
(Prio 0 - dei false) → PCP 0
(Prio 1 - dei false) → PCP 1
(Prio 2 - dei false) → PCP 7
(Prio 3 - dei false) → PCP 3
(Prio 4 - dei false) → PCP 4
(Prio 5 - dei false) → PCP 5
(Prio 6 - dei false) → PCP 6
(Prio 7 - dei false) → PCP 2
IPATCH
request message.
- ? "/ietf-interfaces:interfaces/interface[name='2']/\
ieee802-dot1q-bridge:bridge-port/pcp-encoding-table/\
pcp-encoding-map[pcp='8P0D']/priority-map"
: - priority: 0
dei: false
priority-code-point: 0
- priority: 1
dei: false
priority-code-point: 1
- priority: 2
dei: false
priority-code-point: 7
- priority: 3
dei: false
priority-code-point: 3
- priority: 4
dei: false
priority-code-point: 4
- priority: 5
dei: false
priority-code-point: 5
- priority: 6
dei: false
priority-code-point: 6
- priority: 7
dei: false
priority-code-point: 2
8.7. Verify the encoding/decoding configuration.
Verify the configuration by injecting frames into the DUT:
UN-TAGGED frame into port1 observing the frame egressing port2 C-TAGGED with VID10 and PCP4.
C-TAGGED with VID 10 and PCP0 frame into port1 observing the frame egressing port2 with VID10 and PCP1.
C-TAGGED with VID 10 and PCP1 frame into port1 observing the frame egressing port2 with VID10 and PCP0.
C-TAGGED with VID 10 and PCP2 frame into port1 observing the frame egressing port2 with VID10 and PCP2.
C-TAGGED with VID 10 and PCP3 frame into port1 observing the frame egressing port2 with VID10 and PCP7.
C-TAGGED with VID 10 and PCP4 frame into port1 observing the frame egressing port2 with VID10 and PCP5.
C-TAGGED with VID 10 and PCP5 frame into port1 observing the frame egressing port2 with VID10 and PCP6.
C-TAGGED with VID 10 and PCP6 frame into port1 observing the frame egressing port2 with VID10 and PCP3.
C-TAGGED with VID 10 and PCP7 frame into port1 observing the frame egressing port2 with VID10 and PCP4.
There are RX/TX counters per port per priority that can be used to verify what priority a frame was classified to.
FETCH
request message.
- "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-port/statistics/traffic-class"
FETCH
response message.
- ? "/ietf-interfaces:interfaces/interface/mchp-velocitysp-port:eth-port/\
statistics/traffic-class"
: - traffic-class: 0
rx-packets: '0'
tx-packets: '0'
- traffic-class: 1
rx-packets: '0'
tx-packets: '0'
- traffic-class: 2
rx-packets: '0'
tx-packets: '0'
- traffic-class: 3
rx-packets: '0'
tx-packets: '0'
- traffic-class: 4
rx-packets: '0'
tx-packets: '0'
- traffic-class: 5
rx-packets: '0'
tx-packets: '0'
- traffic-class: 6
rx-packets: '0'
tx-packets: '0'
- traffic-class: 7
rx-packets: '0'
tx-packets: '0'