Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat(eos_cli_config_gen): Add WRED support #3192

Merged
merged 10 commits into from
Nov 1, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,74 @@ QOS Profile: **uc_mc_queues_test**
| 2 | Multicast | - | - | - |
| 4 | Multicast | - | - | - |

QOS Profile: **wred_queues_test**

**Settings**

| Default COS | Default DSCP | Trust | Shape Rate | QOS Service Policy |
| ----------- | ------------ | ----- | ---------- | ------------------ |
| - | - | - | - | - |

**TX Queues**

| TX queue | Type | Bandwidth | Priority | Shape Rate | Comment |
| -------- | ---- | --------- | -------- | ---------- | ------- |
| 1 | All | 50 | no priority | - | Test no priority |
| 2 | All | 10 | priority strict | - | - |
| 3 | All | 10 | priority strict | - | - |
| 4 | All | 10 | - | - | Test guaranteed percent |
| 1 | Multicast | 50 | no priority | - | - |
| 2 | Multicast | 10 | priority strict | - | Test strict priority |
| 4 | Multicast | 10 | - | - | Test guaranteed percent |

**ECN Configuration**

| TX queue | Type | Min Threshold | Max Threshold | Max Mark Probability |
| -------- | ---- | ------------- | ------------- | -------------------- |
| 1 | All | - | - | - |
| 2 | All | - | - | - |
| 3 | All | 320 kbytes | 320 kbytes | - |
| 4 | All | - | - | - |
| 1 | Multicast | - | - | - |
| 2 | Multicast | - | - | - |
| 4 | Multicast | - | - | - |

**WRED Configuration**

| TX queue | Type | Drop Precedence | Min Threshold | Max Threshold | Drop Probability | Weight |
| -------- | ---- | --------------- | ------------- | ------------- | ---------------- | ------ |
| 1 | All | - | 1 kbytes | 10 kbytes | 100 | - |
| 2 | All | 2 | 2 kbytes | 200 kbytes | 50 | 10 |
| 3 | All | - | - | - | - | - |
| 4 | All | - | 1 kbytes | 10 kbytes | 90 | - |
| 1 | Multicast | - | - | - | - |
| 2 | Multicast | - | - | - | - |
| 4 | Multicast | - | - | - | - |

QOS Profile: **wred_uc_queues_test**

**Settings**

| Default COS | Default DSCP | Trust | Shape Rate | QOS Service Policy |
| ----------- | ------------ | ----- | ---------- | ------------------ |
| - | - | - | - | - |

**TX Queues**

| TX queue | Type | Bandwidth | Priority | Shape Rate | Comment |
| -------- | ---- | --------- | -------- | ---------- | ------- |
| 1 | Unicast | 50 | no priority | - | Test no priority |
| 2 | Unicast | 10 | priority strict | - | - |
| 4 | Unicast | 10 | - | - | Test guaranteed percent |

**WRED Configuration**

| TX queue | Type | Drop Precedence | Min Threshold | Max Threshold | Drop Probability | Weight |
| -------- | ---- | --------------- | ------------- | ------------- | ---------------- | ------ |
| 1 | Unicast | - |1 microseconds | 10 microseconds | 90 | 15 |
| 2 | Unicast | 1 |2 milliseconds | 20 milliseconds | 80 | - |
| 4 | Unicast | - |1 microseconds | 10 microseconds | 90 | - |

#### QOS Profile Device Configuration

```eos
Expand Down Expand Up @@ -552,6 +620,60 @@ qos profile uc_mc_queues_test
mc-tx-queue 4
!! Test guaranteed percent
bandwidth guaranteed percent 10
!
qos profile wred_queues_test
!
tx-queue 1
!! Test no priority
bandwidth percent 50
no priority
random-detect drop minimum-threshold 1 kbytes maximum-threshold 10 kbytes drop-probability 100
!
tx-queue 2
bandwidth percent 10
priority strict
random-detect drop drop-precedence 2 minimum-threshold 2 kbytes maximum-threshold 200 kbytes drop-probability 50 weight 10
!
tx-queue 3
bandwidth percent 10
priority strict
random-detect ecn minimum-threshold 320 kbytes maximum-threshold 320 kbytes weight 10
!
tx-queue 4
!! Test guaranteed percent
bandwidth guaranteed percent 10
random-detect drop minimum-threshold 1 kbytes maximum-threshold 10 kbytes drop-probability 90
!
mc-tx-queue 1
bandwidth percent 50
no priority
!
mc-tx-queue 2
!! Test strict priority
bandwidth percent 10
priority strict
!
mc-tx-queue 4
!! Test guaranteed percent
bandwidth guaranteed percent 10
!
qos profile wred_uc_queues_test
!
uc-tx-queue 1
!! Test no priority
bandwidth percent 50
no priority
random-detect drop minimum-threshold 1 microseconds maximum-threshold 10 microseconds drop-probability 90 weight 15
!
uc-tx-queue 2
bandwidth percent 10
priority strict
random-detect drop drop-precedence 1 minimum-threshold 2 milliseconds maximum-threshold 20 milliseconds drop-probability 80
!
uc-tx-queue 4
!! Test guaranteed percent
bandwidth guaranteed percent 10
random-detect drop minimum-threshold 1 microseconds maximum-threshold 10 microseconds drop-probability 90
```

#### QOS Interfaces
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,60 @@ qos profile uc_mc_queues_test
!! Test guaranteed percent
bandwidth guaranteed percent 10
!
qos profile wred_queues_test
!
tx-queue 1
!! Test no priority
bandwidth percent 50
no priority
random-detect drop minimum-threshold 1 kbytes maximum-threshold 10 kbytes drop-probability 100
!
tx-queue 2
bandwidth percent 10
priority strict
random-detect drop drop-precedence 2 minimum-threshold 2 kbytes maximum-threshold 200 kbytes drop-probability 50 weight 10
!
tx-queue 3
bandwidth percent 10
priority strict
random-detect ecn minimum-threshold 320 kbytes maximum-threshold 320 kbytes weight 10
!
tx-queue 4
!! Test guaranteed percent
bandwidth guaranteed percent 10
random-detect drop minimum-threshold 1 kbytes maximum-threshold 10 kbytes drop-probability 90
!
mc-tx-queue 1
bandwidth percent 50
no priority
!
mc-tx-queue 2
!! Test strict priority
bandwidth percent 10
priority strict
!
mc-tx-queue 4
!! Test guaranteed percent
bandwidth guaranteed percent 10
!
qos profile wred_uc_queues_test
!
uc-tx-queue 1
!! Test no priority
bandwidth percent 50
no priority
random-detect drop minimum-threshold 1 microseconds maximum-threshold 10 microseconds drop-probability 90 weight 15
!
uc-tx-queue 2
bandwidth percent 10
priority strict
random-detect drop drop-precedence 1 minimum-threshold 2 milliseconds maximum-threshold 20 milliseconds drop-probability 80
!
uc-tx-queue 4
!! Test guaranteed percent
bandwidth guaranteed percent 10
random-detect drop minimum-threshold 1 microseconds maximum-threshold 10 microseconds drop-probability 90
!
no enable password
no aaa root
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,97 @@ qos_profiles:
- id: 4
bandwidth_guaranteed_percent: 10
comment: "Test guaranteed percent"
- name: wred_queues_test
tx_queues:
- id: 1
bandwidth_percent: 50
priority: 'no priority'
comment: "Test no priority"
random_detect:
drop:
threshold:
units: kbytes
min: 1
max: 10
drop_probability: 100
- id: 2
bandwidth_percent: 10
priority: 'priority strict'
random_detect:
drop:
threshold:
drop_precedence: 2
units: kbytes
min: 2
max: 200
drop_probability: 50
weight: 10
- id: 3
bandwidth_percent: 10
priority: 'priority strict'
random_detect:
ecn:
threshold:
units: kbytes
min: 320
max: 320
weight: 10
- id: 4
bandwidth_guaranteed_percent: 10
comment: "Test guaranteed percent"
random_detect:
drop:
threshold:
units: kbytes
min: 1
max: 10
drop_probability: 90
mc_tx_queues:
- id: 1
bandwidth_percent: 50
priority: 'no priority'
- id: 2
bandwidth_percent: 10
priority: 'priority strict'
comment: "Test strict priority"
- id: 4
bandwidth_guaranteed_percent: 10
comment: "Test guaranteed percent"
- name: wred_uc_queues_test
uc_tx_queues:
- id: 1
bandwidth_percent: 50
priority: 'no priority'
comment: "Test no priority"
random_detect:
drop:
threshold:
units: "microseconds"
min: 1
max: 10
drop_probability: 90
weight: 15
- id: 2
bandwidth_percent: 10
priority: 'priority strict'
random_detect:
drop:
threshold:
drop_precedence: 1
units: "milliseconds"
min: 2
max: 20
drop_probability: 80
- id: 4
bandwidth_guaranteed_percent: 10
comment: "Test guaranteed percent"
random_detect:
drop:
threshold:
units: "microseconds"
min: 1
max: 10
drop_probability: 90

policy_maps:
qos:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;max</samp>](## "qos_profiles.[].tx_queues.[].random_detect.ecn.threshold.max") | Integer | Required | | Min: 1 | Random-detect ECN maximum-threshold |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;max_probability</samp>](## "qos_profiles.[].tx_queues.[].random_detect.ecn.threshold.max_probability") | Integer | | | Min: 1<br>Max: 100 | Random-detect ECN maximum mark probability |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;weight</samp>](## "qos_profiles.[].tx_queues.[].random_detect.ecn.threshold.weight") | Integer | | | Min: 0<br>Max: 15 | Random-detect ECN weight |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;drop</samp>](## "qos_profiles.[].tx_queues.[].random_detect.drop") | Dictionary | | | | Set WRED parameters |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;threshold</samp>](## "qos_profiles.[].tx_queues.[].random_detect.drop.threshold") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;units</samp>](## "qos_profiles.[].tx_queues.[].random_detect.drop.threshold.units") | String | Required | | Valid Values:<br>- segments<br>- bytes<br>- kbytes<br>- mbytes<br>- microseconds<br>- milliseconds | Units to be used for the threshold values. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;drop_precedence</samp>](## "qos_profiles.[].tx_queues.[].random_detect.drop.threshold.drop_precedence") | Integer | | | Min: 0<br>Max: 2 | Specify Drop Precendence value |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;min</samp>](## "qos_profiles.[].tx_queues.[].random_detect.drop.threshold.min") | Integer | Required | | Min: 1 | WRED minimum-threshold |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;max</samp>](## "qos_profiles.[].tx_queues.[].random_detect.drop.threshold.max") | Integer | Required | | Min: 1 | WRED maximum-threshold |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;drop_probability</samp>](## "qos_profiles.[].tx_queues.[].random_detect.drop.threshold.drop_probability") | Integer | Required | | Min: 1<br>Max: 100 | WRED drop probability. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;weight</samp>](## "qos_profiles.[].tx_queues.[].random_detect.drop.threshold.weight") | Integer | | | Min: 0<br>Max: 15 | WRED weight |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;uc_tx_queues</samp>](## "qos_profiles.[].uc_tx_queues") | List, items: Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- id</samp>](## "qos_profiles.[].uc_tx_queues.[].id") | Integer | Required, Unique | | | UC TX queue ID |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bandwidth_percent</samp>](## "qos_profiles.[].uc_tx_queues.[].bandwidth_percent") | Integer | | | | |
Expand All @@ -51,6 +59,14 @@
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;max</samp>](## "qos_profiles.[].uc_tx_queues.[].random_detect.ecn.threshold.max") | Integer | Required | | Min: 1 | Random-detect ECN maximum-threshold |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;max_probability</samp>](## "qos_profiles.[].uc_tx_queues.[].random_detect.ecn.threshold.max_probability") | Integer | | | Min: 1<br>Max: 100 | Random-detect ECN maximum mark probability |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;weight</samp>](## "qos_profiles.[].uc_tx_queues.[].random_detect.ecn.threshold.weight") | Integer | | | Min: 0<br>Max: 15 | Random-detect ECN weight |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;drop</samp>](## "qos_profiles.[].uc_tx_queues.[].random_detect.drop") | Dictionary | | | | Set WRED parameters |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;threshold</samp>](## "qos_profiles.[].uc_tx_queues.[].random_detect.drop.threshold") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;units</samp>](## "qos_profiles.[].uc_tx_queues.[].random_detect.drop.threshold.units") | String | Required | | Valid Values:<br>- segments<br>- bytes<br>- kbytes<br>- mbytes<br>- microseconds<br>- milliseconds | Units to be used for the threshold values. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;drop_precedence</samp>](## "qos_profiles.[].uc_tx_queues.[].random_detect.drop.threshold.drop_precedence") | Integer | | | Min: 0<br>Max: 2 | Specify Drop Precendence value |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;min</samp>](## "qos_profiles.[].uc_tx_queues.[].random_detect.drop.threshold.min") | Integer | Required | | Min: 1 | WRED minimum-threshold |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;max</samp>](## "qos_profiles.[].uc_tx_queues.[].random_detect.drop.threshold.max") | Integer | Required | | Min: 1 | WRED maximum-threshold |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;drop_probability</samp>](## "qos_profiles.[].uc_tx_queues.[].random_detect.drop.threshold.drop_probability") | Integer | Required | | Min: 1<br>Max: 100 | WRED drop probability. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;weight</samp>](## "qos_profiles.[].uc_tx_queues.[].random_detect.drop.threshold.weight") | Integer | | | Min: 0<br>Max: 15 | WRED weight |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;mc_tx_queues</samp>](## "qos_profiles.[].mc_tx_queues") | List, items: Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- id</samp>](## "qos_profiles.[].mc_tx_queues.[].id") | Integer | Required, Unique | | | MC TX queue ID |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bandwidth_percent</samp>](## "qos_profiles.[].mc_tx_queues.[].bandwidth_percent") | Integer | | | | |
Expand Down Expand Up @@ -103,6 +119,14 @@
max: <int>
max_probability: <int>
weight: <int>
drop:
threshold:
units: <str>
drop_precedence: <int>
min: <int>
max: <int>
drop_probability: <int>
weight: <int>
uc_tx_queues:
- id: <int>
bandwidth_percent: <int>
Expand All @@ -120,6 +144,14 @@
max: <int>
max_probability: <int>
weight: <int>
drop:
threshold:
units: <str>
drop_precedence: <int>
min: <int>
max: <int>
drop_probability: <int>
weight: <int>
mc_tx_queues:
- id: <int>
bandwidth_percent: <int>
Expand Down
Loading