Skip to content

Commit

Permalink
RT-1.51 bgp_multipath_ecmp_test.go (openconfig#3484)
Browse files Browse the repository at this point in the history
* Adding pps for ncptx

* generic kne platform var

* generic kne platform var

* updated

---------

Co-authored-by: Rohit Rattan <[email protected]>
  • Loading branch information
cprabha and rohit-rp authored Oct 10, 2024
1 parent c6f9386 commit 38440cb
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package bgp_multipath_ecmp_test

import (
"slices"
"sort"
"strconv"
"testing"
Expand All @@ -40,6 +41,7 @@ const (
pathID = 1
maxPaths = 2
trafficPps = 100000
kneTrafficPps = 1000
totalPackets = 12000000
lossTolerancePct = 0
lbToleranceFms = 20
Expand All @@ -49,6 +51,10 @@ func TestMain(m *testing.M) {
fptest.RunTests(m)
}

var (
kneDeviceModelList = []string{"ncptx"}
)

func configureOTG(t *testing.T, bs *cfgplugins.BGPSession) {
devices := bs.ATETop.Devices().Items()
byName := func(i, j int) bool { return devices[i].Name() < devices[j].Name() }
Expand Down Expand Up @@ -104,6 +110,10 @@ func configureFlow(t *testing.T, bs *cfgplugins.BGPSession) {
flow.Size().SetFixed(1500)
flow.Rate().SetPps(trafficPps)

if slices.Contains(kneDeviceModelList, bs.DUT.Model()) {
flow.Rate().SetPps(kneTrafficPps)
}

e := flow.Packet().Add().Ethernet()
e.Src().SetValue(bs.ATEPorts[0].MAC)
v4 := flow.Packet().Add().Ipv4()
Expand Down

0 comments on commit 38440cb

Please sign in to comment.