Table of Contents
As the output queue fills, weighted random early detection (WRED) drop profiles define the drop probability of packets of different packet loss probabilities (PLPs). During periods of congestion, as the output queue fills, the switch drops incoming packets as determined by a drop profile until the output queue becomes less congested. Depending on the drop probabilities, a drop profile can drop many packets long before the buffer becomes full or drop only a few packets even if the buffer is almost full.
Explicit congestion notification (ECN) enables traffic congestion control between two ECN-enabled devices. When the switch detects the congestion, the ECN field is set in the IP header of a packet before forwarding it. If the receiver device receives the packets with ECN marked, it sends the congestion notification packets (CNP) to the sender device to reduce the transmit packet rate. The CNP packets continue to be sent to the sender until the congestion is released.
ECN uses the WRED thresholds being applied to an egress queue.
When ECN is enabled, process the packets based on the following rules:
You must enable ECN on all of the intermediate devices in the path between the sender and the receiver. |
ECN supports the following:
ECN does not support the following:
Example model & SONiC version:
Restrictions:
Netberg SONiC comes with pre-configured templates that a user can fine-tune to requirements.
Load the buffer configuration as described in the Buffer Settings piece.
It contains default WRED and ECN profiles with all necessary thresholds.
The results is a default profile, such as:
admin@sonic:~$ show ecn
Profile: AZURE_LOSSLESS
----------------------- -------
ecn ecn_all
green_drop_probability 5
green_max_threshold 2097152
green_min_threshold 1048576
red_drop_probability 5
red_max_threshold 2097152
red_min_threshold 1048576
wred_green_enable true
wred_red_enable true
wred_yellow_enable true
yellow_drop_probability 5
yellow_max_threshold 2097152
yellow_min_threshold 1048576
----------------------- -------
The config_db schema:
"WRED_PROFILE": {
"AZURE_LOSSLESS": {
"ecn": "ecn_all", #Enable ECN marking for all colors.
"green_drop_probability": "5",
"green_max_threshold": "2097152",
"green_min_threshold": "1048576",
"red_drop_probability": "5",
"red_max_threshold": "2097152",
"red_min_threshold": "1048576",
"wred_green_enable": "true",
"wred_red_enable": "true",
"wred_yellow_enable": "true",
"yellow_drop_probability": "5",
"yellow_max_threshold": "2097152",
"yellow_min_threshold": "1048576"
}
}
SONiC CLI sets ECN WRED parameters as follows:
Syntax:
config ecn [OPTIONS]
Options:
-profile <profile_name> Profile name [required]
-rmax <red threshold max> Set red max threshold
-rmin <red threshold min> Set red min threshold
-ymax <yellow threshold max> Set yellow max threshold
-ymin <yellow threshold min> Set yellow min threshold
-gmax <green threshold max> Set green max threshold
-gmin <green threshold min> Set green min threshold
-rdrop <red drop probability> Set red drop probability
-ydrop <yellow drop probability> Set yellow drop probability
-gdrop <green drop probability> Set green drop probability
Example:
admin@sonic:~$ sudo config ecn -profile AZURE_LOSSLESS -gmax 2097152
Attach the WRED profile under a queue.
"QUEUE": {
"Ethernet0|3": {
"scheduler": "scheduler.1",
"wred_profile": "AZURE_LOSSLESS"
},
"Ethernet0|4": {
"scheduler": "scheduler.1",
"wred_profile": "AZURE_LOSSLESS"
},
Switch model |
Maximum Threshold (bytes) |
---|---|
Aurora 221 Aurora 421 Aurora 621 Aurora 721 |
67,108,608 |
Aurora 830 |
266,338,050 |
Aurora 610 Aurora 710 Aurora 750 |
41,942,960 |
Aurora 810 |
92,274,512 |
Both endpoints must have EN enabled. In Linux, please have a look at https://sysctl-explorer.net/net/ipv4/tcp_ecn/
If not – the traffic is Not ECN-Capable.
The switch runs the default ECN and WRED configuration.
Once ECN is on, no matter the switch settings, the user can see ECN-Capable packets.
Setting some thresholds to 0 brings ECN-Echo and ECN-cwr flags.
admin@sonic:~$ show ecn Profile: AZURE_LOSSLESS ----------------------- ------- red_max_threshold 2097152 red_drop_probability 5 yellow_max_threshold 2097152 ecn ecn_all green_min_threshold 0 red_min_threshold 0 wred_yellow_enable true yellow_min_threshold 0 green_max_threshold 2097152 green_drop_probability 5 wred_green_enable true yellow_drop_probability 5 wred_red_enable true ----------------------- -------
Once congestion is experienced, it will bring Congestion Experienced marks.
Taoyuan city, Taiwan, 24th of June 2024. Netberg announced the new Aurora 721 100G and Aurora 421 10G switches, which feature programmable pipelines powered by Broadcom StrataXGS® Trident3 Ethernet switch chips.
Taoyuan city, Taiwan, January 24th, 2024. Netberg announced the release of two new models powered by the Broadcom StrataXGS® Trident3 series , the Netberg Aurora 221 1G switch and Aurora 621 25G switch.
Effective January 12, 2024: The following products are now End of Life (EOL) - Aurora 720 and Aurora 620.
Taoyuan city, Taiwan, December 20th, 2023. Netberg updates its Netberg SONiC distribution to release 2022.11 on Aurora 610, Aurora 710, and Aurora 750 P4-Programmable Intel Tofino IFP systems.
Taipei, Taiwan, 14th of November 2022. Netberg announced the new Aurora 810 400G model programmable switch with Intel Tofino 2 Intelligent Fabric Processors (IFPs) at its heart. The new platform has 32x 400G QSFP-DD Ethernet ports and a 12.8Tbps switching capacity.
Taipei, Taiwan, 24th of October 2022. Netberg participates in the new round of the Fast Forward Initiative by Intel (FFI'22). The program supports academic and research organizations today, aiming at accelerating tomorrow's best network programmability research.