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

rename QoSQueue to QoSClass same as in entity-naming library #3713

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ var (
"port3": atePort3,
}

allQueueNames = []entname.QoSQueue{
allQueueNames = []entname.QoSClass{
entname.QoSNC1,
entname.QoSAF4,
entname.QoSAF3,
Expand All @@ -128,7 +128,7 @@ var (
testCases = []struct {
name string
createFlowsF func(otgConfig gosnappi.Config, protocol string, atePortSpeed int)
validateFlowsF func(t *testing.T, dut *ondatra.DUTDevice, ate *ondatra.ATEDevice, atePortSpeed int, startingCounters map[entname.QoSQueue]*queueCounters)
validateFlowsF func(t *testing.T, dut *ondatra.DUTDevice, ate *ondatra.ATEDevice, atePortSpeed int, startingCounters map[entname.QoSClass]*queueCounters)
}{
{
name: "TestNoCongestion",
Expand Down Expand Up @@ -444,10 +444,10 @@ func createFlow(otgConfig gosnappi.Config, protocol string, targetTotalFlowRate
return flow
}

func getQueueCounters(t *testing.T, dut *ondatra.DUTDevice) map[entname.QoSQueue]*queueCounters {
func getQueueCounters(t *testing.T, dut *ondatra.DUTDevice) map[entname.QoSClass]*queueCounters {
t.Helper()
ep := dut.Port(t, dutEgressPort)
qc := map[entname.QoSQueue]*queueCounters{}
qc := map[entname.QoSClass]*queueCounters{}

for _, egressQueueName := range allQueueNames {
qc[egressQueueName] = &queueCounters{
Expand All @@ -460,7 +460,7 @@ func getQueueCounters(t *testing.T, dut *ondatra.DUTDevice) map[entname.QoSQueue
return qc
}

func logAndGetResolvedQueueCounters(t *testing.T, egressQueueName entname.QoSQueue, egressQueueStartingCounters, egressQueueEndingCounters *queueCounters) (uint64, uint64, uint64) {
func logAndGetResolvedQueueCounters(t *testing.T, egressQueueName entname.QoSClass, egressQueueStartingCounters, egressQueueEndingCounters *queueCounters) (uint64, uint64, uint64) {
queueDroppedPackets := egressQueueEndingCounters.droppedPackets - egressQueueStartingCounters.droppedPackets
queueTransmitPackets := egressQueueEndingCounters.transmitPackets - egressQueueStartingCounters.transmitPackets
queueTransmitOctets := egressQueueEndingCounters.transmitOctets - egressQueueStartingCounters.transmitOctets
Expand Down Expand Up @@ -517,7 +517,7 @@ func testNoCongestionCreateFlows(otgConfig gosnappi.Config, protocol string, dut
}
}

func testNoCongestionValidateFlows(t *testing.T, dut *ondatra.DUTDevice, ate *ondatra.ATEDevice, dutPortSpeed int, startingCounters map[entname.QoSQueue]*queueCounters) {
func testNoCongestionValidateFlows(t *testing.T, dut *ondatra.DUTDevice, ate *ondatra.ATEDevice, dutPortSpeed int, startingCounters map[entname.QoSClass]*queueCounters) {
maxAllowedZeroPackets, _ := getZeroIshThresholds(dutPortSpeed)
endingCounters := getQueueCounters(t, dut)

Expand Down Expand Up @@ -607,7 +607,7 @@ func testCongestionCreateFlows(otgConfig gosnappi.Config, protocol string, dutPo
}
}

func testCongestionValidateFlows(t *testing.T, dut *ondatra.DUTDevice, ate *ondatra.ATEDevice, dutPortSpeed int, startingCounters map[entname.QoSQueue]*queueCounters) {
func testCongestionValidateFlows(t *testing.T, dut *ondatra.DUTDevice, ate *ondatra.ATEDevice, dutPortSpeed int, startingCounters map[entname.QoSClass]*queueCounters) {
maxAllowedZeroPackets, _ := getZeroIshThresholds(dutPortSpeed)
endingCounters := getQueueCounters(t, dut)

Expand Down Expand Up @@ -741,7 +741,7 @@ func testNC1CongestionCreateFlows(otgConfig gosnappi.Config, protocol string, du
}
}

func testNC1CongestionValidateFlows(t *testing.T, dut *ondatra.DUTDevice, ate *ondatra.ATEDevice, dutPortSpeed int, startingCounters map[entname.QoSQueue]*queueCounters) {
func testNC1CongestionValidateFlows(t *testing.T, dut *ondatra.DUTDevice, ate *ondatra.ATEDevice, dutPortSpeed int, startingCounters map[entname.QoSClass]*queueCounters) {
maxAllowedZeroPackets, maxAllowedZeroOctets := getZeroIshThresholds(dutPortSpeed)
endingCounters := getQueueCounters(t, dut)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require (
github.com/kr/pretty v0.3.1
github.com/open-traffic-generator/snappi/gosnappi v1.3.0
github.com/openconfig/containerz v0.0.0-20250119143156-ea1f112cd31c
github.com/openconfig/entity-naming v0.0.0-20230912181021-7ac806551a31
github.com/openconfig/entity-naming v0.0.0-20250108173956-784f643e8b64
github.com/openconfig/gnmi v0.11.0
github.com/openconfig/gnoi v0.6.0
github.com/openconfig/gnoigo v0.0.0-20240320202954-ebd033e3542c
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1658,6 +1658,8 @@ github.com/openconfig/containerz v0.0.0-20250119143156-ea1f112cd31c h1:4WtTr8Iv2
github.com/openconfig/containerz v0.0.0-20250119143156-ea1f112cd31c/go.mod h1:VcT2W5ddds98x7CS2r7q1tnUICgflBQ3Wv9rmRkb5TQ=
github.com/openconfig/entity-naming v0.0.0-20230912181021-7ac806551a31 h1:K/9O+J20+liIof8WjquMydnebD0N1U9ItjhJYF6H4hg=
github.com/openconfig/entity-naming v0.0.0-20230912181021-7ac806551a31/go.mod h1:ZRUrfwYYY+pLaOoWPad3p/8J4LLQcSqtXhBCkD2pXJc=
github.com/openconfig/entity-naming v0.0.0-20250108173956-784f643e8b64 h1:pS4NcCl49ker3FYRkvY+erNUw1CgL/lB8gnDQbax6Yk=
github.com/openconfig/entity-naming v0.0.0-20250108173956-784f643e8b64/go.mod h1:FDF5sbP9BbP2IM6EUopcAWfGJ5OPZ4VV2EYQ9vvqLjA=
github.com/openconfig/gnmi v0.0.0-20200414194230-1597cc0f2600/go.mod h1:M/EcuapNQgvzxo1DDXHK4tx3QpYM/uG4l591v33jG2A=
github.com/openconfig/gnmi v0.0.0-20200508230933-d19cebf5e7be/go.mod h1:M/EcuapNQgvzxo1DDXHK4tx3QpYM/uG4l591v33jG2A=
github.com/openconfig/gnmi v0.10.0/go.mod h1:Y9os75GmSkhHw2wX8sMsxfI7qRGAEcDh8NTa5a8vj6E=
Expand Down
Loading