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

DP-1.3 Adding required scheduler config before binding it to an Interface #2671

Merged
merged 26 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
c2ad182
Fix DP-1.3
charantejag504 Feb 16, 2024
842ff0f
Fix DP-1.3 and remove deviations
charantejag504 Feb 16, 2024
e869000
correction
charantejag504 Feb 16, 2024
8e80d3e
Merge branch 'main' into DP13
charantejag504 Mar 7, 2024
2cf1790
Merge branch 'main' into DP13
charantejag504 Apr 29, 2024
1dc5be3
removing deviations in the script
charantejag504 May 9, 2024
e2b1c75
Merge branch 'main' into DP13
charantejag504 May 9, 2024
ea97582
fix readme
charantejag504 May 9, 2024
8ffbdaa
Merge branch 'DP13' of https://github.com/charantejag504/featureprofi…
charantejag504 May 9, 2024
909b42c
Merge branch 'main' into DP13
charantejag504 May 9, 2024
bd0822f
fix readme
charantejag504 May 9, 2024
b327fbf
Merge branch 'DP13' of https://github.com/charantejag504/featureprofi…
charantejag504 May 9, 2024
d0812a0
fix readme
charantejag504 May 9, 2024
425d0ba
update
charantejag504 May 9, 2024
edba001
correction
charantejag504 May 30, 2024
7793f39
correction
charantejag504 May 30, 2024
7218abd
Merge branch 'main' into DP13
charantejag504 May 31, 2024
f52aaa8
Merge branch 'main' into DP13
charantejag504 Jun 6, 2024
944190b
Merge branch 'main' into DP13
charantejag504 Jun 6, 2024
77f6615
Merge branch 'main' into DP13
charantejag504 Jun 13, 2024
884e321
Merge branch 'main' into DP13
charantejag504 Jun 20, 2024
d78619e
Merge branch 'main' into DP13
charantejag504 Jul 2, 2024
4da39b2
update
charantejag504 Jul 10, 2024
37c8847
Merge branch 'main' into DP13
charantejag504 Jul 10, 2024
b9c3dba
Merge branch 'main' into DP13
charantejag504 Jul 25, 2024
b03cd23
Merge branch 'main' into DP13
charantejag504 Jul 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 38 additions & 2 deletions feature/qos/tests/qos_ecn_config_test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Verify QoS ECN feature configuration.

* ECN
* [TODO] qos/queue-management-profiles/queue-management-profile/wred/uniform/config/min-threshold-percent
* [TODO] qos/queue-management-profiles/queue-management-profile/wred/uniform/config/max-threshold-percent
* [TODO] qos/queue-management-profiles/queue-management-profile/wred/uniform/config/max-threshold-percent
* qos/queue-management-profiles/queue-management-profile/wred/uniform/config/min-threshold
* qos/queue-management-profiles/queue-management-profile/wred/uniform/config/max-threshold
* qos/queue-management-profiles/queue-management-profile/wred/uniform/config/enable-ecn
Expand All @@ -79,7 +79,7 @@ Verify QoS ECN feature configuration.
* ECN

* [TODO] qos/queue-management-profiles/queue-management-profile/wred/uniform/state/min-threshold-percent
* [TODO] qos/queue-management-profiles/queue-management-profile/wred/uniform/state/max-threshold-percent
* [TODO] qos/queue-management-profiles/queue-management-profile/wred/uniform/state/max-threshold-percent
* qos/queue-management-profiles/queue-management-profile/wred/uniform/state/min-threshold
* qos/queue-management-profiles/queue-management-profile/wred/uniform/state/max-threshold
* qos/queue-management-profiles/queue-management-profile/wred/uniform/state/enable-ecn
Expand All @@ -96,3 +96,39 @@ Verify QoS ECN feature configuration.
## platform

* vRX

## OpenConfig Path and RPC Coverage

The below yaml defines the OC paths intended to be covered by this test. OC
paths used for test setup are not listed here.

```yaml
paths:
## Config paths
/qos/queue-management-profiles/queue-management-profile/wred/uniform/config/min-threshold:
/qos/queue-management-profiles/queue-management-profile/wred/uniform/config/max-threshold:
/qos/queue-management-profiles/queue-management-profile/wred/uniform/config/enable-ecn:
/qos/queue-management-profiles/queue-management-profile/wred/uniform/config/weight:
/qos/queue-management-profiles/queue-management-profile/wred/uniform/config/drop:
/qos/queue-management-profiles/queue-management-profile/wred/uniform/config/max-drop-probability-percent:
/qos/interfaces/interface/input/classifiers/classifier/config/name:
/qos/interfaces/interface/output/queues/queue/config/name:
/qos/interfaces/interface/output/queues/queue/config/queue-management-profile:

## State paths:

/qos/queue-management-profiles/queue-management-profile/wred/uniform/state/min-threshold:
/qos/queue-management-profiles/queue-management-profile/wred/uniform/state/max-threshold:
/qos/queue-management-profiles/queue-management-profile/wred/uniform/state/enable-ecn:
/qos/queue-management-profiles/queue-management-profile/wred/uniform/state/weight:
/qos/queue-management-profiles/queue-management-profile/wred/uniform/state/drop:
/qos/queue-management-profiles/queue-management-profile/wred/uniform/state/max-drop-probability-percent:
/qos/interfaces/interface/input/classifiers/classifier/state/name:
/qos/interfaces/interface/output/queues/queue/state/name:
/qos/interfaces/interface/output/queues/queue/state/queue-management-profile:

rpcs:
gnmi:
gNMI.Set:
Replace:
```
4 changes: 0 additions & 4 deletions feature/qos/tests/qos_ecn_config_test/metadata.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ platform_exceptions: {
platform: {
vendor: JUNIPER
}
deviations: {
state_path_unsupported: true
drop_weight_leaves_unsupported: true
}
}
platform_exceptions: {
platform: {
Expand Down
76 changes: 76 additions & 0 deletions feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,46 +302,114 @@ func testQoSOutputIntfConfig(t *testing.T, q *oc.Qos) {
dp := dut.Port(t, "port2")
queues := netutil.CommonTrafficQueues(t, dut)

ecnConfig := struct {
ecnEnabled bool
dropEnabled bool
minThreshold uint64
maxThreshold uint64
maxDropProbabilityPercent uint8
weight uint32
}{
ecnEnabled: true,
dropEnabled: false,
minThreshold: uint64(80000),
maxThreshold: uint64(80000),
maxDropProbabilityPercent: uint8(100),
weight: uint32(0),
}

queueMgmtProfile := q.GetOrCreateQueueManagementProfile("DropProfile")
queueMgmtProfile.SetName("DropProfile")
wred := queueMgmtProfile.GetOrCreateWred()
uniform := wred.GetOrCreateUniform()
uniform.SetEnableEcn(ecnConfig.ecnEnabled)
uniform.SetDrop(ecnConfig.dropEnabled)
wantMinThreshold := ecnConfig.minThreshold
wantMaxThreshold := ecnConfig.maxThreshold
if deviations.EcnSameMinMaxThresholdUnsupported(dut) {
wantMinThreshold = CiscoMinThreshold
wantMaxThreshold = CiscoMaxThreshold
}
uniform.SetMinThreshold(wantMinThreshold)
uniform.SetMaxThreshold(wantMaxThreshold)
uniform.SetMaxDropProbabilityPercent(ecnConfig.maxDropProbabilityPercent)
if !deviations.QosSetWeightConfigUnsupported(dut) {
uniform.SetWeight(ecnConfig.weight)
}

cases := []struct {
desc string
queueName string
ecnProfile string
scheduler string
sequence uint32
priority oc.E_Scheduler_Priority
inputID string
inputType oc.E_Input_InputType
weight uint64
}{{
desc: "output-interface-BE1",
queueName: queues.BE1,
ecnProfile: "DropProfile",
scheduler: "scheduler",
sequence: uint32(1),
priority: oc.Scheduler_Priority_UNSET,
inputType: oc.Input_InputType_QUEUE,
weight: uint64(1),
}, {
desc: "output-interface-BE0",
queueName: queues.BE0,
ecnProfile: "DropProfile",
scheduler: "scheduler",
sequence: uint32(1),
priority: oc.Scheduler_Priority_UNSET,
inputType: oc.Input_InputType_QUEUE,
weight: uint64(4),
}, {
desc: "output-interface-AF1",
queueName: queues.AF1,
ecnProfile: "DropProfile",
scheduler: "scheduler",
sequence: uint32(1),
priority: oc.Scheduler_Priority_UNSET,
inputType: oc.Input_InputType_QUEUE,
weight: uint64(8),
}, {
desc: "output-interface-AF2",
queueName: queues.AF2,
ecnProfile: "DropProfile",
scheduler: "scheduler",
sequence: uint32(1),
priority: oc.Scheduler_Priority_UNSET,
inputType: oc.Input_InputType_QUEUE,
weight: uint64(16),
}, {
desc: "output-interface-AF3",
queueName: queues.AF3,
ecnProfile: "DropProfile",
scheduler: "scheduler",
sequence: uint32(1),
priority: oc.Scheduler_Priority_UNSET,
inputType: oc.Input_InputType_QUEUE,
weight: uint64(32),
}, {
desc: "output-interface-AF4",
queueName: queues.AF4,
ecnProfile: "DropProfile",
scheduler: "scheduler",
sequence: uint32(0),
priority: oc.Scheduler_Priority_STRICT,
inputType: oc.Input_InputType_QUEUE,
weight: uint64(6),
}, {
desc: "output-interface-NC1",
queueName: queues.NC1,
ecnProfile: "DropProfile",
scheduler: "scheduler",
sequence: uint32(0),
priority: oc.Scheduler_Priority_STRICT,
inputType: oc.Input_InputType_QUEUE,
weight: uint64(7),
}}

i := q.GetOrCreateInterface(dp.Name())
Expand All @@ -366,6 +434,14 @@ func testQoSOutputIntfConfig(t *testing.T, q *oc.Qos) {
for _, tc := range cases {
t.Run(tc.desc, func(t *testing.T) {
qoscfg.SetForwardingGroup(t, dut, q, tc.queueName, tc.queueName)
s := schedulerPolicy.GetOrCreateScheduler(tc.sequence)
s.SetSequence(tc.sequence)
s.SetPriority(tc.priority)
input := s.GetOrCreateInput(tc.queueName)
input.SetId(tc.queueName)
input.SetInputType(tc.inputType)
input.SetQueue(tc.queueName)
input.SetWeight(tc.weight)
output := i.GetOrCreateOutput()
schedulerPolicy := output.GetOrCreateSchedulerPolicy()
schedulerPolicy.SetName(tc.scheduler)
Expand Down
Loading