You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/cumulus-linux-517/Layer-1-and-Switch-Ports/Quality-of-Service/_index.md
+109-1Lines changed: 109 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -821,7 +821,7 @@ To show the small packet probability configuration, run the `nv show interface <
821
821
822
822
Explicit Congestion Notification (ECN) is an end-to-end layer 3 congestion control protocol. Defined by RFC 3168, ECN relies on bits in the IPv4 header Traffic Class to signal congestion conditions. ECN requires one or both server endpoints to support ECN to be effective.
823
823
824
-
Instead of telling adjacent devices to stop transmitting during times of buffer congestion, ECN sets the ECN bits of the transit IPv4 or IPv6 header to indicate to end hosts that congestion might occur. As a result, the sending hosts reduce their sending rate until the transit switch no longer sets ECN bits.
824
+
Instead of signaling to adjacent devices to stop transmitting during times of buffer congestion, ECN sets the ECN bits of the transit IPv4 or IPv6 header to indicate to end hosts that congestion might occur. As a result, the sending hosts reduce their sending rate until the transit switch no longer sets ECN bits.
825
825
826
826
You use ECN with {{<linktitle="RDMA over Converged Ethernet - RoCE"text="RDMA over Converged Ethernet - RoCE">}}. The RoCE section describes how to deploy PFC and ECN for RoCE environments.
To apply a custom ECN profile to specific interfaces, see [Port Groups](#ecn).
915
915
916
+
### Dynamic ECN
917
+
918
+
{{%notice note%}}
919
+
Dynamic ECN is a Beta feature.
920
+
{{%/notice%}}
921
+
922
+
Dynamic ECN is a congestion marking mechanism optimized for high-performance traffic, where bursty traffic requires immediate congestion signals to prevent buffer exhaustion. This feature provides extremely fast and aggressive feedback to mitigate microbursts and sudden congestion by triggering ECN marking based on the percentage of available shared buffer instead of static byte thresholds.
923
+
924
+
{{%notice note%}}
925
+
- Cumulus Linux supports dynamic ECN on switches with Spectrum-4 and later.
926
+
- ECN marking probability has a hardware granularity of 1 percent; effective probabilities below 1 percent do not produce any marking.
927
+
{{%/notice%}}
928
+
929
+
To configure dynamic ECN:
930
+
- Set the dynamic ECN mode to `relative` for the `default-global` profile to apply system-wide default settings or for a custom profile for specific port groups. The default value is `absolute`.
931
+
932
+
When you set the dynamic ECN mode to `relative`, the switch hardware ignores existing byte thresholds and the ASIC immediately begins marking based on the dynamic buffer calculation: threshold = (alpha_quota * percent) / 100. When you set the dynamic ECN mode to `absolute`, the switch hardware ignores percentage thresholds and the ASIC reverts to marking based on static cell counts derived from the configured byte values.
933
+
934
+
- Configure the minumum ECN marking threshold as a percentage (0 through 100) of the dynamic buffer allowance. The switch marks packets when queue occupancy exceeds this percentage. The default value is 0.
935
+
- Configure the maximum ECN marking threshold as a percentage (0 through 100) of the dynamic buffer allowance. The value must be greater than or equal to the minumum threshold percent. The default value is 100.
936
+
<!--
937
+
{{%notice note%}}
938
+
To maintain statistical integrity and prevent mixing `absolute` mark counts with `relative` mark counts in historical data, Cumulus Linux resets ECN counters for the affected traffic class to zero for any mode transition.
939
+
{{%/notice%}}
940
+
-->
941
+
The following commands set dynamic ECN mode to `relative` for the default profile, configure the minumum ECN marking threshold to 20 percent and the maximum ECN marking threshold to 80 percent:
942
+
943
+
{{< tabs "TabID936 ">}}
944
+
{{< tab "NVUE Commands ">}}
945
+
946
+
```
947
+
cumulus@switch:~$ nv set qos congestion-control default-global traffic-class 3 mode relative
948
+
cumulus@switch:~$ nv set qos congestion-control default-global traffic-class 3 min-threshold-percent 20
949
+
cumulus@switch:~$ nv set qos congestion-control default-global traffic-class 3 max-threshold-percent 80
950
+
cumulus@switch:~$ nv config apply
951
+
```
952
+
953
+
To disable dynamic ECN, set the mode to `absolute` with the `nv set qos congestion-control <profile> traffic-class 3 mode absolute` command. Reconfigure the {{<linktitle="#congestion-control-(ecn)"text="byte thresholds">}} if you do not want to use the default values.
954
+
955
+
```
956
+
cumulus@switch:~$ nv set qos congestion-control default-global traffic-class 3 mode absolute
957
+
cumulus@switch:~$ nv config apply
958
+
```
959
+
960
+
{{< /tab >}}
961
+
{{< tab "Linux Commands ">}}
962
+
963
+
Edit the `Explicit Congestion Notification` section of the `/etc/cumulus/datapath/qos/qos_features.conf` file to add relative mode, and the minimum and maximum threshold percentages.
964
+
965
+
```
966
+
default_ecn_red_conf.egress_queue_list = [4,5,7]
967
+
default_ecn_red_conf.ecn_enable = true
968
+
default_ecn_red_conf.red_enable = false
969
+
# Mode Setting
970
+
default_ecn_red_conf.mode = relative
971
+
# Byte Thresholds (Ignored/Zero)
972
+
default_ecn_red_conf.min_threshold_bytes = 0
973
+
default_ecn_red_conf.max_threshold_bytes = 0
974
+
# Percent Thresholds (Active)
975
+
default_ecn_red_conf.min_threshold_percent = 20
976
+
default_ecn_red_conf.max_threshold_percent = 80
977
+
default_ecn_red_conf.probability = 100
978
+
```
979
+
980
+
To disable dynamic ECN, set the mode to `absolute`, and configure the `min_threshold_bytes` and `max_threshold_bytes` parameters.
Cumulus Linux supports eight egress queues to provide different classes of service. By default switch priority values map directly to the matching egress queue. For example, switch priority value 0 maps to egress queue 0.
- {{<linkurl="Quality-of-Service/#lossless-headroom-based-on-small-packet-probability"text="Lossless headroom size based on small packet probability">}} (Beta)
0 commit comments