Figure 13-91 below, as well as the corresponding explanation that follows, explains each of the priorities, how they are determined, and how they are used. A number in parentheses in the figure indicates a process (Ethernet port ingress, host port egress, etc.). Each bullet in the text following the diagram explains one of the 5 processes pointed out in the figure.
From Figure 13-91 above:
- (1) is the ingress process that occurs at the external Ethernet ports
- The incoming packet is assigned a packet priority based on either its VLAN priority, IPv4 or IPv6 DSCP value, or the ingress port’s priority. This packet priority is then mapped to a header packet priority using the CPSW_PN_RX_PRI_MAP_REG register where N is the port where the packet entered the switch. This process is explained in further detail in Section 13.2.1.4.6.2.
- (2) is the egress process that occurs at the external Ethernet ports
- If the switch is in VLAN Aware mode then the VLAN header may be added, replaced, or removed during the egress process. If the VLAN header is to be added or replaced, the VLAN priority will come from the header packet priority that was determined in process (1) or (5). Transmit VLAN processing is the same for both the host port and the external Ethernet ports and is described in Section 13.2.1.4.6.1.19.
- (3) is the process by which it is decided which priority TX queue to place the packet on in the Port N TX FIFO during egress
- Each Port’s TX FIFO has 8 queues that each correspond to a priority that is used when determining which packet will egress from the switch next at that port. The header packet priority (Ethernet port ingress, process (1)) or the receive packet channel (host port 0 ingress, process (5)) gets mapped through the CPSW_PN_RX_PRI_MAP_REG register (where N is the egress port number) to determine the switch priority of the packet. The switch priority determines which TX FIFO queue to place the packet in. The FIFO architecture is described in Section 13.2.1.4.6.10.5. The header packet priority to switch priority mapping is discussed in Section 13.2.1.4.6.2.
- (4) is the egress process that occurs at CPDMA Host Port 0
- The egress process for CPDMA Host Port 0 is discussed in Section 13.2.1.4.6.2.3.
- If the switch is in VLAN Aware mode then the VLAN header may be added, replaced, or removed during the egress process. If the VLAN header is to be added or replaced, the VLAN priority will come from the header packet priority that was determined in process (1). Transmit VLAN processing is the same for both the host port and the external Ethernet ports and is described in Section 13.2.1.4.6.1.19.
- (5) is the ingress process that occurs at CPDMA Host Port 0
- The incoming packet is assigned a packet priority based on either its VLAN priority, IPv4 or IPv6 DSCP value, or the host port’s priority. This packet priority is then mapped to a header packet priority using the CPSW_P0_RX_PRI_MAP_REG register.
- The process to determine the destination hardware switch priority is discussed in Section 13.2.1.4.6.2.2.