Packet trimming
Packet trimming is a congestion control method proposed by the Ultra Ethernet Consortium (UEC) to reduce congestion in data center networks.
When output queues become congested, instead of dropping the packet altogether, with packet trimming the system can trim the payload from the packet and modify its header before forwarding the altered packet to the destination. The destination detects the missing data from the packet and then signals the source to resend the packet. In this case, the source can attempt to reroute the resent packets to a less congested path.
Packet trimming provides an alternative to WRED and ECN and, in essence, operates as a compromise between these two mechanisms, as follows:
- Packet trimming sends congestion indicators to the receiver in the form of trimmed packets, which can be reflected to the source without waiting double the round trip time (2 × RTT) for a timeout. As a result, it provides congestion indication at speeds comparable to ECN.
- Packet trimming saves bandwidth by trimming packets to their absolute minimum. As a result, it relieves congestion in the network similar to WRED.
- Also similar to WRED, packet trimming requires packet retransmission from the source.
To avoid conflicts with existing network operations, packet trimming is performed only on packets tagged with specific DSCP values. When the WRED algorithm or tail-drop mechanism identifies packets to be dropped, if those packets are marked with a trimmable DSCP value, the packets are trimmed rather than dropped.
To configure packet trimming, you must define which DSCP values are trimmable, that is, eligible for trimming. You must also define a DSCP remarking value to apply to those packets that have been trimmed. The trimmed packets are remarked with a higher priority DSCP to quickly notify the receiver of the congestion. The receiver must be able to identify a trimmed packet and process it accordingly.
When a node performs packet trimming, it adjusts the IP header length and recalculates the Ethernet CRC of the trimmed packets so that they appear as legitimate packets to subsequent nodes. This concept is illustrated in the following figure.
The maximum packet length for trimmed packets is non-configurable. The size of the trimmed packet is less than a cell size: 206 bytes on 7220 IXR-H5 platforms and 392 bytes on 7220 IXR-H6 platforms.
Packet trimming interoperation
Be aware of the following feature interoperability considerations between packet trimming and ECN or PFC.
- Packets eligible for packet trimming are trimmed regardless of the value of their ECN bits.
- Trimmed packets are not marked with ECN bits.
- PFC and packet trimming are mutually exclusive on an interface. In the unlikely case a drop occurs because a PFC buffer is depleted, the trimmable packets are trimmed.
Packet trimming statistics
To track the number of trimmed packets, the system provides counters per interface and per output queue under info from state qos interfaces interface output queues queue queue-statistics aggregate-statistics trimmed-packets.
In the following example output, queue unicast-3 is carrying trimmable packets (flagged as dropped packets) and unicast-6 is the trimmed-packet-queue carrying trimmed packets.
# info from state qos interfaces interface ethernet-1/1 output queues queue * queue-statistics aggregate-statistics
...
queue unicast-3 {
queue-statistics {
aggregate-statistics {
last-clear "2026-06-24T18:16:40.331Z (53 seconds ago)"
transmitted-packets 4916672272
transmitted-octets 209640190197856
dropped-packets 132358332
dropped-octets 555640277736
ecn-marked-packets 0
ecn-marked-octets 0
trimmed-packets 0
}
}
}
...
queue unicast-6 {
queue-statistics {
aggregate-statistics {
last-clear "2026-06-24T18:16:40.331Z (53 seconds ago)"
transmitted-packets 132358332
transmitted-octets 555640277736
dropped-packets 0
dropped-octets 0
ecn-marked-packets 0
ecn-marked-octets 0
trimmed-packets 132358332
}
}
}
In the packet trimming output:
- Queue unicast-3 displays packets that are trimmed as dropped-packets. The queue also displays dropped-octets, which are a function of the original packet length before trimming.
-
Queue unicast-6 displays a counter only for trimmed-packets and not for trimmed-octets, because all trimmed packets have the same length.
One exception exists to this rule. If the original trimmable packet is shorter than the maximum trimmed packet size, it is not trimmed but it is still sent with the trimmed DSCP value and accounted for as a trimmed packet. To obtain an indication of the amount of traffic representing this exception, compare the transmitted octets on the queue against the trimmed packets and transmitted packets.