
RTL8316
2001/11/09
Rev.1.72
16
6.20 QoS Function
The RTL8316 can recognize QoS priority information for the incoming packets for assignment of egress service priority. The
RTL8316 identifies the packets as high priority based on 3 type of QoS priority information: 1) Port based priority; 2)802.1p/Q
VLAN priority tag; 3)The TCP/IP TOS/DiffServ (DS) priority field. These 3 types of QoS are selected by hardware pins
EnProtPri[1:0], En8021pPri and EnDSPri respectively and can be used together.
There are 2 priority queues, high and low, supported by the RTL8316 to buffer high and low priority frames. The queue service
rate is based on the Weighted Round Robin algorithm. The packet based service weight ratio of high-priority and low-priority
queuing can be set as 2:1, 4:1, 8:1 or "Always high priority first" by hardware pins QWeight[1:0].
When Port based priority is applied, any packet received from the high priority port, which is set by EnPortPri[1:0], will be
treated as a high priority frame.
When 802.1p VLAN tag priority is applied, the RTL8316 can recognize the 802.1Q VLAN tag frames and extract the 3-bit
User_Priority information from the VLAN tag. The RTL8316 will then set the threshold of User_Priority to 3. Therefore,
VLAN tagged frames with User_Priority value = 4~7 will be treated as high priority frames, an other User_Priority values
(0~3) as low priority frames (following 802.1p standard).
When TCP/IP's TOS/DiffServ(DS) based priority is applied, the RTL8316 can recognize TCP/IP Differentiated Services
Codepoint (DSCP) priority information from the DS-field defined on RFC2474. The DS field byte for IPv4 is the
Type-of-Service (TOS) octet, and for IPv6, it is the Traffic-Class octet. The recommended DiffServ Codepoints is defined in
RFC2597 to classify the traffic into different service classes. The RTL8316 can extract the codepoint value of the DS-field
from IPv4 and IPv6 packets, and identify the priority of the incoming IP packet following the definitions listed bellow:
High priority: whose DS-field = (EF,expected forwarding:) 101110;
(AF, Assured Forwarding:) 001010; 010010; 011010; 100010
(Network Control:) 11x000.
Low priority: whose DS-field = others values.
The VLAN tagged frame and 6-bit DS-filed in IPv4 and IPv6 frame format are shown below:
802.1Q VLAN tag frame format:
6 bytes
6 bytes
2 bytes
DA
SA
81-00
3 bits
User-Priority
( 0~3:Low-pri; 4~7: High-pri )
----
IPv4/6 frame format:
6 bytes
DA
6 bytes
SA
4 bytes
802.1Q Tag
(optional)
2 bytes
08-00
4 bits
Version
IPv4= 0100
4 bits
IHL
6 bits
TOS[0:5]
= DS-field
----
6 bytes
DA
6 bytes
SA
4 bytes
802.1Q Tag
(optional)
2 bytes
08-00
4 bits
Version
IPv6= 0110
6 bits
Traffic Class [0:5]
=DS-field
----
Note: IPv6 refer to rcf2460;
The RTL8316 can automatically turn off 802.3x flow control and Back pressure flow control for 1~2 seconds whenever the
port receives a high priority frames. The flow control is re-enabled when no priority frames are received for 1~2 seconds. This
auto-turn off function is enabled by hardware pin EnFCAutoOff.