Skip to content

Commit

Permalink
Updating flow count and traffic duration (openconfig#2792)
Browse files Browse the repository at this point in the history
* Udating flow count and traffic duration

* Adding deviation

* Removed delay calls

* fixing channelized interfaces speed issue

---------

Co-authored-by: Ram <[email protected]>
Co-authored-by: Swetha-haridasula <[email protected]>
  • Loading branch information
3 people authored and bkreddy143 committed Jul 17, 2024
1 parent eeee8a1 commit 7559b84
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
13 changes: 10 additions & 3 deletions feature/gribi/otg_tests/basic_encap_test/basic_encap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const (
vrfEncapB = "ENCAP_TE_VRF_B"
ipv4PrefixLen = 30
ipv6PrefixLen = 126
trafficDuration = 15 * time.Second
trafficDuration = 30 * time.Second
nhg10ID = 10
nh201ID = 201
nh202ID = 202
Expand Down Expand Up @@ -95,7 +95,7 @@ const (
ipv4EntryPrefixLen = 24
ipv6FlowIP = "2015:aa8::1"
ipv6EntryPrefix = "2015:aa8::"
ipv6EntryPrefixLen = 32
ipv6EntryPrefixLen = 64
ratioTunEncap1 = 0.25 // 1/4
ratioTunEncap2 = 0.75 // 3/4
ratioTunEncapTol = 0.05 // 5/100
Expand Down Expand Up @@ -791,7 +791,7 @@ func configureDUT(t *testing.T, dut *ondatra.DUTDevice) {
for idx, a := range []attrs.Attributes{dutPort1, dutPort2, dutPort3, dutPort4, dutPort5} {
p := portList[idx]
intf := a.NewOCInterface(p.Name(), dut)
if p.PMD() == ondatra.PMD100GBASEFR && dut.Vendor() != ondatra.CISCO {
if p.PMD() == ondatra.PMD100GBASEFR && dut.Vendor() != ondatra.CISCO && dut.Vendor() != ondatra.JUNIPER {
e := intf.GetOrCreateEthernet()
e.AutoNegotiate = ygot.Bool(false)
e.DuplexMode = oc.Ethernet_DuplexMode_FULL
Expand Down Expand Up @@ -918,13 +918,15 @@ func (fa *flowAttr) getFlow(flowType string, name string, dscp uint32) gosnappi.
innerV4 := flow.Packet().Add().Ipv4()
innerV4.Src().SetValue(innerV4SrcIP)
innerV4.Dst().SetValue(innerV4DstIP)
innerV4.Priority().Dscp().Phb().SetValue(dscp)
}

// add inner ipv6 headers
if flowType == "ipv6in4" {
innerV6 := flow.Packet().Add().Ipv6()
innerV6.Src().SetValue(InnerV6SrcIP)
innerV6.Dst().SetValue(InnerV6DstIP)
innerV6.TrafficClass().SetValue(dscp << 2)
}
} else if flowType == "ipv6" {
v6 := flow.Packet().Add().Ipv6()
Expand All @@ -945,8 +947,13 @@ func sendTraffic(t *testing.T, args *testArgs, flows []gosnappi.Flow, capture bo
otg := args.ate.OTG()
args.topo.Flows().Clear().Items()
args.topo.Flows().Append(flows...)

otg.PushConfig(t, args.topo)
otg.StartProtocols(t)

otgutils.WaitForARP(t, args.ate.OTG(), args.topo, "IPv4")
otgutils.WaitForARP(t, args.ate.OTG(), args.topo, "IPv6")

if capture {
startCapture(t, args.ate)
defer stopCapture(t, args.ate)
Expand Down
8 changes: 8 additions & 0 deletions feature/gribi/otg_tests/basic_encap_test/metadata.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ platform_exceptions: {
pf_require_sequential_order_pbr_rules: true
}
}
platform_exceptions: {
platform: {
vendor: JUNIPER
}
deviations: {
ttl_copy_unsupported: true
}
}
platform_exceptions: {
platform: {
vendor: ARISTA
Expand Down

0 comments on commit 7559b84

Please sign in to comment.