From c2ad182594aaea4c00c30f65e35f9041f21a6eac Mon Sep 17 00:00:00 2001 From: charantejag504 Date: Thu, 15 Feb 2024 16:13:20 -0800 Subject: [PATCH 01/11] Fix DP-1.3 --- .../qos_ecn_config_test.go | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go b/feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go index 0e9f12ffedf..bc567bd2c26 100644 --- a/feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go +++ b/feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go @@ -307,41 +307,74 @@ func testQoSOutputIntfConfig(t *testing.T, q *oc.Qos) { 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()) @@ -366,6 +399,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) From 842ff0f2f9c2a3b2eed0341d876d63298e283daf Mon Sep 17 00:00:00 2001 From: charantejag504 Date: Thu, 15 Feb 2024 16:40:18 -0800 Subject: [PATCH 02/11] Fix DP-1.3 and remove deviations --- .../qos_ecn_config_test/metadata.textproto | 4 -- .../qos_ecn_config_test.go | 42 ++++++++----------- 2 files changed, 18 insertions(+), 28 deletions(-) diff --git a/feature/qos/tests/qos_ecn_config_test/metadata.textproto b/feature/qos/tests/qos_ecn_config_test/metadata.textproto index 729421003ce..2a2d548b8bb 100644 --- a/feature/qos/tests/qos_ecn_config_test/metadata.textproto +++ b/feature/qos/tests/qos_ecn_config_test/metadata.textproto @@ -9,10 +9,6 @@ platform_exceptions: { platform: { vendor: JUNIPER } - deviations: { - state_path_unsupported: true - drop_weight_leaves_unsupported: true - } } platform_exceptions: { platform: { diff --git a/feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go b/feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go index bc567bd2c26..536c17d2fcf 100644 --- a/feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go +++ b/feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go @@ -279,21 +279,17 @@ func testECNConfig(t *testing.T, q *oc.Qos) { } } - if !deviations.StatePathsUnsupported(dut) { - if got, want := gnmi.Get(t, dut, wredUniform.MinThreshold().State()), ecnConfig.minThreshold; got != want { - t.Errorf("wredUniform.MinThreshold().State(): got %v, want %v", got, want) - } - if got, want := gnmi.Get(t, dut, wredUniform.MaxThreshold().State()), ecnConfig.maxThreshold; got != want { - t.Errorf("wredUniform.MaxThreshold().State(): got %v, want %v", got, want) - } + if got, want := gnmi.Get(t, dut, wredUniform.MinThreshold().State()), ecnConfig.minThreshold; got != want { + t.Errorf("wredUniform.MinThreshold().State(): got %v, want %v", got, want) } - if !deviations.DropWeightLeavesUnsupported(dut) { - if got, want := gnmi.Get(t, dut, wredUniform.Drop().State()), ecnConfig.dropEnabled; got != want { - t.Errorf("wredUniform.Drop().State(): got %v, want %v", got, want) - } - if got, want := gnmi.Get(t, dut, wredUniform.Weight().State()), ecnConfig.weight; got != want { - t.Errorf("wredUniform.Weight().State(): got %v, want %v", got, want) - } + if got, want := gnmi.Get(t, dut, wredUniform.MaxThreshold().State()), ecnConfig.maxThreshold; got != want { + t.Errorf("wredUniform.MaxThreshold().State(): got %v, want %v", got, want) + } + if got, want := gnmi.Get(t, dut, wredUniform.Drop().State()), ecnConfig.dropEnabled; got != want { + t.Errorf("wredUniform.Drop().State(): got %v, want %v", got, want) + } + if got, want := gnmi.Get(t, dut, wredUniform.Weight().State()), ecnConfig.weight; got != want { + t.Errorf("wredUniform.Weight().State(): got %v, want %v", got, want) } } @@ -425,16 +421,14 @@ func testQoSOutputIntfConfig(t *testing.T, q *oc.Qos) { // Verify the policy is applied by checking the telemetry path state values. policy := gnmi.OC().Qos().Interface(dp.Name()).Output().SchedulerPolicy() outQueue := gnmi.OC().Qos().Interface(dp.Name()).Output().Queue(tc.queueName) - if !deviations.StatePathsUnsupported(dut) { - if got, want := gnmi.Get(t, dut, policy.Name().State()), tc.scheduler; got != want { - t.Errorf("policy.Name().State(): got %v, want %v", got, want) - } - if got, want := gnmi.Get(t, dut, outQueue.Name().State()), tc.queueName; got != want { - t.Errorf("outQueue.Name().State(): got %v, want %v", got, want) - } - if got, want := gnmi.Get(t, dut, outQueue.QueueManagementProfile().State()), tc.ecnProfile; got != want { - t.Errorf("outQueue.QueueManagementProfile().State(): got %v, want %v", got, want) - } + if got, want := gnmi.Get(t, dut, policy.Name().State()), tc.scheduler; got != want { + t.Errorf("policy.Name().State(): got %v, want %v", got, want) + } + if got, want := gnmi.Get(t, dut, outQueue.Name().State()), tc.queueName; got != want { + t.Errorf("outQueue.Name().State(): got %v, want %v", got, want) + } + if got, want := gnmi.Get(t, dut, outQueue.QueueManagementProfile().State()), tc.ecnProfile; got != want { + t.Errorf("outQueue.QueueManagementProfile().State(): got %v, want %v", got, want) } if deviations.QosGetStatePathUnsupported(dut) { if got, want := gnmi.Get(t, dut, policy.Name().Config()), tc.scheduler; got != want { From e86900024558f338bd0c34c454d25dfa37c209ed Mon Sep 17 00:00:00 2001 From: charantejag504 Date: Thu, 15 Feb 2024 16:49:00 -0800 Subject: [PATCH 03/11] correction --- .../qos_ecn_config_test.go | 42 +++++++++++-------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go b/feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go index 536c17d2fcf..bc567bd2c26 100644 --- a/feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go +++ b/feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go @@ -279,17 +279,21 @@ func testECNConfig(t *testing.T, q *oc.Qos) { } } - if got, want := gnmi.Get(t, dut, wredUniform.MinThreshold().State()), ecnConfig.minThreshold; got != want { - t.Errorf("wredUniform.MinThreshold().State(): got %v, want %v", got, want) - } - if got, want := gnmi.Get(t, dut, wredUniform.MaxThreshold().State()), ecnConfig.maxThreshold; got != want { - t.Errorf("wredUniform.MaxThreshold().State(): got %v, want %v", got, want) - } - if got, want := gnmi.Get(t, dut, wredUniform.Drop().State()), ecnConfig.dropEnabled; got != want { - t.Errorf("wredUniform.Drop().State(): got %v, want %v", got, want) + if !deviations.StatePathsUnsupported(dut) { + if got, want := gnmi.Get(t, dut, wredUniform.MinThreshold().State()), ecnConfig.minThreshold; got != want { + t.Errorf("wredUniform.MinThreshold().State(): got %v, want %v", got, want) + } + if got, want := gnmi.Get(t, dut, wredUniform.MaxThreshold().State()), ecnConfig.maxThreshold; got != want { + t.Errorf("wredUniform.MaxThreshold().State(): got %v, want %v", got, want) + } } - if got, want := gnmi.Get(t, dut, wredUniform.Weight().State()), ecnConfig.weight; got != want { - t.Errorf("wredUniform.Weight().State(): got %v, want %v", got, want) + if !deviations.DropWeightLeavesUnsupported(dut) { + if got, want := gnmi.Get(t, dut, wredUniform.Drop().State()), ecnConfig.dropEnabled; got != want { + t.Errorf("wredUniform.Drop().State(): got %v, want %v", got, want) + } + if got, want := gnmi.Get(t, dut, wredUniform.Weight().State()), ecnConfig.weight; got != want { + t.Errorf("wredUniform.Weight().State(): got %v, want %v", got, want) + } } } @@ -421,14 +425,16 @@ func testQoSOutputIntfConfig(t *testing.T, q *oc.Qos) { // Verify the policy is applied by checking the telemetry path state values. policy := gnmi.OC().Qos().Interface(dp.Name()).Output().SchedulerPolicy() outQueue := gnmi.OC().Qos().Interface(dp.Name()).Output().Queue(tc.queueName) - if got, want := gnmi.Get(t, dut, policy.Name().State()), tc.scheduler; got != want { - t.Errorf("policy.Name().State(): got %v, want %v", got, want) - } - if got, want := gnmi.Get(t, dut, outQueue.Name().State()), tc.queueName; got != want { - t.Errorf("outQueue.Name().State(): got %v, want %v", got, want) - } - if got, want := gnmi.Get(t, dut, outQueue.QueueManagementProfile().State()), tc.ecnProfile; got != want { - t.Errorf("outQueue.QueueManagementProfile().State(): got %v, want %v", got, want) + if !deviations.StatePathsUnsupported(dut) { + if got, want := gnmi.Get(t, dut, policy.Name().State()), tc.scheduler; got != want { + t.Errorf("policy.Name().State(): got %v, want %v", got, want) + } + if got, want := gnmi.Get(t, dut, outQueue.Name().State()), tc.queueName; got != want { + t.Errorf("outQueue.Name().State(): got %v, want %v", got, want) + } + if got, want := gnmi.Get(t, dut, outQueue.QueueManagementProfile().State()), tc.ecnProfile; got != want { + t.Errorf("outQueue.QueueManagementProfile().State(): got %v, want %v", got, want) + } } if deviations.QosGetStatePathUnsupported(dut) { if got, want := gnmi.Get(t, dut, policy.Name().Config()), tc.scheduler; got != want { From 1dc5be396b029f7c87cc8745ecb9b1f8b31a140a Mon Sep 17 00:00:00 2001 From: charantejag504 Date: Thu, 9 May 2024 13:19:44 -0700 Subject: [PATCH 04/11] removing deviations in the script --- .../qos_ecn_config_test.go | 45 +++++++++---------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go b/feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go index bc567bd2c26..6583a5f6888 100644 --- a/feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go +++ b/feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go @@ -279,22 +279,20 @@ func testECNConfig(t *testing.T, q *oc.Qos) { } } - if !deviations.StatePathsUnsupported(dut) { - if got, want := gnmi.Get(t, dut, wredUniform.MinThreshold().State()), ecnConfig.minThreshold; got != want { - t.Errorf("wredUniform.MinThreshold().State(): got %v, want %v", got, want) - } - if got, want := gnmi.Get(t, dut, wredUniform.MaxThreshold().State()), ecnConfig.maxThreshold; got != want { - t.Errorf("wredUniform.MaxThreshold().State(): got %v, want %v", got, want) - } + if got, want := gnmi.Get(t, dut, wredUniform.MinThreshold().State()), ecnConfig.minThreshold; got != want { + t.Errorf("wredUniform.MinThreshold().State(): got %v, want %v", got, want) } - if !deviations.DropWeightLeavesUnsupported(dut) { - if got, want := gnmi.Get(t, dut, wredUniform.Drop().State()), ecnConfig.dropEnabled; got != want { - t.Errorf("wredUniform.Drop().State(): got %v, want %v", got, want) - } - if got, want := gnmi.Get(t, dut, wredUniform.Weight().State()), ecnConfig.weight; got != want { - t.Errorf("wredUniform.Weight().State(): got %v, want %v", got, want) - } + if got, want := gnmi.Get(t, dut, wredUniform.MaxThreshold().State()), ecnConfig.maxThreshold; got != want { + t.Errorf("wredUniform.MaxThreshold().State(): got %v, want %v", got, want) + } + + if got, want := gnmi.Get(t, dut, wredUniform.Drop().State()), ecnConfig.dropEnabled; got != want { + t.Errorf("wredUniform.Drop().State(): got %v, want %v", got, want) + } + if got, want := gnmi.Get(t, dut, wredUniform.Weight().State()), ecnConfig.weight; got != want { + t.Errorf("wredUniform.Weight().State(): got %v, want %v", got, want) } + } func testQoSOutputIntfConfig(t *testing.T, q *oc.Qos) { @@ -425,17 +423,16 @@ func testQoSOutputIntfConfig(t *testing.T, q *oc.Qos) { // Verify the policy is applied by checking the telemetry path state values. policy := gnmi.OC().Qos().Interface(dp.Name()).Output().SchedulerPolicy() outQueue := gnmi.OC().Qos().Interface(dp.Name()).Output().Queue(tc.queueName) - if !deviations.StatePathsUnsupported(dut) { - if got, want := gnmi.Get(t, dut, policy.Name().State()), tc.scheduler; got != want { - t.Errorf("policy.Name().State(): got %v, want %v", got, want) - } - if got, want := gnmi.Get(t, dut, outQueue.Name().State()), tc.queueName; got != want { - t.Errorf("outQueue.Name().State(): got %v, want %v", got, want) - } - if got, want := gnmi.Get(t, dut, outQueue.QueueManagementProfile().State()), tc.ecnProfile; got != want { - t.Errorf("outQueue.QueueManagementProfile().State(): got %v, want %v", got, want) - } + if got, want := gnmi.Get(t, dut, policy.Name().State()), tc.scheduler; got != want { + t.Errorf("policy.Name().State(): got %v, want %v", got, want) } + if got, want := gnmi.Get(t, dut, outQueue.Name().State()), tc.queueName; got != want { + t.Errorf("outQueue.Name().State(): got %v, want %v", got, want) + } + if got, want := gnmi.Get(t, dut, outQueue.QueueManagementProfile().State()), tc.ecnProfile; got != want { + t.Errorf("outQueue.QueueManagementProfile().State(): got %v, want %v", got, want) + } + if deviations.QosGetStatePathUnsupported(dut) { if got, want := gnmi.Get(t, dut, policy.Name().Config()), tc.scheduler; got != want { t.Errorf("policy.Name().Config(): got %v, want %v", got, want) From ea97582cfebedd10bcabd42226370a2c04a5329b Mon Sep 17 00:00:00 2001 From: charantejag504 Date: Thu, 9 May 2024 13:57:39 -0700 Subject: [PATCH 05/11] fix readme --- .../qos/tests/qos_ecn_config_test/README.md | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/feature/qos/tests/qos_ecn_config_test/README.md b/feature/qos/tests/qos_ecn_config_test/README.md index 025b4b5a595..e7d969a92b3 100644 --- a/feature/qos/tests/qos_ecn_config_test/README.md +++ b/feature/qos/tests/qos_ecn_config_test/README.md @@ -1,10 +1,10 @@ # DP-1.3: QoS ECN feature config -## Summary +Summary Verify QoS ECN feature configuration. -## Procedure +Procedure * Connect DUT port-1 to ATE port-1, DUT port-2 to ATE port-2. @@ -56,11 +56,11 @@ Verify QoS ECN feature configuration. * Validate ECN profile can be applied under output interface queue using OC telemetry. -## Config parameter coverage +Config parameter coverage * 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 @@ -74,12 +74,12 @@ Verify QoS ECN feature configuration. * /qos/interfaces/interface/output/queues/queue/config/name * /qos/interfaces/interface/output/queues/queue/config/queue-management-profile -## telemetry parameter coverage +Telemetry parameter coverage * 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 @@ -93,6 +93,11 @@ Verify QoS ECN feature configuration. * /qos/interfaces/interface/output/queues/queue/state/name * /qos/interfaces/interface/output/queues/queue/state/queue-management-profile -## platform +Protocol/RPC Parameter coverage + gnmi: + gNMI.Set: + union_replace: true + +Minimum DUT platform requirement * vRX From bd0822fd178390eef5615329267c0d30c07a1b02 Mon Sep 17 00:00:00 2001 From: charantejag504 Date: Thu, 9 May 2024 14:02:51 -0700 Subject: [PATCH 06/11] fix readme --- feature/qos/tests/qos_ecn_config_test/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/feature/qos/tests/qos_ecn_config_test/README.md b/feature/qos/tests/qos_ecn_config_test/README.md index e7d969a92b3..1e084eee1b1 100644 --- a/feature/qos/tests/qos_ecn_config_test/README.md +++ b/feature/qos/tests/qos_ecn_config_test/README.md @@ -93,11 +93,11 @@ Telemetry parameter coverage * /qos/interfaces/interface/output/queues/queue/state/name * /qos/interfaces/interface/output/queues/queue/state/queue-management-profile -Protocol/RPC Parameter coverage +OpenConfig Path and RPC Coverage gnmi: gNMI.Set: union_replace: true Minimum DUT platform requirement - * vRX + * vRX \ No newline at end of file From d0812a099abeced49580ca4d58fce18a5a0704ed Mon Sep 17 00:00:00 2001 From: charantejag504 Date: Thu, 9 May 2024 14:35:48 -0700 Subject: [PATCH 07/11] fix readme --- .../qos/tests/qos_ecn_config_test/README.md | 51 +++++++++++++++---- 1 file changed, 41 insertions(+), 10 deletions(-) diff --git a/feature/qos/tests/qos_ecn_config_test/README.md b/feature/qos/tests/qos_ecn_config_test/README.md index 1e084eee1b1..00dc2e2e3ea 100644 --- a/feature/qos/tests/qos_ecn_config_test/README.md +++ b/feature/qos/tests/qos_ecn_config_test/README.md @@ -1,10 +1,10 @@ # DP-1.3: QoS ECN feature config -Summary +## Summary Verify QoS ECN feature configuration. -Procedure +## Procedure * Connect DUT port-1 to ATE port-1, DUT port-2 to ATE port-2. @@ -56,7 +56,7 @@ Procedure * Validate ECN profile can be applied under output interface queue using OC telemetry. -Config parameter coverage +## Config parameter coverage * ECN * [TODO] qos/queue-management-profiles/queue-management-profile/wred/uniform/config/min-threshold-percent @@ -74,7 +74,7 @@ Config parameter coverage * /qos/interfaces/interface/output/queues/queue/config/name * /qos/interfaces/interface/output/queues/queue/config/queue-management-profile -Telemetry parameter coverage +## telemetry parameter coverage * ECN @@ -93,11 +93,42 @@ Telemetry parameter coverage * /qos/interfaces/interface/output/queues/queue/state/name * /qos/interfaces/interface/output/queues/queue/state/queue-management-profile -OpenConfig Path and RPC Coverage +## 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-thresholdd: + /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-thresholdd: + /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: - union_replace: true - -Minimum DUT platform requirement - - * vRX \ No newline at end of file + Replace: +``` \ No newline at end of file From 425d0ba909d532fe9a8024bc6ef48506698d3561 Mon Sep 17 00:00:00 2001 From: charantejag504 Date: Thu, 9 May 2024 14:40:01 -0700 Subject: [PATCH 08/11] update --- feature/qos/tests/qos_ecn_config_test/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/feature/qos/tests/qos_ecn_config_test/README.md b/feature/qos/tests/qos_ecn_config_test/README.md index 00dc2e2e3ea..adb5a3f2d79 100644 --- a/feature/qos/tests/qos_ecn_config_test/README.md +++ b/feature/qos/tests/qos_ecn_config_test/README.md @@ -106,7 +106,7 @@ paths used for test setup are not listed here. 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-thresholdd: + /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: @@ -118,7 +118,7 @@ paths: ## 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-thresholdd: + /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: From edba001021c0ae49998cf8de3310b21425de47a0 Mon Sep 17 00:00:00 2001 From: charantejag504 Date: Thu, 30 May 2024 16:17:09 -0700 Subject: [PATCH 09/11] correction --- .../qos_ecn_config_test.go | 44 ++++++++++--------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go b/feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go index 6583a5f6888..fc13a380c65 100644 --- a/feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go +++ b/feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go @@ -279,20 +279,22 @@ func testECNConfig(t *testing.T, q *oc.Qos) { } } - if got, want := gnmi.Get(t, dut, wredUniform.MinThreshold().State()), ecnConfig.minThreshold; got != want { - t.Errorf("wredUniform.MinThreshold().State(): got %v, want %v", got, want) - } - if got, want := gnmi.Get(t, dut, wredUniform.MaxThreshold().State()), ecnConfig.maxThreshold; got != want { - t.Errorf("wredUniform.MaxThreshold().State(): got %v, want %v", got, want) - } - - if got, want := gnmi.Get(t, dut, wredUniform.Drop().State()), ecnConfig.dropEnabled; got != want { - t.Errorf("wredUniform.Drop().State(): got %v, want %v", got, want) + if !deviations.StatePathsUnsupported(dut) { + if got, want := gnmi.Get(t, dut, wredUniform.MinThreshold().State()), ecnConfig.minThreshold; got != want { + t.Errorf("wredUniform.MinThreshold().State(): got %v, want %v", got, want) + } + if got, want := gnmi.Get(t, dut, wredUniform.MaxThreshold().State()), ecnConfig.maxThreshold; got != want { + t.Errorf("wredUniform.MaxThreshold().State(): got %v, want %v", got, want) + } } - if got, want := gnmi.Get(t, dut, wredUniform.Weight().State()), ecnConfig.weight; got != want { - t.Errorf("wredUniform.Weight().State(): got %v, want %v", got, want) + if !deviations.DropWeightLeavesUnsupported(dut) { + if got, want := gnmi.Get(t, dut, wredUniform.Drop().State()), ecnConfig.dropEnabled; got != want { + t.Errorf("wredUniform.Drop().State(): got %v, want %v", got, want) + } + if got, want := gnmi.Get(t, dut, wredUniform.Weight().State()), ecnConfig.weight; got != want { + t.Errorf("wredUniform.Weight().State(): got %v, want %v", got, want) + } } - } func testQoSOutputIntfConfig(t *testing.T, q *oc.Qos) { @@ -423,14 +425,16 @@ func testQoSOutputIntfConfig(t *testing.T, q *oc.Qos) { // Verify the policy is applied by checking the telemetry path state values. policy := gnmi.OC().Qos().Interface(dp.Name()).Output().SchedulerPolicy() outQueue := gnmi.OC().Qos().Interface(dp.Name()).Output().Queue(tc.queueName) - if got, want := gnmi.Get(t, dut, policy.Name().State()), tc.scheduler; got != want { - t.Errorf("policy.Name().State(): got %v, want %v", got, want) - } - if got, want := gnmi.Get(t, dut, outQueue.Name().State()), tc.queueName; got != want { - t.Errorf("outQueue.Name().State(): got %v, want %v", got, want) - } - if got, want := gnmi.Get(t, dut, outQueue.QueueManagementProfile().State()), tc.ecnProfile; got != want { - t.Errorf("outQueue.QueueManagementProfile().State(): got %v, want %v", got, want) + if !deviations.StatePathsUnsupported(dut) { + if got, want := gnmi.Get(t, dut, policy.Name().State()), tc.scheduler; got != want { + t.Errorf("policy.Name().State(): got %v, want %v", got, want) + } + if got, want := gnmi.Get(t, dut, outQueue.Name().State()), tc.queueName; got != want { + t.Errorf("outQueue.Name().State(): got %v, want %v", got, want) + } + if got, want := gnmi.Get(t, dut, outQueue.QueueManagementProfile().State()), tc.ecnProfile; got != want { + t.Errorf("outQueue.QueueManagementProfile().State(): got %v, want %v", got, want) + } } if deviations.QosGetStatePathUnsupported(dut) { From 7793f39063230ca1b18246b7e8239299e371e8a3 Mon Sep 17 00:00:00 2001 From: charantejag504 Date: Thu, 30 May 2024 16:18:28 -0700 Subject: [PATCH 10/11] correction --- feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go b/feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go index fc13a380c65..bc567bd2c26 100644 --- a/feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go +++ b/feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go @@ -436,7 +436,6 @@ func testQoSOutputIntfConfig(t *testing.T, q *oc.Qos) { t.Errorf("outQueue.QueueManagementProfile().State(): got %v, want %v", got, want) } } - if deviations.QosGetStatePathUnsupported(dut) { if got, want := gnmi.Get(t, dut, policy.Name().Config()), tc.scheduler; got != want { t.Errorf("policy.Name().Config(): got %v, want %v", got, want) From 4da39b2f51e8a5aac9aedbdfe9ca043cd09f6a5b Mon Sep 17 00:00:00 2001 From: charantejag504 Date: Wed, 10 Jul 2024 13:34:01 -0700 Subject: [PATCH 11/11] update --- .../qos_ecn_config_test.go | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go b/feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go index bc567bd2c26..ae94ee7fb04 100644 --- a/feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go +++ b/feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go @@ -302,6 +302,41 @@ 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