From b25d4d5cb5c3ba27d5c902523f9bef6e634e34db Mon Sep 17 00:00:00 2001 From: cprabha Date: Wed, 19 Jul 2023 11:40:30 -0700 Subject: [PATCH 01/25] added automation for RT-1.21 --- .../ate_tests/bgp_tcp_mss_path_mtu/README.md | 38 ++ .../bgp_tcp_mss_path_mtu_test.go | 413 ++++++++++++++++++ 2 files changed, 451 insertions(+) create mode 100644 feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/README.md create mode 100644 feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go diff --git a/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/README.md b/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/README.md new file mode 100644 index 00000000000..87ee6b8beae --- /dev/null +++ b/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/README.md @@ -0,0 +1,38 @@ +# RT-1.21: BGP TCP MSS and PMTUD + +## Summary + +BGP TCP MSS and PMTUD + +## Procedure + +* Establish BGP sessions between: + * ATE port-1 --- eBGP-IPv4/IPv6 ---- DUT1 + * ATE port-1 ---- iBGP IPv4 ---- DUT2. +* DUT-2 is directly connected to DUT-1. +* TODO : Verify that the default TCP MSS value is set below interface MTU value. +* Change the Interface MTU to the ATE port as 5040. +* Configure IP TCP MSS value of 4096 bytes on the interface to the ATE port. +* Re-establish the BGP sessions by tcp reset. +* Verify that the TCP MSS value is set to 4096 bytes for IPv4 and IPv6. +* Establish iBGP session with MD5 enabled from ATE port-1 to DUT-2. +* Change the MTU on the DUT-1 to DUT-2 link to 512 bytes and enable PMTUD on the DUT. +* TODO : Validate that the min MSS value has been adjusted to be below 512 bytes on the tcp session. + +## Config Parameter coverage + +* /neighbors/neighbor/transport/config/tcp-mss +* /neighbors/neighbor/transport/config/mtu-discovery + +## Telemetry Parameter coverage + +* /neighbors/neighbor/transport/state/tcp-mss +* /neighbors/neighbor/transport/state/mtu-discovery + +## Protocol/RPC Parameter coverage + +N/A + +## Minimum DUT platform requirement + +N/A diff --git a/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go b/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go new file mode 100644 index 00000000000..09ec3978bfc --- /dev/null +++ b/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go @@ -0,0 +1,413 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bgp_tcp_mss_path_mtu_test + +import ( + "fmt" + "testing" + "time" + + "github.com/openconfig/featureprofiles/internal/attrs" + "github.com/openconfig/featureprofiles/internal/deviations" + "github.com/openconfig/featureprofiles/internal/fptest" + "github.com/openconfig/ondatra" + "github.com/openconfig/ondatra/gnmi" + "github.com/openconfig/ondatra/gnmi/oc" + "github.com/openconfig/ygnmi/ygnmi" + "github.com/openconfig/ygot/ygot" +) + +func TestMain(m *testing.M) { + fptest.RunTests(m) +} + +// The testbed consists of ate:port1 -> dut:port1 and +// dut:port2 -> ate:port2. The first pair is called the "source" +// pair, and the second the "destination" pair. +// +// ATE Port-1 192.0.2.2 -------- DUT-1 Port-1 192.0.2.1 +// DUT-1 Port-2 192.0.4.1 -------- DUT-2 Port-1 192.0.4.2 +// DUT-2 Port-2 192.0.6.2 -------- ATE port-2 192.0.6.1 +// +// Note that the first (.0, .3) and last (.4, .7) IPv4 addresses are +// reserved from the subnet for broadcast, so a /30 leaves exactly 2 +// usable addresses. This does not apply to IPv6 which allows /127 +// for point to point links, but we use /126 so the numbering is +// consistent with IPv4. + +const ( + peerGrpName1 = "BGP-PEER-GROUP1" + peerGrpName2 = "BGP-PEER-GROUP2" + dut1AS = 65501 + ateAS1 = 65502 + dut2AS = 65502 + plenIPv4 = 30 + plenIPv6 = 126 + dut1TcpMssDefault = uint16(536) + dut1Tcp6MssDefault = uint16(1240) + dut1IntfMtu = uint16(5040) + dut1TcpMss = uint16(4096) + MTU512 = uint16(512) + vlan10 = 10 + vlan20 = 20 + ISISInstance = "DEFAULT" + authPWd = "BGPTCPMSS" + dut1AreaAddress = "49.0001" + dut1SysID = "1920.0000.2001" + dut2AreaAddress = "49.0001" + dut2SysID = "1920.0000.3001" +) + +var ( + dut1Port1 = attrs.Attributes{ + Desc: "DUT to ATE source", + IPv4: "192.0.2.1", + IPv6: "2001:db8::192:0:2:1", + IPv4Len: plenIPv4, + IPv6Len: plenIPv6, + } + atePort1 = attrs.Attributes{ + Name: "ateSrc", + IPv4: "192.0.2.2", + IPv6: "2001:db8::192:0:2:2", + IPv4Len: plenIPv4, + IPv6Len: plenIPv6, + } + dut1Port2 = attrs.Attributes{ + Desc: "DUT1 to DUT2", + IPv4: "192.0.4.1", + IPv4Len: plenIPv4, + } + dut2Port1 = attrs.Attributes{ + Name: "DUT2 to DUT1", + IPv4: "192.0.4.2", + IPv4Len: plenIPv4, + } +) + +// configureDUT configures all the interfaces on the DUT. +func configureDUT(t *testing.T) { + dc := gnmi.OC() + dut1 := ondatra.DUT(t, "dut1") + dut2 := ondatra.DUT(t, "dut2") + + t.Log("Configure interfaces on dut1.") + i1 := dut1Port1.NewOCInterface(dut1.Port(t, "port1").Name(), dut1) + gnmi.Replace(t, dut1, dc.Interface(i1.GetName()).Config(), i1) + i2 := dut1Port2.NewOCInterface(dut1.Port(t, "port2").Name(), dut1) + gnmi.Replace(t, dut1, dc.Interface(i2.GetName()).Config(), i2) + + t.Log("Configure interfaces on dut2.") + i3 := dut2Port1.NewOCInterface(dut2.Port(t, "port1").Name(), dut2) + gnmi.Replace(t, dut2, dc.Interface(i3.GetName()).Config(), i3) +} + +// bgpCreateNbr creates bgp configuration on dut device. +func bgpCreateNbr(t *testing.T, dut *ondatra.DUTDevice, authPwd, routerId string, localAs uint32, nbrs []*bgpNeighbor) *oc.NetworkInstance_Protocol { + + d := &oc.Root{} + ni1 := d.GetOrCreateNetworkInstance(deviations.DefaultNetworkInstance(dut)) + ni_proto := ni1.GetOrCreateProtocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, "BGP") + bgp := ni_proto.GetOrCreateBgp() + global := bgp.GetOrCreateGlobal() + global.RouterId = ygot.String(routerId) + global.As = ygot.Uint32(localAs) + global.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST).Enabled = ygot.Bool(true) + + // Note: we have to define the peer group even if we aren't setting any policy because it's + // invalid OC for the neighbor to be part of a peer group that doesn't exist. + for _, nbr := range nbrs { + if nbr.isV4 { + // Create Peer group. + pg1 := bgp.GetOrCreatePeerGroup(nbr.peerGrp) + pg1.PeerAs = ygot.Uint32(nbr.as) + pg1.PeerGroupName = ygot.String(nbr.peerGrp) + // configure neighbor. + nv4 := bgp.GetOrCreateNeighbor(nbr.neighborip) + nv4.PeerGroup = ygot.String(nbr.peerGrp) + nv4.PeerAs = ygot.Uint32(nbr.as) + nv4.Enabled = ygot.Bool(true) + if authPwd != "" { + nv4.AuthPassword = ygot.String(authPWd) + } + af4 := nv4.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST) + af4.Enabled = ygot.Bool(true) + af6 := nv4.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV6_UNICAST) + af6.Enabled = ygot.Bool(false) + } else { + nv6 := bgp.GetOrCreateNeighbor(nbr.neighborip) + nv6.PeerGroup = ygot.String(nbr.peerGrp) + nv6.PeerAs = ygot.Uint32(nbr.as) + nv6.Enabled = ygot.Bool(true) + af6 := nv6.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV6_UNICAST) + af6.Enabled = ygot.Bool(true) + af4 := nv6.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST) + af4.Enabled = ygot.Bool(false) + } + } + return ni_proto +} + +// verifyBgpTelemetry checks that the dut has an established BGP session with reasonable settings. +func verifyBgpTelemetry(t *testing.T, dut *ondatra.DUTDevice, nbrIP []string) { + statePath := gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut)).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, "BGP").Bgp() + for _, nbr := range nbrIP { + nbrPath := statePath.Neighbor(nbr) + t.Logf("Waiting for BGP neighbor to establish...") + status, ok := gnmi.Watch(t, dut, nbrPath.SessionState().State(), time.Minute, func(val *ygnmi.Value[oc.E_Bgp_Neighbor_SessionState]) bool { + state, ok := val.Val() + return ok && state == oc.Bgp_Neighbor_SessionState_ESTABLISHED + }).Await(t) + if !ok { + fptest.LogQuery(t, "BGP reported state", nbrPath.State(), gnmi.Get(t, dut, nbrPath.State())) + t.Fatal("No BGP neighbor formed") + } + state, _ := status.Val() + if want := oc.Bgp_Neighbor_SessionState_ESTABLISHED; state != want { + t.Errorf("BGP peer %s status got %d, want %d", nbr, state, want) + } + t.Logf("BGP adjacency for %s: %s", nbr, state) + } +} + +func configureIsisDut(t *testing.T, dut *ondatra.DUTDevice, intfName []string, dutAreaAddress, dutSysID string) { + d := &oc.Root{} + dutConfIsisPath := gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut)).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_ISIS, ISISInstance) + netInstance := d.GetOrCreateNetworkInstance(deviations.DefaultNetworkInstance(dut)) + prot := netInstance.GetOrCreateProtocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_ISIS, ISISInstance) + if !deviations.ISISprotocolEnabledNotRequired(dut) { + prot.Enabled = ygot.Bool(true) + } + isis := prot.GetOrCreateIsis() + globalISIS := isis.GetOrCreateGlobal() + globalISIS.LevelCapability = oc.Isis_LevelType_LEVEL_2 + globalISIS.Net = []string{fmt.Sprintf("%v.%v.00", dutAreaAddress, dutSysID)} + globalISIS.GetOrCreateAf(oc.IsisTypes_AFI_TYPE_IPV4, oc.IsisTypes_SAFI_TYPE_UNICAST).Enabled = ygot.Bool(true) + isisLevel2 := isis.GetOrCreateLevel(2) + isisLevel2.MetricStyle = oc.Isis_MetricStyle_WIDE_METRIC + + for _, intf := range intfName { + isisIntf := isis.GetOrCreateInterface(intf) + isisIntf.Enabled = ygot.Bool(true) + isisIntf.CircuitType = oc.Isis_CircuitType_POINT_TO_POINT + isisIntfLevel := isisIntf.GetOrCreateLevel(2) + isisIntfLevel.Enabled = ygot.Bool(true) + isisIntfLevelAfi := isisIntfLevel.GetOrCreateAf(oc.IsisTypes_AFI_TYPE_IPV4, oc.IsisTypes_SAFI_TYPE_UNICAST) + isisIntfLevelAfi.Metric = ygot.Uint32(200) + isisIntfLevelAfi.Enabled = ygot.Bool(true) + } + gnmi.Replace(t, dut, dutConfIsisPath.Config(), prot) +} + +// configureATE configures the interfaces and BGP protocols on an ATE, including +// advertising some(faked) networks over BGP. +func configureATE(t *testing.T, ate *ondatra.ATEDevice) *ondatra.ATETopology { + topo := ate.Topology().New() + + port1 := ate.Port(t, "port1") + iDut1 := topo.AddInterface(atePort1.Name).WithPort(port1) + iDut1.IPv4().WithAddress(atePort1.IPv4CIDR()).WithDefaultGateway(dut1Port1.IPv4) + iDut1.IPv6().WithAddress(atePort1.IPv6CIDR()).WithDefaultGateway(dut1Port1.IPv6) + + isisDut1 := iDut1.ISIS() + isisDut1.WithLevelL2().WithNetworkTypePointToPoint().WithTERouterID(atePort1.IPv4) + + bgpDut1 := iDut1.BGP() + bgpDut1.AddPeer().WithPeerAddress(dut1Port1.IPv4).WithLocalASN(ateAS1). + WithTypeExternal() + bgpDut1.AddPeer().WithPeerAddress(dut1Port1.IPv6).WithLocalASN(ateAS1). + WithTypeExternal() + + t.Logf("Pushing config to ATE and starting protocols...") + + topo.Push(t) + topo.StartProtocols(t) + return topo +} + +func configATE(t *testing.T, ate *ondatra.ATEDevice) *ondatra.ATETopology { + + topo := ate.Topology().New() + + port1 := ate.Port(t, "port1") + iDut1 := topo.AddInterface(atePort1.Name).WithPort(port1) + iDut1.IPv4().WithAddress(atePort1.IPv4CIDR()).WithDefaultGateway(dut1Port1.IPv4) + iDut1.IPv6().WithAddress(atePort1.IPv6CIDR()).WithDefaultGateway(dut1Port1.IPv6) + + isisDut1 := iDut1.ISIS() + isisDut1.WithLevelL2().WithNetworkTypePointToPoint().WithTERouterID(atePort1.IPv4) + + bgpDut1 := iDut1.BGP() + bgpDut1.AddPeer().WithPeerAddress(dut2Port1.IPv4).WithLocalASN(ateAS1). + WithTypeInternal().WithMD5Key(authPWd) + + t.Logf("Pushing config to ATE and starting protocols...") + + topo.Push(t) + topo.StartProtocols(t) + return topo +} + +type bgpNeighbor struct { + as uint32 + neighborip string + isV4 bool + peerGrp string +} + +func configStaticRoute(t *testing.T, dut *ondatra.DUTDevice, prefix string, nexthop string) { + ni := oc.NetworkInstance{Name: ygot.String(deviations.DefaultNetworkInstance(dut))} + static := ni.GetOrCreateProtocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_STATIC, deviations.StaticProtocolName(dut)) + sr := static.GetOrCreateStatic(prefix) + nh := sr.GetOrCreateNextHop("0") + nh.NextHop = oc.UnionString(nexthop) + gnmi.Update(t, dut, gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut)).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_STATIC, deviations.StaticProtocolName(dut)).Config(), static) +} + +// TestTcpMssPathMtu is to Validate TCP MSS for BGP v4/v6 sessions. +func TestTcpMssPathMtu(t *testing.T) { + + dut1 := ondatra.DUT(t, "dut1") + dut2 := ondatra.DUT(t, "dut2") + ate := ondatra.ATE(t, "ate") + + dutList := []*ondatra.DUTDevice{dut1, dut2} + + t.Run("Configure DUT1 and DUT2 interfaces", func(t *testing.T) { + configureDUT(t) + }) + + t.Run("Configure DEFAULT network instance on both DUT1 and DUT2", func(t *testing.T) { + for _, dut := range dutList { + dutConfNIPath := gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut)) + gnmi.Replace(t, dut, dutConfNIPath.Type().Config(), oc.NetworkInstanceTypes_NETWORK_INSTANCE_TYPE_DEFAULT_INSTANCE) + } + }) + + dut1ConfPath := gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut1)).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, "BGP") + dut2ConfPath := gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut2)).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, "BGP") + + t.Run("Configure BGP Neighbors DUT1 - ATE", func(t *testing.T) { + t.Logf("Start DUT1 BGP Config.") + gnmi.Delete(t, dut1, dut1ConfPath.Config()) + dut1Nbr1v4 := &bgpNeighbor{as: ateAS1, neighborip: atePort1.IPv4, isV4: true, peerGrp: peerGrpName1} + dut1Nbr1v6 := &bgpNeighbor{as: ateAS1, neighborip: atePort1.IPv6, isV4: false, peerGrp: peerGrpName1} + dut1Nbrs := []*bgpNeighbor{dut1Nbr1v4, dut1Nbr1v6} + dut1Conf := bgpCreateNbr(t, dut1, "", dut1Port2.IPv4, dut1AS, dut1Nbrs) + gnmi.Replace(t, dut1, dut1ConfPath.Config(), dut1Conf) + fptest.LogQuery(t, "DUT1 BGP Config", dut1ConfPath.Config(), gnmi.GetConfig(t, dut1, dut1ConfPath.Config())) + }) + + var topo *ondatra.ATETopology + t.Run("configureATE", func(t *testing.T) { + topo = configureATE(t, ate) + }) + + t.Run("Verify BGP telemetry", func(t *testing.T) { + var dut1NbrIP = []string{atePort1.IPv4, atePort1.IPv6} + verifyBgpTelemetry(t, dut1, dut1NbrIP) + }) + + dut1Port1Path := gnmi.OC().Interface(dut1.Port(t, "port1").Name()) + t.Run("Verify default TCP MSS v4 and v6 session", func(t *testing.T) { + // TODO: + }) + + t.Run("Change the Interface MTU to the ATE port as 5040.", func(t *testing.T) { + t.Logf("Configure DUT1 interface MTU to %v", dut1IntfMtu) + gnmi.Replace(t, dut1, dut1Port1Path.Mtu().Config(), dut1IntfMtu) + t.Logf("Configure DUT1 BGP TCP-MSS value to %v", dut1TcpMss) + gnmi.Replace(t, dut1, dut1ConfPath.Bgp().Neighbor(atePort1.IPv4).Transport().TcpMss().Config(), dut1TcpMss) + gnmi.Replace(t, dut1, dut1ConfPath.Bgp().Neighbor(atePort1.IPv6).Transport().TcpMss().Config(), dut1TcpMss) + }) + + t.Run("Re-establish the BGP sessions by tcp reset.", func(t *testing.T) { + topo.StopProtocols(t) + time.Sleep(1 * time.Minute) + topo.StartProtocols(t) + }) + + t.Run("Verify BGP telemetry after reset.", func(t *testing.T) { + var dut1NbrIP = []string{atePort1.IPv4, atePort1.IPv6} + verifyBgpTelemetry(t, dut1, dut1NbrIP) + }) + + t.Run("Verify BGP TCP MSS value", func(t *testing.T) { + t.Logf("Verify DUT1 BGP TCP-MSS value is to %v for both BGP v4 and v6 sessions.", dut1TcpMss) + if gotTcpMss := gnmi.Get(t, dut1, dut1ConfPath.Bgp().Neighbor(atePort1.IPv4).Transport().TcpMss().State()); gotTcpMss != dut1TcpMss { + t.Errorf("Obtained TCP MSS for BGP v4 on dut1 is not as expected, got is %v, want %v", gotTcpMss, dut1TcpMss) + } + if gotTcp6Mss := gnmi.Get(t, dut1, dut1ConfPath.Bgp().Neighbor(atePort1.IPv6).Transport().TcpMss().State()); gotTcp6Mss != dut1TcpMss { + t.Errorf("Obtained TCP MSS for BGP v6 peer on dut1 is not as expected, got is %v, want %v", gotTcp6Mss, dut1TcpMss) + } + }) + + t.Run("Remove configured BGP TCP MSS for v4 and v6 neighbors on DUT1", func(t *testing.T) { + dut1Port1Path := gnmi.OC().Interface(dut1.Port(t, "port1").Name()) + gnmi.Delete(t, dut1, dut1ConfPath.Config()) + gnmi.Delete(t, dut1, dut1Port1Path.Mtu().Config()) + }) + + t.Run("Configure ISIS Neighbors on DUT1 and ATE", func(t *testing.T) { + dut1PortNames := []string{dut1.Port(t, "port1").Name(), dut1.Port(t, "port2").Name()} + configureIsisDut(t, dut1, dut1PortNames, dut1AreaAddress, dut1SysID) + }) + + t.Run("Configure static route on DUT2 to ATE to establish multihop iBGP session", func(t *testing.T) { + ateIPAddr := fmt.Sprintf("%s/%d", atePort1.IPv4, uint32(32)) + configStaticRoute(t, dut2, ateIPAddr, dut1Port2.IPv4) + }) + + t.Run("Establish iBGP session with MD5 enabled from ATE port-1 to DUT-2 - multihop iBGP", func(t *testing.T) { + t.Logf("Start DUT2 - ATE Port1 iBGP Config.") + gnmi.Delete(t, dut2, dut2ConfPath.Config()) + dut2Nbr1v4 := &bgpNeighbor{as: ateAS1, neighborip: atePort1.IPv4, isV4: true, peerGrp: peerGrpName1} + dut2Nbrs := []*bgpNeighbor{dut2Nbr1v4} + dut2Conf := bgpCreateNbr(t, dut2, authPWd, dut2Port1.IPv4, dut2AS, dut2Nbrs) + gnmi.Replace(t, dut2, dut2ConfPath.Config(), dut2Conf) + fptest.LogQuery(t, "DUT2 BGP Config", dut2ConfPath.Config(), gnmi.GetConfig(t, dut2, dut2ConfPath.Config())) + }) + + t.Run("Configure iBGP session ATE Port1 - DUT2", func(t *testing.T) { + topo.StopProtocols(t) + topo = configATE(t, ate) + }) + + t.Run("Verify iBGP session between DUT2 - ATE Port1.", func(t *testing.T) { + var dut2NbrIP = []string{atePort1.IPv4} + verifyBgpTelemetry(t, dut2, dut2NbrIP) + }) + + t.Run("Change the MTU on DUT1-DUT2 to 512 bytes and Enable mtu discovery", func(t *testing.T) { + dut2Port1Path := gnmi.OC().Interface(dut2.Port(t, "port1").Name()) + gnmi.Replace(t, dut2, dut2Port1Path.Mtu().Config(), MTU512) + gnmi.Replace(t, dut2, dut2ConfPath.Bgp().Neighbor(atePort1.IPv4).Transport().MtuDiscovery().Config(), true) + }) + + t.Run("Re-establish the BGP sessions by tcp reset", func(t *testing.T) { + topo.StopProtocols(t) + time.Sleep(1 * time.Minute) + topo.StartProtocols(t) + }) + + t.Run("Verify iBGP session between DUT2 - ATE Port1.", func(t *testing.T) { + var dut2NbrIP = []string{atePort1.IPv4} + verifyBgpTelemetry(t, dut2, dut2NbrIP) + }) + + t.Run("Verify TCP MSS adjusted to below 512 bytes", func(t *testing.T) { + // TODO: + }) +} From 48645f489c34b0dd1379f3c2151bb9aca1531fe8 Mon Sep 17 00:00:00 2001 From: cprabha Date: Wed, 19 Jul 2023 11:45:23 -0700 Subject: [PATCH 02/25] Added metadata --- .../bgp/ate_tests/bgp_tcp_mss_path_mtu/metadata.textproto | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/metadata.textproto diff --git a/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/metadata.textproto b/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/metadata.textproto new file mode 100644 index 00000000000..4afde4dc2aa --- /dev/null +++ b/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/metadata.textproto @@ -0,0 +1,7 @@ +# proto-file: github.com/openconfig/featureprofiles/proto/metadata.proto +# proto-message: Metadata + +uuid: "7fbf408a-ac55-4e18-8f7f-1a937bff7921" +plan_id: "RT-1.21" +description: "BGP TCP MSS and PMTUD" +testbed: TESTBED_DUT_ATE_2LINKS From f53aaa1e071ac74e71c383f5539300a9e4527dec Mon Sep 17 00:00:00 2001 From: cprabha Date: Wed, 19 Jul 2023 12:09:45 -0700 Subject: [PATCH 03/25] updated ip addresses --- .../bgp_tcp_mss_path_mtu_test.go | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go b/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go index 09ec3978bfc..f3909ca133d 100644 --- a/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go +++ b/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go @@ -38,14 +38,7 @@ func TestMain(m *testing.M) { // pair, and the second the "destination" pair. // // ATE Port-1 192.0.2.2 -------- DUT-1 Port-1 192.0.2.1 -// DUT-1 Port-2 192.0.4.1 -------- DUT-2 Port-1 192.0.4.2 -// DUT-2 Port-2 192.0.6.2 -------- ATE port-2 192.0.6.1 -// -// Note that the first (.0, .3) and last (.4, .7) IPv4 addresses are -// reserved from the subnet for broadcast, so a /30 leaves exactly 2 -// usable addresses. This does not apply to IPv6 which allows /127 -// for point to point links, but we use /126 so the numbering is -// consistent with IPv4. +// DUT-1 Port-2 192.0.2.5 -------- DUT-2 Port-1 192.0.2.6 const ( peerGrpName1 = "BGP-PEER-GROUP1" @@ -87,12 +80,12 @@ var ( } dut1Port2 = attrs.Attributes{ Desc: "DUT1 to DUT2", - IPv4: "192.0.4.1", + IPv4: "192.0.2.5", IPv4Len: plenIPv4, } dut2Port1 = attrs.Attributes{ Name: "DUT2 to DUT1", - IPv4: "192.0.4.2", + IPv4: "192.0.2.6", IPv4Len: plenIPv4, } ) From a9fcd77820fa8301c2dd4552ea88ca95027ea80b Mon Sep 17 00:00:00 2001 From: cprabha Date: Fri, 21 Jul 2023 13:20:02 -0700 Subject: [PATCH 04/25] updated list of deviations in metadata.textproto --- .../bgp_tcp_mss_path_mtu/metadata.textproto | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/metadata.textproto b/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/metadata.textproto index 4afde4dc2aa..6e96c383e9f 100644 --- a/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/metadata.textproto +++ b/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/metadata.textproto @@ -5,3 +5,42 @@ uuid: "7fbf408a-ac55-4e18-8f7f-1a937bff7921" plan_id: "RT-1.21" description: "BGP TCP MSS and PMTUD" testbed: TESTBED_DUT_ATE_2LINKS +platform_exceptions: { + platform: { + vendor: CISCO + } + deviations: { + ipv4_missing_enabled: true + } +} +platform_exceptions: { + platform: { + vendor: NOKIA + } + deviations: { + use_vendor_native_acl_config: true + explicit_port_speed: true + explicit_interface_in_default_vrf: true + route_policy_under_afi_unsupported: true + interface_enabled: true + } +} +platform_exceptions: { + platform: { + vendor: JUNIPER + } + deviations: { + route_policy_under_afi_unsupported: true + } +} +platform_exceptions: { + platform: { + vendor: ARISTA + } + deviations: { + route_policy_under_afi_unsupported: true + omit_l2_mtu: true + interface_enabled: true + default_network_instance: "default" + } +} From 06f2bf3b523560c90a028559808bbaca16390b80 Mon Sep 17 00:00:00 2001 From: cprabha Date: Mon, 24 Jul 2023 14:31:35 -0700 Subject: [PATCH 05/25] Addressing review comments --- .../bgp_tcp_mss_path_mtu_test.go | 63 +++++++++---------- 1 file changed, 28 insertions(+), 35 deletions(-) diff --git a/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go b/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go index f3909ca133d..1b71c24f8db 100644 --- a/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go +++ b/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go @@ -42,7 +42,6 @@ func TestMain(m *testing.M) { const ( peerGrpName1 = "BGP-PEER-GROUP1" - peerGrpName2 = "BGP-PEER-GROUP2" dut1AS = 65501 ateAS1 = 65502 dut2AS = 65502 @@ -52,10 +51,10 @@ const ( dut1Tcp6MssDefault = uint16(1240) dut1IntfMtu = uint16(5040) dut1TcpMss = uint16(4096) - MTU512 = uint16(512) + mtu512 = uint16(512) vlan10 = 10 vlan20 = 20 - ISISInstance = "DEFAULT" + isisInstance = "DEFAULT" authPWd = "BGPTCPMSS" dut1AreaAddress = "49.0001" dut1SysID = "1920.0000.2001" @@ -117,44 +116,38 @@ func bgpCreateNbr(t *testing.T, dut *ondatra.DUTDevice, authPwd, routerId string global := bgp.GetOrCreateGlobal() global.RouterId = ygot.String(routerId) global.As = ygot.Uint32(localAs) - global.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST).Enabled = ygot.Bool(true) + + pg1 := bgp.GetOrCreatePeerGroup(peerGrpName1) + pg1.PeerAs = ygot.Uint32(ateAS1) + pg1.PeerGroupName = ygot.String(peerGrpName1) // Note: we have to define the peer group even if we aren't setting any policy because it's // invalid OC for the neighbor to be part of a peer group that doesn't exist. for _, nbr := range nbrs { + nv := bgp.GetOrCreateNeighbor(nbr.neighborip) + nv.PeerGroup = ygot.String(nbr.peerGrp) + nv.PeerAs = ygot.Uint32(nbr.as) + nv.Enabled = ygot.Bool(true) if nbr.isV4 { - // Create Peer group. - pg1 := bgp.GetOrCreatePeerGroup(nbr.peerGrp) - pg1.PeerAs = ygot.Uint32(nbr.as) - pg1.PeerGroupName = ygot.String(nbr.peerGrp) - // configure neighbor. - nv4 := bgp.GetOrCreateNeighbor(nbr.neighborip) - nv4.PeerGroup = ygot.String(nbr.peerGrp) - nv4.PeerAs = ygot.Uint32(nbr.as) - nv4.Enabled = ygot.Bool(true) if authPwd != "" { - nv4.AuthPassword = ygot.String(authPWd) + nv.AuthPassword = ygot.String(authPWd) } - af4 := nv4.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST) + af4 := nv.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST) af4.Enabled = ygot.Bool(true) - af6 := nv4.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV6_UNICAST) + af6 := nv.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV6_UNICAST) af6.Enabled = ygot.Bool(false) } else { - nv6 := bgp.GetOrCreateNeighbor(nbr.neighborip) - nv6.PeerGroup = ygot.String(nbr.peerGrp) - nv6.PeerAs = ygot.Uint32(nbr.as) - nv6.Enabled = ygot.Bool(true) - af6 := nv6.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV6_UNICAST) + af6 := nv.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV6_UNICAST) af6.Enabled = ygot.Bool(true) - af4 := nv6.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST) + af4 := nv.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST) af4.Enabled = ygot.Bool(false) } } return ni_proto } -// verifyBgpTelemetry checks that the dut has an established BGP session with reasonable settings. -func verifyBgpTelemetry(t *testing.T, dut *ondatra.DUTDevice, nbrIP []string) { +// verifyBGPTelemetry checks that the dut has an established BGP session with reasonable settings. +func verifyBGPTelemetry(t *testing.T, dut *ondatra.DUTDevice, nbrIP []string) { statePath := gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut)).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, "BGP").Bgp() for _, nbr := range nbrIP { nbrPath := statePath.Neighbor(nbr) @@ -175,11 +168,11 @@ func verifyBgpTelemetry(t *testing.T, dut *ondatra.DUTDevice, nbrIP []string) { } } -func configureIsisDut(t *testing.T, dut *ondatra.DUTDevice, intfName []string, dutAreaAddress, dutSysID string) { +func configureISIS(t *testing.T, dut *ondatra.DUTDevice, intfName []string, dutAreaAddress, dutSysID string) { d := &oc.Root{} - dutConfIsisPath := gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut)).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_ISIS, ISISInstance) + dutConfIsisPath := gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut)).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_ISIS, isisInstance) netInstance := d.GetOrCreateNetworkInstance(deviations.DefaultNetworkInstance(dut)) - prot := netInstance.GetOrCreateProtocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_ISIS, ISISInstance) + prot := netInstance.GetOrCreateProtocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_ISIS, isisInstance) if !deviations.ISISprotocolEnabledNotRequired(dut) { prot.Enabled = ygot.Bool(true) } @@ -269,8 +262,8 @@ func configStaticRoute(t *testing.T, dut *ondatra.DUTDevice, prefix string, next gnmi.Update(t, dut, gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut)).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_STATIC, deviations.StaticProtocolName(dut)).Config(), static) } -// TestTcpMssPathMtu is to Validate TCP MSS for BGP v4/v6 sessions. -func TestTcpMssPathMtu(t *testing.T) { +// TestTCPMSSPathMTU is to Validate TCP MSS for BGP v4/v6 sessions. +func TestTCPMSSPathMTU(t *testing.T) { dut1 := ondatra.DUT(t, "dut1") dut2 := ondatra.DUT(t, "dut2") @@ -310,7 +303,7 @@ func TestTcpMssPathMtu(t *testing.T) { t.Run("Verify BGP telemetry", func(t *testing.T) { var dut1NbrIP = []string{atePort1.IPv4, atePort1.IPv6} - verifyBgpTelemetry(t, dut1, dut1NbrIP) + verifyBGPTelemetry(t, dut1, dut1NbrIP) }) dut1Port1Path := gnmi.OC().Interface(dut1.Port(t, "port1").Name()) @@ -334,7 +327,7 @@ func TestTcpMssPathMtu(t *testing.T) { t.Run("Verify BGP telemetry after reset.", func(t *testing.T) { var dut1NbrIP = []string{atePort1.IPv4, atePort1.IPv6} - verifyBgpTelemetry(t, dut1, dut1NbrIP) + verifyBGPTelemetry(t, dut1, dut1NbrIP) }) t.Run("Verify BGP TCP MSS value", func(t *testing.T) { @@ -355,7 +348,7 @@ func TestTcpMssPathMtu(t *testing.T) { t.Run("Configure ISIS Neighbors on DUT1 and ATE", func(t *testing.T) { dut1PortNames := []string{dut1.Port(t, "port1").Name(), dut1.Port(t, "port2").Name()} - configureIsisDut(t, dut1, dut1PortNames, dut1AreaAddress, dut1SysID) + configureISIS(t, dut1, dut1PortNames, dut1AreaAddress, dut1SysID) }) t.Run("Configure static route on DUT2 to ATE to establish multihop iBGP session", func(t *testing.T) { @@ -380,12 +373,12 @@ func TestTcpMssPathMtu(t *testing.T) { t.Run("Verify iBGP session between DUT2 - ATE Port1.", func(t *testing.T) { var dut2NbrIP = []string{atePort1.IPv4} - verifyBgpTelemetry(t, dut2, dut2NbrIP) + verifyBGPTelemetry(t, dut2, dut2NbrIP) }) t.Run("Change the MTU on DUT1-DUT2 to 512 bytes and Enable mtu discovery", func(t *testing.T) { dut2Port1Path := gnmi.OC().Interface(dut2.Port(t, "port1").Name()) - gnmi.Replace(t, dut2, dut2Port1Path.Mtu().Config(), MTU512) + gnmi.Replace(t, dut2, dut2Port1Path.Mtu().Config(), mtu512) gnmi.Replace(t, dut2, dut2ConfPath.Bgp().Neighbor(atePort1.IPv4).Transport().MtuDiscovery().Config(), true) }) @@ -397,7 +390,7 @@ func TestTcpMssPathMtu(t *testing.T) { t.Run("Verify iBGP session between DUT2 - ATE Port1.", func(t *testing.T) { var dut2NbrIP = []string{atePort1.IPv4} - verifyBgpTelemetry(t, dut2, dut2NbrIP) + verifyBGPTelemetry(t, dut2, dut2NbrIP) }) t.Run("Verify TCP MSS adjusted to below 512 bytes", func(t *testing.T) { From bc8379783810c7f94d2cba71dc7f333bae00f2a5 Mon Sep 17 00:00:00 2001 From: sachendras <44847441+sachendras@users.noreply.github.com> Date: Thu, 27 Jul 2023 16:13:00 -0700 Subject: [PATCH 06/25] Update README.md --- .../ate_tests/bgp_tcp_mss_path_mtu/README.md | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/README.md b/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/README.md index 87ee6b8beae..165824eb224 100644 --- a/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/README.md +++ b/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/README.md @@ -4,20 +4,24 @@ BGP TCP MSS and PMTUD +## Topology + +"Virtual host on ATE" <--> ATE (port1) <--> DUT + ## Procedure * Establish BGP sessions between: - * ATE port-1 --- eBGP-IPv4/IPv6 ---- DUT1 - * ATE port-1 ---- iBGP IPv4 ---- DUT2. -* DUT-2 is directly connected to DUT-1. + * ATE (port-1) --- eBGP-IPv4/IPv6 ---- DUT + * Virtual host on ATE ---- iBGP IPv4 ---- DUT. * TODO : Verify that the default TCP MSS value is set below interface MTU value. -* Change the Interface MTU to the ATE port as 5040. -* Configure IP TCP MSS value of 4096 bytes on the interface to the ATE port. +* Change the Interface MTU on the DUT port as well as ATE(port1) to 5040B +* Configure IP TCP MSS value of 4096 bytes on the DUT interface to the ATE port1. * Re-establish the BGP sessions by tcp reset. * Verify that the TCP MSS value is set to 4096 bytes for IPv4 and IPv6. -* Establish iBGP session with MD5 enabled from ATE port-1 to DUT-2. -* Change the MTU on the DUT-1 to DUT-2 link to 512 bytes and enable PMTUD on the DUT. -* TODO : Validate that the min MSS value has been adjusted to be below 512 bytes on the tcp session. +* Establish iBGP session with MD5 enabled between the "virtual host on ATE" and the DUT. +* Ensure that the MTU on the ATE port towards the virtual host is set at defualt while the virtual-host interface towards ATE is set at 5040B. +* Enable PMTUD on the DUT. +* TODO : Validate that the min MSS value has been adjusted to be below 1500 bytes on the tcp session. ## Config Parameter coverage From c94f5d591042aa4c3392d15a71286a71ac0182fb Mon Sep 17 00:00:00 2001 From: cprabha Date: Fri, 11 Aug 2023 14:09:53 -0700 Subject: [PATCH 07/25] added otg test --- .../otg_tests/bgp_tcp_mss_path_mtu/README.md | 42 ++ .../bgp_tcp_mss_path_mtu_test.go | 424 ++++++++++++++++++ .../bgp_tcp_mss_path_mtu/metadata.textproto | 7 + 3 files changed, 473 insertions(+) create mode 100644 feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md create mode 100644 feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go create mode 100644 feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/metadata.textproto diff --git a/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md b/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md new file mode 100644 index 00000000000..e76eb79636b --- /dev/null +++ b/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md @@ -0,0 +1,42 @@ +# RT-1.21: BGP TCP MSS and PMTUD + +## Summary + +BGP TCP MSS and PMTUD + +## Topology + +"Virtual host on ATE" <--> ATE (port1) <--> DUT + +## Procedure + +* Establish BGP sessions between: + * ATE (port-1) --- eBGP-IPv4/IPv6 ---- DUT + * Virtual host on ATE ---- iBGP IPv4 ---- DUT. +* TODO : Verify that the default TCP MSS value is set below interface MTU value. +* Change the Interface MTU on the DUT port as well as ATE(port1) to 5040B +* Configure IP TCP MSS value of 4096 bytes on the DUT interface to the ATE port1. +* Re-establish the BGP sessions by tcp reset. +* Verify that the TCP MSS value is set to 4096 bytes for IPv4 and IPv6. +* Establish iBGP session with MD5 enabled between the "virtual host on ATE" and the DUT. +* Ensure that the MTU on the ATE port towards the virtual host is set at defualt while the virtual-host interface towards ATE is set at 5040B. +* Enable PMTUD on the DUT. +* TODO : Validate that the min MSS value has been adjusted to be below 1500 bytes on the tcp session. + +## Config Parameter coverage + +* /neighbors/neighbor/transport/config/tcp-mss +* /neighbors/neighbor/transport/config/mtu-discovery + +## Telemetry Parameter coverage + +* /neighbors/neighbor/transport/state/tcp-mss +* /neighbors/neighbor/transport/state/mtu-discovery + +## Protocol/RPC Parameter coverage + +N/A + +## Minimum DUT platform requirement + +N/A \ No newline at end of file diff --git a/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go b/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go new file mode 100644 index 00000000000..f6e6050f1bd --- /dev/null +++ b/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go @@ -0,0 +1,424 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bgp_tcp_mss_path_mtu_otg_test + +import ( + "fmt" + "testing" + "time" + + "github.com/open-traffic-generator/snappi/gosnappi" + "github.com/openconfig/featureprofiles/internal/attrs" + "github.com/openconfig/featureprofiles/internal/deviations" + "github.com/openconfig/featureprofiles/internal/fptest" + "github.com/openconfig/ondatra" + "github.com/openconfig/ondatra/gnmi" + "github.com/openconfig/ondatra/gnmi/oc" + "github.com/openconfig/ondatra/otg" + "github.com/openconfig/ygnmi/ygnmi" + "github.com/openconfig/ygot/ygot" +) + +func TestMain(m *testing.M) { + fptest.RunTests(m) +} + +// The testbed consists of ate:port1 -> dut:port1 and +// dut:port2 -> ate:port2. The first pair is called the "source" +// pair, and the second the "destination" pair. +// +// ATE Port-1 192.0.2.2 -------- DUT-1 Port-1 192.0.2.1 +// DUT-1 Port-2 192.0.2.5 -------- DUT-2 Port-1 192.0.2.6 + +const ( + peerGrpName1 = "BGP-PEER-GROUP1" + dut1AS = 65501 + ateAS1 = 65502 + dut2AS = 65502 + plenIPv4 = 30 + plenIPv6 = 126 + dut1TcpMssDefault = uint16(536) + dut1Tcp6MssDefault = uint16(1240) + dut1IntfMtu = uint16(5040) + dut1TcpMss = uint16(4096) + mtu512 = uint16(512) + vlan10 = 10 + vlan20 = 20 + isisInstance = "DEFAULT" + authPWd = "BGPTCPMSS" + dut1AreaAddress = "49.0001" + dut1SysID = "1920.0000.2001" + dut2AreaAddress = "49.0001" + dut2SysID = "1920.0000.3001" + ATESysID = "640000000001" +) + +var ( + dut1Port1 = attrs.Attributes{ + Desc: "DUT to ATE source", + IPv4: "192.0.2.1", + IPv6: "2001:db8::192:0:2:1", + IPv4Len: plenIPv4, + IPv6Len: plenIPv6, + } + atePort1 = attrs.Attributes{ + Name: "ateSrc", + IPv4: "192.0.2.2", + IPv6: "2001:db8::192:0:2:2", + MAC: "02:00:01:01:01:01", + IPv4Len: plenIPv4, + IPv6Len: plenIPv6, + } + dut1Port2 = attrs.Attributes{ + Desc: "DUT1 to DUT2", + IPv4: "192.0.2.5", + IPv4Len: plenIPv4, + } + dut2Port1 = attrs.Attributes{ + Name: "DUT2 to DUT1", + IPv4: "192.0.2.6", + IPv4Len: plenIPv4, + } +) + +// configureDUT configures all the interfaces on the DUT. +func configureDUT(t *testing.T) { + dc := gnmi.OC() + dut1 := ondatra.DUT(t, "dut1") + dut2 := ondatra.DUT(t, "dut2") + + t.Log("Configure interfaces on dut1.") + i1 := dut1Port1.NewOCInterface(dut1.Port(t, "port1").Name(), dut1) + gnmi.Replace(t, dut1, dc.Interface(i1.GetName()).Config(), i1) + i2 := dut1Port2.NewOCInterface(dut1.Port(t, "port2").Name(), dut1) + gnmi.Replace(t, dut1, dc.Interface(i2.GetName()).Config(), i2) + + t.Log("Configure interfaces on dut2.") + i3 := dut2Port1.NewOCInterface(dut2.Port(t, "port1").Name(), dut2) + gnmi.Replace(t, dut2, dc.Interface(i3.GetName()).Config(), i3) +} + +// bgpCreateNbr creates bgp configuration on dut device. +func bgpCreateNbr(t *testing.T, dut *ondatra.DUTDevice, authPwd, routerId string, localAs uint32, nbrs []*bgpNeighbor) *oc.NetworkInstance_Protocol { + + d := &oc.Root{} + ni1 := d.GetOrCreateNetworkInstance(deviations.DefaultNetworkInstance(dut)) + ni_proto := ni1.GetOrCreateProtocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, "BGP") + bgp := ni_proto.GetOrCreateBgp() + global := bgp.GetOrCreateGlobal() + global.RouterId = ygot.String(routerId) + global.As = ygot.Uint32(localAs) + + pg1 := bgp.GetOrCreatePeerGroup(peerGrpName1) + pg1.PeerAs = ygot.Uint32(ateAS1) + pg1.PeerGroupName = ygot.String(peerGrpName1) + + // Note: we have to define the peer group even if we aren't setting any policy because it's + // invalid OC for the neighbor to be part of a peer group that doesn't exist. + for _, nbr := range nbrs { + nv := bgp.GetOrCreateNeighbor(nbr.neighborip) + nv.PeerGroup = ygot.String(nbr.peerGrp) + nv.PeerAs = ygot.Uint32(nbr.as) + nv.Enabled = ygot.Bool(true) + if nbr.isV4 { + if authPwd != "" { + nv.AuthPassword = ygot.String(authPWd) + } + af4 := nv.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST) + af4.Enabled = ygot.Bool(true) + af6 := nv.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV6_UNICAST) + af6.Enabled = ygot.Bool(false) + } else { + af6 := nv.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV6_UNICAST) + af6.Enabled = ygot.Bool(true) + af4 := nv.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST) + af4.Enabled = ygot.Bool(false) + } + } + return ni_proto +} + +// verifyBGPTelemetry checks that the dut has an established BGP session with reasonable settings. +func verifyBGPTelemetry(t *testing.T, dut *ondatra.DUTDevice, nbrIP []string) { + statePath := gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut)).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, "BGP").Bgp() + for _, nbr := range nbrIP { + nbrPath := statePath.Neighbor(nbr) + t.Logf("Waiting for BGP neighbor to establish...") + status, ok := gnmi.Watch(t, dut, nbrPath.SessionState().State(), time.Minute, func(val *ygnmi.Value[oc.E_Bgp_Neighbor_SessionState]) bool { + state, ok := val.Val() + return ok && state == oc.Bgp_Neighbor_SessionState_ESTABLISHED + }).Await(t) + if !ok { + fptest.LogQuery(t, "BGP reported state", nbrPath.State(), gnmi.Get(t, dut, nbrPath.State())) + t.Fatal("No BGP neighbor formed") + } + state, _ := status.Val() + if want := oc.Bgp_Neighbor_SessionState_ESTABLISHED; state != want { + t.Errorf("BGP peer %s status got %d, want %d", nbr, state, want) + } + t.Logf("BGP adjacency for %s: %s", nbr, state) + } +} + +func configureISIS(t *testing.T, dut *ondatra.DUTDevice, intfName []string, dutAreaAddress, dutSysID string) { + d := &oc.Root{} + dutConfIsisPath := gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut)).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_ISIS, isisInstance) + netInstance := d.GetOrCreateNetworkInstance(deviations.DefaultNetworkInstance(dut)) + prot := netInstance.GetOrCreateProtocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_ISIS, isisInstance) + prot.Enabled = ygot.Bool(true) + isis := prot.GetOrCreateIsis() + globalISIS := isis.GetOrCreateGlobal() + globalISIS.LevelCapability = oc.Isis_LevelType_LEVEL_2 + globalISIS.Net = []string{fmt.Sprintf("%v.%v.00", dutAreaAddress, dutSysID)} + globalISIS.GetOrCreateAf(oc.IsisTypes_AFI_TYPE_IPV4, oc.IsisTypes_SAFI_TYPE_UNICAST).Enabled = ygot.Bool(true) + isisLevel2 := isis.GetOrCreateLevel(2) + isisLevel2.MetricStyle = oc.Isis_MetricStyle_WIDE_METRIC + + for _, intf := range intfName { + isisIntf := isis.GetOrCreateInterface(intf) + isisIntf.Enabled = ygot.Bool(true) + isisIntf.CircuitType = oc.Isis_CircuitType_POINT_TO_POINT + isisIntfLevel := isisIntf.GetOrCreateLevel(2) + isisIntfLevel.Enabled = ygot.Bool(true) + isisIntfLevelAfi := isisIntfLevel.GetOrCreateAf(oc.IsisTypes_AFI_TYPE_IPV4, oc.IsisTypes_SAFI_TYPE_UNICAST) + isisIntfLevelAfi.Metric = ygot.Uint32(200) + isisIntfLevelAfi.Enabled = ygot.Bool(true) + } + gnmi.Replace(t, dut, dutConfIsisPath.Config(), prot) +} + +func configureOTG(t *testing.T, otg *otg.OTG) gosnappi.Config { + + config := otg.NewConfig(t) + port1 := config.Ports().Add().SetName("port1") + + iDut1Dev := config.Devices().Add().SetName(atePort1.Name) + iDut1Eth := iDut1Dev.Ethernets().Add().SetName(atePort1.Name + ".Eth").SetMac(atePort1.MAC) + iDut1Eth.Connection().SetChoice(gosnappi.EthernetConnectionChoice.PORT_NAME).SetPortName(port1.Name()) + iDut1Ipv4 := iDut1Eth.Ipv4Addresses().Add().SetName(atePort1.Name + ".IPv4") + iDut1Ipv4.SetAddress(atePort1.IPv4).SetGateway(dut1Port1.IPv4).SetPrefix(int32(atePort1.IPv4Len)) + iDut1Ipv6 := iDut1Eth.Ipv6Addresses().Add().SetName(atePort1.Name + ".IPv6") + iDut1Ipv6.SetAddress(atePort1.IPv6).SetGateway(dut1Port1.IPv6).SetPrefix(int32(atePort1.IPv6Len)) + + isisDut1 := iDut1Dev.Isis().SetName("ISIS").SetSystemId(ATESysID) + + isisDut1.Basic().SetIpv4TeRouterId(atePort1.IPv4).SetHostname(isisDut1.Name()).SetLearnedLspFilter(true) + isisDut1.Interfaces().Add().SetEthName(iDut1Dev.Ethernets().Items()[0].Name()). + SetName("devIsisInt"). + SetLevelType(gosnappi.IsisInterfaceLevelType.LEVEL_2). + SetNetworkType(gosnappi.IsisInterfaceNetworkType.POINT_TO_POINT) + + iDut1Bgp := iDut1Dev.Bgp().SetRouterId(iDut1Ipv4.Address()) + iDut1Bgp4Peer := iDut1Bgp.Ipv4Interfaces().Add().SetIpv4Name(iDut1Ipv4.Name()).Peers().Add().SetName(atePort1.Name + ".BGP4.peer") + iDut1Bgp4Peer.SetPeerAddress(iDut1Ipv4.Gateway()).SetAsNumber(ateAS1).SetAsType(gosnappi.BgpV4PeerAsType.EBGP) + iDut1Bgp6 := iDut1Dev.Bgp().SetRouterId(iDut1Ipv4.Address()) + iDut1Bgp6Peer := iDut1Bgp6.Ipv6Interfaces().Add().SetIpv6Name(iDut1Ipv6.Name()).Peers().Add().SetName(atePort1.Name + ".BGP6.peer") + iDut1Bgp6Peer.SetPeerAddress(iDut1Ipv6.Gateway()).SetAsNumber(ateAS1).SetAsType(gosnappi.BgpV6PeerAsType.EBGP) + + t.Logf("Pushing config to OTG and starting protocols...") + + otg.PushConfig(t, config) + otg.StartProtocols(t) + + return config +} + +func configOTG(t *testing.T, otg *otg.OTG) gosnappi.Config { + + config := otg.NewConfig(t) + port1 := config.Ports().Add().SetName("port1") + + iDut1Dev := config.Devices().Add().SetName(atePort1.Name) + iDut1Eth := iDut1Dev.Ethernets().Add().SetName(atePort1.Name + ".Eth").SetMac(atePort1.MAC) + iDut1Eth.Connection().SetChoice(gosnappi.EthernetConnectionChoice.PORT_NAME).SetPortName(port1.Name()) + iDut1Ipv4 := iDut1Eth.Ipv4Addresses().Add().SetName(atePort1.Name + ".IPv4") + iDut1Ipv4.SetAddress(atePort1.IPv4).SetGateway(dut1Port1.IPv4).SetPrefix(int32(atePort1.IPv4Len)) + iDut1Ipv6 := iDut1Eth.Ipv6Addresses().Add().SetName(atePort1.Name + ".IPv6") + iDut1Ipv6.SetAddress(atePort1.IPv6).SetGateway(dut1Port1.IPv6).SetPrefix(int32(atePort1.IPv6Len)) + + isisDut1 := iDut1Dev.Isis().SetName("ISIS").SetSystemId(ATESysID) + + isisDut1.Basic().SetIpv4TeRouterId(atePort1.IPv4).SetHostname(isisDut1.Name()).SetLearnedLspFilter(true) + isisDut1.Interfaces().Add().SetEthName(iDut1Dev.Ethernets().Items()[0].Name()). + SetName("devIsisInt"). + SetLevelType(gosnappi.IsisInterfaceLevelType.LEVEL_2). + SetNetworkType(gosnappi.IsisInterfaceNetworkType.POINT_TO_POINT) + + iDut1Bgp := iDut1Dev.Bgp().SetRouterId(iDut1Ipv4.Address()) + iDut1Bgp4Peer := iDut1Bgp.Ipv4Interfaces().Add().SetIpv4Name(iDut1Ipv4.Name()).Peers().Add().SetName(atePort1.Name + ".BGP4.peer") + iDut1Bgp4Peer.SetPeerAddress(dut2Port1.IPv4).SetAsNumber(ateAS1).SetAsType(gosnappi.BgpV4PeerAsType.IBGP). + Advanced().SetMd5Key(authPWd) + + t.Logf("Pushing config to OTG and starting protocols...") + + otg.PushConfig(t, config) + otg.StartProtocols(t) + + return config +} + +func configStaticRoute(t *testing.T, dut *ondatra.DUTDevice, prefix string, nexthop string) { + ni := oc.NetworkInstance{Name: ygot.String(deviations.DefaultNetworkInstance(dut))} + static := ni.GetOrCreateProtocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_STATIC, deviations.StaticProtocolName(dut)) + sr := static.GetOrCreateStatic(prefix) + nh := sr.GetOrCreateNextHop("0") + nh.NextHop = oc.UnionString(nexthop) + gnmi.Update(t, dut, gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut)).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_STATIC, deviations.StaticProtocolName(dut)).Config(), static) +} + +type bgpNeighbor struct { + as uint32 + neighborip string + isV4 bool + peerGrp string +} + +// TestTcpMssPathMtu is to Validate TCP MSS for BGP v4/v6 sessions. +func TestTcpMssPathMtu(t *testing.T) { + + dut1 := ondatra.DUT(t, "dut1") + dut2 := ondatra.DUT(t, "dut2") + ate := ondatra.ATE(t, "ate") + + dutList := []*ondatra.DUTDevice{dut1, dut2} + + t.Run("Configure DUT1 and DUT2 interfaces", func(t *testing.T) { + configureDUT(t) + }) + + t.Run("Configure DEFAULT network instance on both DUT1 and DUT2", func(t *testing.T) { + for _, dut := range dutList { + dutConfNIPath := gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut)) + gnmi.Replace(t, dut, dutConfNIPath.Type().Config(), oc.NetworkInstanceTypes_NETWORK_INSTANCE_TYPE_DEFAULT_INSTANCE) + } + }) + + dut1ConfPath := gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut1)).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, "BGP") + dut2ConfPath := gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut2)).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, "BGP") + + t.Run("Configure BGP Neighbors DUT1 - ATE", func(t *testing.T) { + t.Logf("Start DUT1 BGP Config.") + gnmi.Delete(t, dut1, dut1ConfPath.Config()) + dut1Nbr1v4 := &bgpNeighbor{as: ateAS1, neighborip: atePort1.IPv4, isV4: true, peerGrp: peerGrpName1} + dut1Nbr1v6 := &bgpNeighbor{as: ateAS1, neighborip: atePort1.IPv6, isV4: false, peerGrp: peerGrpName1} + dut1Nbrs := []*bgpNeighbor{dut1Nbr1v4, dut1Nbr1v6} + dut1Conf := bgpCreateNbr(t, dut1, "", dut1Port2.IPv4, dut1AS, dut1Nbrs) + gnmi.Replace(t, dut1, dut1ConfPath.Config(), dut1Conf) + fptest.LogQuery(t, "DUT1 BGP Config", dut1ConfPath.Config(), gnmi.GetConfig(t, dut1, dut1ConfPath.Config())) + }) + + otg := ate.OTG() + var otgConfig gosnappi.Config + + t.Run("configureOTG", func(t *testing.T) { + otgConfig = configureOTG(t, otg) + }) + + var dut1NbrIP = []string{atePort1.IPv4, atePort1.IPv6} + t.Run("Verify BGP telemetry", func(t *testing.T) { + verifyBGPTelemetry(t, dut1, dut1NbrIP) + }) + + dut1Port1Path := gnmi.OC().Interface(dut1.Port(t, "port1").Name()) + t.Run("Verify default TCP MSS v4 and v6 session", func(t *testing.T) { + // TODO: + }) + t.Run("Change the Interface MTU to the ATE port as 5040.", func(t *testing.T) { + t.Logf("Configure DUT1 interface MTU to %v", dut1IntfMtu) + gnmi.Replace(t, dut1, dut1Port1Path.Mtu().Config(), dut1IntfMtu) + t.Logf("Configure DUT1 BGP TCP-MSS value to %v", dut1TcpMss) + gnmi.Replace(t, dut1, dut1ConfPath.Bgp().Neighbor(atePort1.IPv4).Transport().TcpMss().Config(), dut1TcpMss) + gnmi.Replace(t, dut1, dut1ConfPath.Bgp().Neighbor(atePort1.IPv6).Transport().TcpMss().Config(), dut1TcpMss) + }) + + t.Run("Re-establish the BGP sessions by tcp reset.", func(t *testing.T) { + otg.StopProtocols(t) + time.Sleep(20 * time.Second) + otg.PushConfig(t, otgConfig) + otg.StartProtocols(t) + }) + + t.Run("Verify BGP telemetry after reset.", func(t *testing.T) { + verifyBGPTelemetry(t, dut1, dut1NbrIP) + }) + + t.Run("Verify BGP TCP MSS value", func(t *testing.T) { + t.Logf("Verify DUT1 BGP TCP-MSS value is to %v for both BGP v4 and v6 sessions.", dut1TcpMss) + if gotTcpMss := gnmi.Get(t, dut1, dut1ConfPath.Bgp().Neighbor(atePort1.IPv4).Transport().TcpMss().State()); gotTcpMss != dut1TcpMss { + t.Errorf("Obtained TCP MSS for BGP v4 on dut1 is not as expected, got is %v, want %v", gotTcpMss, dut1TcpMss) + } + if gotTcp6Mss := gnmi.Get(t, dut1, dut1ConfPath.Bgp().Neighbor(atePort1.IPv6).Transport().TcpMss().State()); gotTcp6Mss != dut1TcpMss { + t.Errorf("Obtained TCP MSS for BGP v6 peer on dut1 is not as expected, got is %v, want %v", gotTcp6Mss, dut1TcpMss) + } + }) + + t.Run("Remove configured BGP TCP MSS for v4 and v6 neighbors on DUT1", func(t *testing.T) { + dut1Port1Path := gnmi.OC().Interface(dut1.Port(t, "port1").Name()) + gnmi.Delete(t, dut1, dut1ConfPath.Config()) + gnmi.Delete(t, dut1, dut1Port1Path.Mtu().Config()) + }) + + t.Run("Configure ISIS Neighbors on DUT1 and ATE", func(t *testing.T) { + dut1PortNames := []string{dut1.Port(t, "port1").Name(), dut1.Port(t, "port2").Name()} + configureISIS(t, dut1, dut1PortNames, dut1AreaAddress, dut1SysID) + }) + + t.Run("Configure static route on DUT2 to ATE to establish multihop iBGP session", func(t *testing.T) { + ateIPAddr := fmt.Sprintf("%s/%d", atePort1.IPv4, uint32(32)) + configStaticRoute(t, dut2, ateIPAddr, dut1Port2.IPv4) + }) + + t.Run("Establish iBGP session with MD5 enabled from ATE port-1 to DUT-2 - multihop iBGP", func(t *testing.T) { + t.Logf("Start DUT2 - ATE Port1 iBGP Config.") + gnmi.Delete(t, dut2, dut2ConfPath.Config()) + dut2Nbr1v4 := &bgpNeighbor{as: ateAS1, neighborip: atePort1.IPv4, isV4: true, peerGrp: peerGrpName1} + dut2Nbrs := []*bgpNeighbor{dut2Nbr1v4} + dut2Conf := bgpCreateNbr(t, dut2, authPWd, dut2Port1.IPv4, dut2AS, dut2Nbrs) + gnmi.Replace(t, dut2, dut2ConfPath.Config(), dut2Conf) + fptest.LogQuery(t, "DUT2 BGP Config", dut2ConfPath.Config(), gnmi.GetConfig(t, dut2, dut2ConfPath.Config())) + }) + + t.Run("Configure iBGP session ATE Port1 - DUT2", func(t *testing.T) { + otg.StopProtocols(t) + otgConfig = configOTG(t, otg) + }) + + t.Run("Verify iBGP session between DUT2 - ATE Port1.", func(t *testing.T) { + var dut2NbrIP = []string{atePort1.IPv4} + verifyBGPTelemetry(t, dut2, dut2NbrIP) + }) + + t.Run("Change the MTU on DUT1-DUT2 to 512 bytes and Enable mtu discovery", func(t *testing.T) { + dut2Port1Path := gnmi.OC().Interface(dut2.Port(t, "port1").Name()) + gnmi.Replace(t, dut2, dut2Port1Path.Mtu().Config(), mtu512) + gnmi.Replace(t, dut2, dut2ConfPath.Bgp().Neighbor(atePort1.IPv4).Transport().MtuDiscovery().Config(), true) + }) + + t.Run("Re-establish the BGP sessions by tcp reset", func(t *testing.T) { + otg.StopProtocols(t) + time.Sleep(20 * time.Second) + otg.PushConfig(t, otgConfig) + otg.StartProtocols(t) + }) + + t.Run("Verify iBGP session between DUT2 - ATE Port1.", func(t *testing.T) { + var dut2NbrIP = []string{atePort1.IPv4} + verifyBGPTelemetry(t, dut2, dut2NbrIP) + }) + + t.Run("Verify TCP MSS adjusted to below 512 bytes", func(t *testing.T) { + // TODO: + }) +} diff --git a/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/metadata.textproto b/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/metadata.textproto new file mode 100644 index 00000000000..5af1a710137 --- /dev/null +++ b/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/metadata.textproto @@ -0,0 +1,7 @@ +# proto-file: github.com/openconfig/featureprofiles/proto/metadata.proto +# proto-message: Metadata + +uuid: "7fbf408a-ac55-4e18-8f7f-1a937bff7921" +plan_id: "RT-1.21" +description: "BGP TCP MSS and PMTUD" +testbed: TESTBED_DUT_ATE_2LINKS From 2416aaca759bc9c8a351686059253304def13629 Mon Sep 17 00:00:00 2001 From: cprabha Date: Fri, 11 Aug 2023 14:21:29 -0700 Subject: [PATCH 08/25] removed deviation flag --- .../bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go b/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go index 1b71c24f8db..86ff180e78b 100644 --- a/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go +++ b/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go @@ -173,9 +173,7 @@ func configureISIS(t *testing.T, dut *ondatra.DUTDevice, intfName []string, dutA dutConfIsisPath := gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut)).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_ISIS, isisInstance) netInstance := d.GetOrCreateNetworkInstance(deviations.DefaultNetworkInstance(dut)) prot := netInstance.GetOrCreateProtocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_ISIS, isisInstance) - if !deviations.ISISprotocolEnabledNotRequired(dut) { - prot.Enabled = ygot.Bool(true) - } + prot.Enabled = ygot.Bool(true) isis := prot.GetOrCreateIsis() globalISIS := isis.GetOrCreateGlobal() globalISIS.LevelCapability = oc.Isis_LevelType_LEVEL_2 From f858cd819a7e502e0ef8ec9d347436873c56667d Mon Sep 17 00:00:00 2001 From: cprabha Date: Fri, 11 Aug 2023 14:46:46 -0700 Subject: [PATCH 09/25] removed tunnel files --- .../otg_tests/tunnel_acl_based_test/README.md | 26 -- .../tunnel_acl_based_test/metadata.textproto | 7 - .../tun_acl_dscp_test.go | 378 ------------------ 3 files changed, 411 deletions(-) delete mode 100644 feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/README.md delete mode 100644 feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/metadata.textproto delete mode 100644 feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/tun_acl_dscp_test.go diff --git a/feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/README.md b/feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/README.md deleted file mode 100644 index 69693ae5b97..00000000000 --- a/feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/README.md +++ /dev/null @@ -1,26 +0,0 @@ - TUN-1.9: GRE inner packet DSCP - -## Summary - -Verify the DSCP value of original packet header after GRE acl based tunnel encapsulation. - -## Procedure - -* Configure DUT with ingress and egress routed interfaces. -* Configure acl based tunnel configuration with action as encapsulation. -* Attach the filter on ingress interface. -* Configure the static route for the tunnel end point destination. -* Capture packet on ATE on the recieving end(port-2). -* verify dscp value of original packet after encapsulation. -* verify that no traffic drops in all flows. - -## Config Parameter coverage - -* /acl/interfaces/interface/ingress-acl-sets/ingress-acl-set/config/set-name -* /acl/interfaces/interface/ingress-acl-sets/ingress-acl-set/config/set-type - -## Validation coverage - -* No packet drop should be oberserved. -* Capture the packet on recieving end and verify the orginal DSCP value. Orginal value should not be altered. - diff --git a/feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/metadata.textproto b/feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/metadata.textproto deleted file mode 100644 index 0ba6b64b8c8..00000000000 --- a/feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/metadata.textproto +++ /dev/null @@ -1,7 +0,0 @@ -# proto-file: github.com/openconfig/featureprofiles/proto/metadata.proto -# proto-message: Metadata - -uuid: "5e46a336-0e6c-4b65-ac49-8b925aacb46c" -plan_id: "TUN-1.9" -description: "GRE inner packet DSCP" -testbed: TESTBED_DUT_ATE_2LINKS diff --git a/feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/tun_acl_dscp_test.go b/feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/tun_acl_dscp_test.go deleted file mode 100644 index 6932c5135fc..00000000000 --- a/feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/tun_acl_dscp_test.go +++ /dev/null @@ -1,378 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package tun_acl_dscp_test - -import ( - "context" - "fmt" - "log" - "os" - "testing" - "time" - - "github.com/google/gopacket" - "github.com/google/gopacket/layers" - "github.com/google/gopacket/pcap" - "github.com/open-traffic-generator/snappi/gosnappi" - "github.com/openconfig/featureprofiles/internal/attrs" - "github.com/openconfig/featureprofiles/internal/deviations" - "github.com/openconfig/featureprofiles/internal/fptest" - gpb "github.com/openconfig/gnmi/proto/gnmi" - "github.com/openconfig/ondatra" - "github.com/openconfig/ondatra/gnmi" - "github.com/openconfig/ondatra/gnmi/oc" - "github.com/openconfig/ondatra/gnmi/oc/acl" - "github.com/openconfig/ygot/ygot" -) - -func TestMain(m *testing.M) { - fptest.RunTests(m) -} - -// Settings for configuring the baseline testbed with the test topology. -// -// The testbed consists of: -// -// ate:port1 -> dut:port1 and -// dut:port2 -> ate:port2 -// -// * ate:port1 -> dut:port1 subnet 192.0.1.2/30 -// * ate:port2 -> dut:port2 subnet 192.0.2.6/30 -// -// * Traffic is sent from 192.0.2.2(ate:port1) to 192.0.2.6(ate:port2). -// Dut Interfaces are configured as mentioned below: -// dut:port1 -> 192.0.1.1 -// dut:port2 -> 192.0.2.5 -// Verify the DSCP value in the packet capture. -// TOS Caluculation: -// For example, DSCP Value configured with 8 (001000). -// In the Capture as the TOS value will have 8 bits(2 appended at LSB) corresponding binary will be 001000 00(dscp + 00) -// which is equivalet to 32 in decimal. - -const ( - ipv4PrefixLen = 24 - pps = 100 - FrameSize = 512 - aclName = "f1" - termName = "t1" - EncapSrcMatch = "192.0.1.2" - EncapDstMatch = "192.0.2.6" - count = "GreFilterCount" - greTunnelEndpoint = "TunnelEncapIpv4" - greSrcAddr = "50.0.0.1" - greDstAddr = "60.0.0.0/32" - dscp = 8 - CorrespondingTOS = 32 - GreProtocol = 47 - Tunnelaction = "TunnelEncapIpv4" - plenIPv4 = 24 - tolerance = 50 - lossTolerance = 2 - prefix = "0.0.0.0/0" - nexthop = "192.0.2.6" -) - -var ( - dutSrc = attrs.Attributes{ - Desc: "DUT to ATE source", - IPv4: "192.0.1.1", - IPv4Len: plenIPv4, - } - ateSrc = attrs.Attributes{ - Name: "ateSrc", - MAC: "02:00:01:01:01:01", - IPv4: "192.0.1.2", - IPv4Len: plenIPv4, - } - dutDst = attrs.Attributes{ - Desc: "DUT to ATE destination", - IPv4: "192.0.2.5", - IPv4Len: plenIPv4, - } - ateDst = attrs.Attributes{ - Name: "atedst", - MAC: "02:00:02:01:01:01", - IPv4: "192.0.2.6", - IPv4Len: plenIPv4, - } -) - -// configInterfaceDUT configures the DUT interfaces. -func configInterfaceDUT(i *oc.Interface, a *attrs.Attributes, dut *ondatra.DUTDevice) *oc.Interface { - i.Description = ygot.String(a.Desc) - i.Type = oc.IETFInterfaces_InterfaceType_ethernetCsmacd - if deviations.InterfaceEnabled(dut) { - i.Enabled = ygot.Bool(true) - } - s := i.GetOrCreateSubinterface(0) - s4 := s.GetOrCreateIpv4() - if deviations.InterfaceEnabled(dut) && !deviations.IPv4MissingEnabled(dut) { - s4.Enabled = ygot.Bool(true) - } - s4a := s4.GetOrCreateAddress(a.IPv4) - s4a.PrefixLength = ygot.Uint8(ipv4PrefixLen) - return i -} - -// configureDUT configures port1 and port2 on the DUT. -func configureDUT(t *testing.T, dut *ondatra.DUTDevice) { - d := gnmi.OC() - p1 := dut.Port(t, "port1") - i1 := &oc.Interface{Name: ygot.String(p1.Name())} - gnmi.Replace(t, dut, d.Interface(p1.Name()).Config(), configInterfaceDUT(i1, &dutSrc, dut)) - p2 := dut.Port(t, "port2") - i2 := &oc.Interface{Name: ygot.String(p2.Name())} - gnmi.Replace(t, dut, d.Interface(p2.Name()).Config(), configInterfaceDUT(i2, &dutDst, dut)) - configureNetworkInstance(t) - t.Logf("Configure the DUT with static route ...") - configStaticRoute(t, dut, prefix, nexthop) - gnmiClient := dut.RawAPIs().GNMI().Default(t) - var config string - t.Logf("Push the CLI config:\n%s", dut.Vendor()) - switch dut.Vendor() { - case ondatra.JUNIPER: - config = juniperEncapCLI(aclName, EncapSrcMatch, EncapDstMatch, count, greSrcAddr, greDstAddr) - t.Logf(" Push CLI config of:\n%s", dut.Vendor()) - default: - t.Errorf("Invalid Filter configuration") - } - gpbSetRequest := buildCliConfigRequest(config) - t.Log("gnmiClient Set CLI config") - if _, err := gnmiClient.Set(context.Background(), gpbSetRequest); err != nil { - t.Fatalf("gnmiClient.Set() with unexpected error: %v", err) - } - d1 := &oc.Root{} - ifName := dut.Port(t, "port1").Name() - t.Log("Attach the filter to the ingress interface") - iFace := d1.GetOrCreateAcl().GetOrCreateInterface(ifName) - aclConf := configACLInterface(t, iFace, ifName) - gnmi.Replace(t, dut, aclConf.Config(), iFace) - fptest.LogQuery(t, "ACL config:\n", aclConf.Config(), gnmi.GetConfig(t, dut, aclConf.Config())) -} - -// configACLInterface configures the ACL attachment on interface -func configACLInterface(t *testing.T, iFace *oc.Acl_Interface, ifName string) *acl.Acl_InterfacePath { - aclConf := gnmi.OC().Acl().Interface(ifName) - if ifName != "" { - iFace.GetOrCreateIngressAclSet(aclName, oc.Acl_ACL_TYPE_ACL_IPV4) - iFace.GetOrCreateInterfaceRef().Interface = ygot.String(ifName) - iFace.GetOrCreateInterfaceRef().Subinterface = ygot.Uint32(0) - } else { - iFace.GetOrCreateIngressAclSet(aclName, oc.Acl_ACL_TYPE_ACL_IPV4) - iFace.DeleteIngressAclSet(aclName, oc.Acl_ACL_TYPE_ACL_IPV4) - } - return aclConf -} - -// configureNetworkInstance Configure default network instance -func configureNetworkInstance(t *testing.T) { - dut := ondatra.DUT(t, "dut") - dutConfPath := gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut)) - gnmi.Replace(t, dut, dutConfPath.Type().Config(), oc.NetworkInstanceTypes_NETWORK_INSTANCE_TYPE_DEFAULT_INSTANCE) -} - -// configStaticRoute configures a static route. -func configStaticRoute(t *testing.T, dut *ondatra.DUTDevice, prefix string, nexthop string) { - ni := oc.NetworkInstance{Name: ygot.String(deviations.DefaultNetworkInstance(dut))} - static := ni.GetOrCreateProtocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_STATIC, deviations.StaticProtocolName(dut)) - sr := static.GetOrCreateStatic(prefix) - nh := sr.GetOrCreateNextHop("0") - nh.NextHop = oc.UnionString(nexthop) - gnmi.Update(t, dut, gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut)).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_STATIC, deviations.StaticProtocolName(dut)).Config(), static) -} - -// configureOTG configures the traffic interfaces -func configureOTG(t *testing.T, ate *ondatra.ATEDevice) gosnappi.Config { - otg := ate.OTG() - topo := otg.NewConfig(t) - t.Logf("Configuring OTG port1") - srcPort := topo.Ports().Add().SetName("port1") - srcDev := topo.Devices().Add().SetName(ateSrc.Name) - srcEth := srcDev.Ethernets().Add().SetName(ateSrc.Name + ".Eth").SetMac(ateSrc.MAC) - srcEth.Connection().SetChoice(gosnappi.EthernetConnectionChoice.PORT_NAME).SetPortName(srcPort.Name()) - srcIpv4 := srcEth.Ipv4Addresses().Add().SetName(ateSrc.Name + ".IPv4") - srcIpv4.SetAddress(ateSrc.IPv4).SetGateway(dutSrc.IPv4).SetPrefix(int32(ateSrc.IPv4Len)) - t.Logf("Configuring OTG port2") - dstPort := topo.Ports().Add().SetName("port2") - dstDev := topo.Devices().Add().SetName(ateDst.Name) - dstEth := dstDev.Ethernets().Add().SetName(ateDst.Name + ".Eth").SetMac(ateDst.MAC) - dstEth.Connection().SetChoice(gosnappi.EthernetConnectionChoice.PORT_NAME).SetPortName(dstPort.Name()) - dstIpv4 := dstEth.Ipv4Addresses().Add().SetName(ateDst.Name + ".IPv4") - dstIpv4.SetAddress(ateDst.IPv4).SetGateway(dutDst.IPv4).SetPrefix(int32(ateDst.IPv4Len)) - topo.Captures().Add().SetName("grecapture").SetPortNames([]string{dstPort.Name()}).SetFormat(gosnappi.CaptureFormat.PCAP) - t.Logf("Testtraffic:start ate Traffic config") - flowipv4 := topo.Flows().Add().SetName("IPv4") - flowipv4.Metrics().SetEnable(true) - flowipv4.TxRx().Device(). - SetTxNames([]string{srcIpv4.Name()}). - SetRxNames([]string{dstIpv4.Name()}) - flowipv4.Size().SetFixed(FrameSize) - flowipv4.Rate().SetPps(pps) - flowipv4.Duration().SetChoice("continuous") - e1 := flowipv4.Packet().Add().Ethernet() - e1.Src().SetValue(srcEth.Mac()) - v4 := flowipv4.Packet().Add().Ipv4() - v4.Src().SetValue(srcIpv4.Address()) - v4.Dst().SetValue(dstIpv4.Address()) - v4.Priority().Dscp().Phb().SetValue(int32(dscp)) - t.Logf("Pushing config to ATE and starting protocols...") - otg.PushConfig(t, topo) - otg.StartProtocols(t) - time.Sleep(30 * time.Second) - // otgutils.WaitForARP(t, otg, topo, "IPv4") - t.Log(topo.Msg().GetCaptures()) - return topo -} - -// sendTraffic will send the traffic for a fixed duration -func sendTraffic(t *testing.T, ate *ondatra.ATEDevice) { - otg := ate.OTG() - cs := gosnappi.NewControlState() - cs.Port().Capture().SetState(gosnappi.StatePortCaptureState.START) - otg.SetControlState(t, cs) - t.Log("Starting traffic") - otg.StartTraffic(t) - time.Sleep(15 * time.Second) - otg.StopTraffic(t) - t.Log("Traffic stopped") -} - -// captureTrafficStats Captures traffic statistics and verifies for the loss -func captureTrafficStats(t *testing.T, ate *ondatra.ATEDevice, config gosnappi.Config) { - otg := ate.OTG() - ap := ate.Port(t, "port1") - t.Log("get sent packets from port1 Traffic statistics") - aic1 := gnmi.OTG().Port(ap.ID()).Counters() - sentPkts := gnmi.Get(t, otg, aic1.OutFrames().State()) - fptest.LogQuery(t, "ate:port1 counters", aic1.State(), gnmi.Get(t, otg, aic1.State())) - op := ate.Port(t, "port2") - aic2 := gnmi.OTG().Port(op.ID()).Counters() - t.Log("get recieved packets from port2 Traffic statistics") - rxPkts := gnmi.Get(t, otg, aic2.InFrames().State()) - fptest.LogQuery(t, "ate:port2 counters", aic2.State(), gnmi.Get(t, otg, aic2.State())) - var lostPkts uint64 - t.Log("Verify Traffic statistics") - if rxPkts > sentPkts { - lostPkts = rxPkts - sentPkts - } else { - lostPkts = sentPkts - rxPkts - } - t.Logf("Packets: %d sent, %d received, %d lost", sentPkts, rxPkts, lostPkts) - if lostPkts > tolerance { - t.Errorf("Lost Packets are more than tolerance: %d", lostPkts) - } else { - t.Log("Traffic Test Passed!") - } - bytes := otg.GetCapture(t, gosnappi.NewCaptureRequest().SetPortName(config.Ports().Items()[1].Name())) - f, err := os.CreateTemp("", "pcap") - if err != nil { - t.Fatalf("ERROR: Could not create temporary pcap file: %v\n", err) - } - if _, err := f.Write(bytes); err != nil { - t.Fatalf("ERROR: Could not write bytes to pcap file: %v\n", err) - } - f.Close() - ValidatePackets(t, f.Name()) -} -func ValidatePackets(t *testing.T, filename string) { - handle, err := pcap.OpenOffline(filename) - if err != nil { - log.Fatal(err) - } - defer handle.Close() - packetSource := gopacket.NewPacketSource(handle, handle.LinkType()) - for packet := range packetSource.Packets() { - ipLayer := packet.Layer(layers.LayerTypeIPv4) - gre := packet.Layer(layers.LayerTypeGRE).(*layers.GRE) - if ipLayer == nil { - t.Errorf("IpLayer is null: %d", ipLayer) - } - ipPacket, _ := ipLayer.(*layers.IPv4) - if ipPacket.Protocol != GreProtocol { - t.Errorf("Packet is not encapslated properly. Encapsulated protocol is: %d", ipPacket.Protocol) - } - InnerPacket := gopacket.NewPacket(gre.Payload, gre.NextLayerType(), gopacket.Default) - IpInnerLayer := InnerPacket.Layer(layers.LayerTypeIPv4) - if IpInnerLayer != nil { - IpInnerPacket, _ := IpInnerLayer.(*layers.IPv4) - if IpInnerPacket.TOS != CorrespondingTOS { - t.Logf("IP TOS bit: %d", IpInnerPacket.TOS) - t.Errorf("DSCP(TOS) value is altered to: %d", IpInnerPacket.TOS) - } - } - } - t.Log("get dscp of inner header and verify whether orginal value is retained.") -} - -func juniperEncapCLI(aclName string, EncapSrcMatch string, EncapDstMatch string, count string, greSrcAddr string, greDstAddr string) string { - return fmt.Sprintf(` - firewall { - family inet { - filter %s { - term t1 { - from { - source-address { - %s; - } - destination-address { - %s; - } - } - then count %s; - then encapsulate greTunnelEndpoint - } - } - } - tunnel-end-point greTunnelEndpoint { - ipv4 { - source-address %s; - destination-address %s; - } - gre; - } - } - `, aclName, EncapSrcMatch, EncapDstMatch, count, greSrcAddr, greDstAddr) -} - -func buildCliConfigRequest(config string) *gpb.SetRequest { - gpbSetRequest := &gpb.SetRequest{ - Update: []*gpb.Update{{ - Path: &gpb.Path{ - Origin: "cli", - }, - Val: &gpb.TypedValue{ - Value: &gpb.TypedValue_AsciiVal{ - AsciiVal: config, - }, - }, - }}, - } - return gpbSetRequest -} - -func TestDscpInGreEncapPacket(t *testing.T) { - start := time.Now() - dut := ondatra.DUT(t, "dut") - t.Logf("Configure DUT") - configureDUT(t, dut) - t.Logf("Configure OTG") - otg := ondatra.ATE(t, "ate") - config := configureOTG(t, otg) - t.Log("send Traffic statistics") - sendTraffic(t, otg) - captureTrafficStats(t, otg, config) - t.Logf("Time check: %s", time.Since(start)) - t.Logf("Test run time: %s", time.Since(start)) -} From c0646b183bbf0a741c333d2d1e381ae9fd8b3d49 Mon Sep 17 00:00:00 2001 From: cprabha Date: Fri, 11 Aug 2023 15:12:29 -0700 Subject: [PATCH 10/25] added back files --- .../otg_tests/tunnel_acl_based_test/README.md | 26 ++ .../tunnel_acl_based_test/metadata.textproto | 7 + .../tun_acl_dscp_test.go | 378 ++++++++++++++++++ 3 files changed, 411 insertions(+) create mode 100644 feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/README.md create mode 100644 feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/metadata.textproto create mode 100644 feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/tun_acl_dscp_test.go diff --git a/feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/README.md b/feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/README.md new file mode 100644 index 00000000000..69693ae5b97 --- /dev/null +++ b/feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/README.md @@ -0,0 +1,26 @@ + TUN-1.9: GRE inner packet DSCP + +## Summary + +Verify the DSCP value of original packet header after GRE acl based tunnel encapsulation. + +## Procedure + +* Configure DUT with ingress and egress routed interfaces. +* Configure acl based tunnel configuration with action as encapsulation. +* Attach the filter on ingress interface. +* Configure the static route for the tunnel end point destination. +* Capture packet on ATE on the recieving end(port-2). +* verify dscp value of original packet after encapsulation. +* verify that no traffic drops in all flows. + +## Config Parameter coverage + +* /acl/interfaces/interface/ingress-acl-sets/ingress-acl-set/config/set-name +* /acl/interfaces/interface/ingress-acl-sets/ingress-acl-set/config/set-type + +## Validation coverage + +* No packet drop should be oberserved. +* Capture the packet on recieving end and verify the orginal DSCP value. Orginal value should not be altered. + diff --git a/feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/metadata.textproto b/feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/metadata.textproto new file mode 100644 index 00000000000..0ba6b64b8c8 --- /dev/null +++ b/feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/metadata.textproto @@ -0,0 +1,7 @@ +# proto-file: github.com/openconfig/featureprofiles/proto/metadata.proto +# proto-message: Metadata + +uuid: "5e46a336-0e6c-4b65-ac49-8b925aacb46c" +plan_id: "TUN-1.9" +description: "GRE inner packet DSCP" +testbed: TESTBED_DUT_ATE_2LINKS diff --git a/feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/tun_acl_dscp_test.go b/feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/tun_acl_dscp_test.go new file mode 100644 index 00000000000..6932c5135fc --- /dev/null +++ b/feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/tun_acl_dscp_test.go @@ -0,0 +1,378 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package tun_acl_dscp_test + +import ( + "context" + "fmt" + "log" + "os" + "testing" + "time" + + "github.com/google/gopacket" + "github.com/google/gopacket/layers" + "github.com/google/gopacket/pcap" + "github.com/open-traffic-generator/snappi/gosnappi" + "github.com/openconfig/featureprofiles/internal/attrs" + "github.com/openconfig/featureprofiles/internal/deviations" + "github.com/openconfig/featureprofiles/internal/fptest" + gpb "github.com/openconfig/gnmi/proto/gnmi" + "github.com/openconfig/ondatra" + "github.com/openconfig/ondatra/gnmi" + "github.com/openconfig/ondatra/gnmi/oc" + "github.com/openconfig/ondatra/gnmi/oc/acl" + "github.com/openconfig/ygot/ygot" +) + +func TestMain(m *testing.M) { + fptest.RunTests(m) +} + +// Settings for configuring the baseline testbed with the test topology. +// +// The testbed consists of: +// +// ate:port1 -> dut:port1 and +// dut:port2 -> ate:port2 +// +// * ate:port1 -> dut:port1 subnet 192.0.1.2/30 +// * ate:port2 -> dut:port2 subnet 192.0.2.6/30 +// +// * Traffic is sent from 192.0.2.2(ate:port1) to 192.0.2.6(ate:port2). +// Dut Interfaces are configured as mentioned below: +// dut:port1 -> 192.0.1.1 +// dut:port2 -> 192.0.2.5 +// Verify the DSCP value in the packet capture. +// TOS Caluculation: +// For example, DSCP Value configured with 8 (001000). +// In the Capture as the TOS value will have 8 bits(2 appended at LSB) corresponding binary will be 001000 00(dscp + 00) +// which is equivalet to 32 in decimal. + +const ( + ipv4PrefixLen = 24 + pps = 100 + FrameSize = 512 + aclName = "f1" + termName = "t1" + EncapSrcMatch = "192.0.1.2" + EncapDstMatch = "192.0.2.6" + count = "GreFilterCount" + greTunnelEndpoint = "TunnelEncapIpv4" + greSrcAddr = "50.0.0.1" + greDstAddr = "60.0.0.0/32" + dscp = 8 + CorrespondingTOS = 32 + GreProtocol = 47 + Tunnelaction = "TunnelEncapIpv4" + plenIPv4 = 24 + tolerance = 50 + lossTolerance = 2 + prefix = "0.0.0.0/0" + nexthop = "192.0.2.6" +) + +var ( + dutSrc = attrs.Attributes{ + Desc: "DUT to ATE source", + IPv4: "192.0.1.1", + IPv4Len: plenIPv4, + } + ateSrc = attrs.Attributes{ + Name: "ateSrc", + MAC: "02:00:01:01:01:01", + IPv4: "192.0.1.2", + IPv4Len: plenIPv4, + } + dutDst = attrs.Attributes{ + Desc: "DUT to ATE destination", + IPv4: "192.0.2.5", + IPv4Len: plenIPv4, + } + ateDst = attrs.Attributes{ + Name: "atedst", + MAC: "02:00:02:01:01:01", + IPv4: "192.0.2.6", + IPv4Len: plenIPv4, + } +) + +// configInterfaceDUT configures the DUT interfaces. +func configInterfaceDUT(i *oc.Interface, a *attrs.Attributes, dut *ondatra.DUTDevice) *oc.Interface { + i.Description = ygot.String(a.Desc) + i.Type = oc.IETFInterfaces_InterfaceType_ethernetCsmacd + if deviations.InterfaceEnabled(dut) { + i.Enabled = ygot.Bool(true) + } + s := i.GetOrCreateSubinterface(0) + s4 := s.GetOrCreateIpv4() + if deviations.InterfaceEnabled(dut) && !deviations.IPv4MissingEnabled(dut) { + s4.Enabled = ygot.Bool(true) + } + s4a := s4.GetOrCreateAddress(a.IPv4) + s4a.PrefixLength = ygot.Uint8(ipv4PrefixLen) + return i +} + +// configureDUT configures port1 and port2 on the DUT. +func configureDUT(t *testing.T, dut *ondatra.DUTDevice) { + d := gnmi.OC() + p1 := dut.Port(t, "port1") + i1 := &oc.Interface{Name: ygot.String(p1.Name())} + gnmi.Replace(t, dut, d.Interface(p1.Name()).Config(), configInterfaceDUT(i1, &dutSrc, dut)) + p2 := dut.Port(t, "port2") + i2 := &oc.Interface{Name: ygot.String(p2.Name())} + gnmi.Replace(t, dut, d.Interface(p2.Name()).Config(), configInterfaceDUT(i2, &dutDst, dut)) + configureNetworkInstance(t) + t.Logf("Configure the DUT with static route ...") + configStaticRoute(t, dut, prefix, nexthop) + gnmiClient := dut.RawAPIs().GNMI().Default(t) + var config string + t.Logf("Push the CLI config:\n%s", dut.Vendor()) + switch dut.Vendor() { + case ondatra.JUNIPER: + config = juniperEncapCLI(aclName, EncapSrcMatch, EncapDstMatch, count, greSrcAddr, greDstAddr) + t.Logf(" Push CLI config of:\n%s", dut.Vendor()) + default: + t.Errorf("Invalid Filter configuration") + } + gpbSetRequest := buildCliConfigRequest(config) + t.Log("gnmiClient Set CLI config") + if _, err := gnmiClient.Set(context.Background(), gpbSetRequest); err != nil { + t.Fatalf("gnmiClient.Set() with unexpected error: %v", err) + } + d1 := &oc.Root{} + ifName := dut.Port(t, "port1").Name() + t.Log("Attach the filter to the ingress interface") + iFace := d1.GetOrCreateAcl().GetOrCreateInterface(ifName) + aclConf := configACLInterface(t, iFace, ifName) + gnmi.Replace(t, dut, aclConf.Config(), iFace) + fptest.LogQuery(t, "ACL config:\n", aclConf.Config(), gnmi.GetConfig(t, dut, aclConf.Config())) +} + +// configACLInterface configures the ACL attachment on interface +func configACLInterface(t *testing.T, iFace *oc.Acl_Interface, ifName string) *acl.Acl_InterfacePath { + aclConf := gnmi.OC().Acl().Interface(ifName) + if ifName != "" { + iFace.GetOrCreateIngressAclSet(aclName, oc.Acl_ACL_TYPE_ACL_IPV4) + iFace.GetOrCreateInterfaceRef().Interface = ygot.String(ifName) + iFace.GetOrCreateInterfaceRef().Subinterface = ygot.Uint32(0) + } else { + iFace.GetOrCreateIngressAclSet(aclName, oc.Acl_ACL_TYPE_ACL_IPV4) + iFace.DeleteIngressAclSet(aclName, oc.Acl_ACL_TYPE_ACL_IPV4) + } + return aclConf +} + +// configureNetworkInstance Configure default network instance +func configureNetworkInstance(t *testing.T) { + dut := ondatra.DUT(t, "dut") + dutConfPath := gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut)) + gnmi.Replace(t, dut, dutConfPath.Type().Config(), oc.NetworkInstanceTypes_NETWORK_INSTANCE_TYPE_DEFAULT_INSTANCE) +} + +// configStaticRoute configures a static route. +func configStaticRoute(t *testing.T, dut *ondatra.DUTDevice, prefix string, nexthop string) { + ni := oc.NetworkInstance{Name: ygot.String(deviations.DefaultNetworkInstance(dut))} + static := ni.GetOrCreateProtocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_STATIC, deviations.StaticProtocolName(dut)) + sr := static.GetOrCreateStatic(prefix) + nh := sr.GetOrCreateNextHop("0") + nh.NextHop = oc.UnionString(nexthop) + gnmi.Update(t, dut, gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut)).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_STATIC, deviations.StaticProtocolName(dut)).Config(), static) +} + +// configureOTG configures the traffic interfaces +func configureOTG(t *testing.T, ate *ondatra.ATEDevice) gosnappi.Config { + otg := ate.OTG() + topo := otg.NewConfig(t) + t.Logf("Configuring OTG port1") + srcPort := topo.Ports().Add().SetName("port1") + srcDev := topo.Devices().Add().SetName(ateSrc.Name) + srcEth := srcDev.Ethernets().Add().SetName(ateSrc.Name + ".Eth").SetMac(ateSrc.MAC) + srcEth.Connection().SetChoice(gosnappi.EthernetConnectionChoice.PORT_NAME).SetPortName(srcPort.Name()) + srcIpv4 := srcEth.Ipv4Addresses().Add().SetName(ateSrc.Name + ".IPv4") + srcIpv4.SetAddress(ateSrc.IPv4).SetGateway(dutSrc.IPv4).SetPrefix(int32(ateSrc.IPv4Len)) + t.Logf("Configuring OTG port2") + dstPort := topo.Ports().Add().SetName("port2") + dstDev := topo.Devices().Add().SetName(ateDst.Name) + dstEth := dstDev.Ethernets().Add().SetName(ateDst.Name + ".Eth").SetMac(ateDst.MAC) + dstEth.Connection().SetChoice(gosnappi.EthernetConnectionChoice.PORT_NAME).SetPortName(dstPort.Name()) + dstIpv4 := dstEth.Ipv4Addresses().Add().SetName(ateDst.Name + ".IPv4") + dstIpv4.SetAddress(ateDst.IPv4).SetGateway(dutDst.IPv4).SetPrefix(int32(ateDst.IPv4Len)) + topo.Captures().Add().SetName("grecapture").SetPortNames([]string{dstPort.Name()}).SetFormat(gosnappi.CaptureFormat.PCAP) + t.Logf("Testtraffic:start ate Traffic config") + flowipv4 := topo.Flows().Add().SetName("IPv4") + flowipv4.Metrics().SetEnable(true) + flowipv4.TxRx().Device(). + SetTxNames([]string{srcIpv4.Name()}). + SetRxNames([]string{dstIpv4.Name()}) + flowipv4.Size().SetFixed(FrameSize) + flowipv4.Rate().SetPps(pps) + flowipv4.Duration().SetChoice("continuous") + e1 := flowipv4.Packet().Add().Ethernet() + e1.Src().SetValue(srcEth.Mac()) + v4 := flowipv4.Packet().Add().Ipv4() + v4.Src().SetValue(srcIpv4.Address()) + v4.Dst().SetValue(dstIpv4.Address()) + v4.Priority().Dscp().Phb().SetValue(int32(dscp)) + t.Logf("Pushing config to ATE and starting protocols...") + otg.PushConfig(t, topo) + otg.StartProtocols(t) + time.Sleep(30 * time.Second) + // otgutils.WaitForARP(t, otg, topo, "IPv4") + t.Log(topo.Msg().GetCaptures()) + return topo +} + +// sendTraffic will send the traffic for a fixed duration +func sendTraffic(t *testing.T, ate *ondatra.ATEDevice) { + otg := ate.OTG() + cs := gosnappi.NewControlState() + cs.Port().Capture().SetState(gosnappi.StatePortCaptureState.START) + otg.SetControlState(t, cs) + t.Log("Starting traffic") + otg.StartTraffic(t) + time.Sleep(15 * time.Second) + otg.StopTraffic(t) + t.Log("Traffic stopped") +} + +// captureTrafficStats Captures traffic statistics and verifies for the loss +func captureTrafficStats(t *testing.T, ate *ondatra.ATEDevice, config gosnappi.Config) { + otg := ate.OTG() + ap := ate.Port(t, "port1") + t.Log("get sent packets from port1 Traffic statistics") + aic1 := gnmi.OTG().Port(ap.ID()).Counters() + sentPkts := gnmi.Get(t, otg, aic1.OutFrames().State()) + fptest.LogQuery(t, "ate:port1 counters", aic1.State(), gnmi.Get(t, otg, aic1.State())) + op := ate.Port(t, "port2") + aic2 := gnmi.OTG().Port(op.ID()).Counters() + t.Log("get recieved packets from port2 Traffic statistics") + rxPkts := gnmi.Get(t, otg, aic2.InFrames().State()) + fptest.LogQuery(t, "ate:port2 counters", aic2.State(), gnmi.Get(t, otg, aic2.State())) + var lostPkts uint64 + t.Log("Verify Traffic statistics") + if rxPkts > sentPkts { + lostPkts = rxPkts - sentPkts + } else { + lostPkts = sentPkts - rxPkts + } + t.Logf("Packets: %d sent, %d received, %d lost", sentPkts, rxPkts, lostPkts) + if lostPkts > tolerance { + t.Errorf("Lost Packets are more than tolerance: %d", lostPkts) + } else { + t.Log("Traffic Test Passed!") + } + bytes := otg.GetCapture(t, gosnappi.NewCaptureRequest().SetPortName(config.Ports().Items()[1].Name())) + f, err := os.CreateTemp("", "pcap") + if err != nil { + t.Fatalf("ERROR: Could not create temporary pcap file: %v\n", err) + } + if _, err := f.Write(bytes); err != nil { + t.Fatalf("ERROR: Could not write bytes to pcap file: %v\n", err) + } + f.Close() + ValidatePackets(t, f.Name()) +} +func ValidatePackets(t *testing.T, filename string) { + handle, err := pcap.OpenOffline(filename) + if err != nil { + log.Fatal(err) + } + defer handle.Close() + packetSource := gopacket.NewPacketSource(handle, handle.LinkType()) + for packet := range packetSource.Packets() { + ipLayer := packet.Layer(layers.LayerTypeIPv4) + gre := packet.Layer(layers.LayerTypeGRE).(*layers.GRE) + if ipLayer == nil { + t.Errorf("IpLayer is null: %d", ipLayer) + } + ipPacket, _ := ipLayer.(*layers.IPv4) + if ipPacket.Protocol != GreProtocol { + t.Errorf("Packet is not encapslated properly. Encapsulated protocol is: %d", ipPacket.Protocol) + } + InnerPacket := gopacket.NewPacket(gre.Payload, gre.NextLayerType(), gopacket.Default) + IpInnerLayer := InnerPacket.Layer(layers.LayerTypeIPv4) + if IpInnerLayer != nil { + IpInnerPacket, _ := IpInnerLayer.(*layers.IPv4) + if IpInnerPacket.TOS != CorrespondingTOS { + t.Logf("IP TOS bit: %d", IpInnerPacket.TOS) + t.Errorf("DSCP(TOS) value is altered to: %d", IpInnerPacket.TOS) + } + } + } + t.Log("get dscp of inner header and verify whether orginal value is retained.") +} + +func juniperEncapCLI(aclName string, EncapSrcMatch string, EncapDstMatch string, count string, greSrcAddr string, greDstAddr string) string { + return fmt.Sprintf(` + firewall { + family inet { + filter %s { + term t1 { + from { + source-address { + %s; + } + destination-address { + %s; + } + } + then count %s; + then encapsulate greTunnelEndpoint + } + } + } + tunnel-end-point greTunnelEndpoint { + ipv4 { + source-address %s; + destination-address %s; + } + gre; + } + } + `, aclName, EncapSrcMatch, EncapDstMatch, count, greSrcAddr, greDstAddr) +} + +func buildCliConfigRequest(config string) *gpb.SetRequest { + gpbSetRequest := &gpb.SetRequest{ + Update: []*gpb.Update{{ + Path: &gpb.Path{ + Origin: "cli", + }, + Val: &gpb.TypedValue{ + Value: &gpb.TypedValue_AsciiVal{ + AsciiVal: config, + }, + }, + }}, + } + return gpbSetRequest +} + +func TestDscpInGreEncapPacket(t *testing.T) { + start := time.Now() + dut := ondatra.DUT(t, "dut") + t.Logf("Configure DUT") + configureDUT(t, dut) + t.Logf("Configure OTG") + otg := ondatra.ATE(t, "ate") + config := configureOTG(t, otg) + t.Log("send Traffic statistics") + sendTraffic(t, otg) + captureTrafficStats(t, otg, config) + t.Logf("Time check: %s", time.Since(start)) + t.Logf("Test run time: %s", time.Since(start)) +} From 1a8bea8c750725e9042db98ab359697077ecb7b2 Mon Sep 17 00:00:00 2001 From: cprabha Date: Mon, 14 Aug 2023 16:10:51 -0700 Subject: [PATCH 11/25] Removed ate files --- .../ate_tests/bgp_tcp_mss_path_mtu/README.md | 42 -- .../bgp_tcp_mss_path_mtu_test.go | 397 ------------------ .../bgp_tcp_mss_path_mtu/metadata.textproto | 46 -- 3 files changed, 485 deletions(-) delete mode 100644 feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/README.md delete mode 100644 feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go delete mode 100644 feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/metadata.textproto diff --git a/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/README.md b/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/README.md deleted file mode 100644 index 165824eb224..00000000000 --- a/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# RT-1.21: BGP TCP MSS and PMTUD - -## Summary - -BGP TCP MSS and PMTUD - -## Topology - -"Virtual host on ATE" <--> ATE (port1) <--> DUT - -## Procedure - -* Establish BGP sessions between: - * ATE (port-1) --- eBGP-IPv4/IPv6 ---- DUT - * Virtual host on ATE ---- iBGP IPv4 ---- DUT. -* TODO : Verify that the default TCP MSS value is set below interface MTU value. -* Change the Interface MTU on the DUT port as well as ATE(port1) to 5040B -* Configure IP TCP MSS value of 4096 bytes on the DUT interface to the ATE port1. -* Re-establish the BGP sessions by tcp reset. -* Verify that the TCP MSS value is set to 4096 bytes for IPv4 and IPv6. -* Establish iBGP session with MD5 enabled between the "virtual host on ATE" and the DUT. -* Ensure that the MTU on the ATE port towards the virtual host is set at defualt while the virtual-host interface towards ATE is set at 5040B. -* Enable PMTUD on the DUT. -* TODO : Validate that the min MSS value has been adjusted to be below 1500 bytes on the tcp session. - -## Config Parameter coverage - -* /neighbors/neighbor/transport/config/tcp-mss -* /neighbors/neighbor/transport/config/mtu-discovery - -## Telemetry Parameter coverage - -* /neighbors/neighbor/transport/state/tcp-mss -* /neighbors/neighbor/transport/state/mtu-discovery - -## Protocol/RPC Parameter coverage - -N/A - -## Minimum DUT platform requirement - -N/A diff --git a/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go b/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go deleted file mode 100644 index 86ff180e78b..00000000000 --- a/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go +++ /dev/null @@ -1,397 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package bgp_tcp_mss_path_mtu_test - -import ( - "fmt" - "testing" - "time" - - "github.com/openconfig/featureprofiles/internal/attrs" - "github.com/openconfig/featureprofiles/internal/deviations" - "github.com/openconfig/featureprofiles/internal/fptest" - "github.com/openconfig/ondatra" - "github.com/openconfig/ondatra/gnmi" - "github.com/openconfig/ondatra/gnmi/oc" - "github.com/openconfig/ygnmi/ygnmi" - "github.com/openconfig/ygot/ygot" -) - -func TestMain(m *testing.M) { - fptest.RunTests(m) -} - -// The testbed consists of ate:port1 -> dut:port1 and -// dut:port2 -> ate:port2. The first pair is called the "source" -// pair, and the second the "destination" pair. -// -// ATE Port-1 192.0.2.2 -------- DUT-1 Port-1 192.0.2.1 -// DUT-1 Port-2 192.0.2.5 -------- DUT-2 Port-1 192.0.2.6 - -const ( - peerGrpName1 = "BGP-PEER-GROUP1" - dut1AS = 65501 - ateAS1 = 65502 - dut2AS = 65502 - plenIPv4 = 30 - plenIPv6 = 126 - dut1TcpMssDefault = uint16(536) - dut1Tcp6MssDefault = uint16(1240) - dut1IntfMtu = uint16(5040) - dut1TcpMss = uint16(4096) - mtu512 = uint16(512) - vlan10 = 10 - vlan20 = 20 - isisInstance = "DEFAULT" - authPWd = "BGPTCPMSS" - dut1AreaAddress = "49.0001" - dut1SysID = "1920.0000.2001" - dut2AreaAddress = "49.0001" - dut2SysID = "1920.0000.3001" -) - -var ( - dut1Port1 = attrs.Attributes{ - Desc: "DUT to ATE source", - IPv4: "192.0.2.1", - IPv6: "2001:db8::192:0:2:1", - IPv4Len: plenIPv4, - IPv6Len: plenIPv6, - } - atePort1 = attrs.Attributes{ - Name: "ateSrc", - IPv4: "192.0.2.2", - IPv6: "2001:db8::192:0:2:2", - IPv4Len: plenIPv4, - IPv6Len: plenIPv6, - } - dut1Port2 = attrs.Attributes{ - Desc: "DUT1 to DUT2", - IPv4: "192.0.2.5", - IPv4Len: plenIPv4, - } - dut2Port1 = attrs.Attributes{ - Name: "DUT2 to DUT1", - IPv4: "192.0.2.6", - IPv4Len: plenIPv4, - } -) - -// configureDUT configures all the interfaces on the DUT. -func configureDUT(t *testing.T) { - dc := gnmi.OC() - dut1 := ondatra.DUT(t, "dut1") - dut2 := ondatra.DUT(t, "dut2") - - t.Log("Configure interfaces on dut1.") - i1 := dut1Port1.NewOCInterface(dut1.Port(t, "port1").Name(), dut1) - gnmi.Replace(t, dut1, dc.Interface(i1.GetName()).Config(), i1) - i2 := dut1Port2.NewOCInterface(dut1.Port(t, "port2").Name(), dut1) - gnmi.Replace(t, dut1, dc.Interface(i2.GetName()).Config(), i2) - - t.Log("Configure interfaces on dut2.") - i3 := dut2Port1.NewOCInterface(dut2.Port(t, "port1").Name(), dut2) - gnmi.Replace(t, dut2, dc.Interface(i3.GetName()).Config(), i3) -} - -// bgpCreateNbr creates bgp configuration on dut device. -func bgpCreateNbr(t *testing.T, dut *ondatra.DUTDevice, authPwd, routerId string, localAs uint32, nbrs []*bgpNeighbor) *oc.NetworkInstance_Protocol { - - d := &oc.Root{} - ni1 := d.GetOrCreateNetworkInstance(deviations.DefaultNetworkInstance(dut)) - ni_proto := ni1.GetOrCreateProtocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, "BGP") - bgp := ni_proto.GetOrCreateBgp() - global := bgp.GetOrCreateGlobal() - global.RouterId = ygot.String(routerId) - global.As = ygot.Uint32(localAs) - - pg1 := bgp.GetOrCreatePeerGroup(peerGrpName1) - pg1.PeerAs = ygot.Uint32(ateAS1) - pg1.PeerGroupName = ygot.String(peerGrpName1) - - // Note: we have to define the peer group even if we aren't setting any policy because it's - // invalid OC for the neighbor to be part of a peer group that doesn't exist. - for _, nbr := range nbrs { - nv := bgp.GetOrCreateNeighbor(nbr.neighborip) - nv.PeerGroup = ygot.String(nbr.peerGrp) - nv.PeerAs = ygot.Uint32(nbr.as) - nv.Enabled = ygot.Bool(true) - if nbr.isV4 { - if authPwd != "" { - nv.AuthPassword = ygot.String(authPWd) - } - af4 := nv.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST) - af4.Enabled = ygot.Bool(true) - af6 := nv.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV6_UNICAST) - af6.Enabled = ygot.Bool(false) - } else { - af6 := nv.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV6_UNICAST) - af6.Enabled = ygot.Bool(true) - af4 := nv.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST) - af4.Enabled = ygot.Bool(false) - } - } - return ni_proto -} - -// verifyBGPTelemetry checks that the dut has an established BGP session with reasonable settings. -func verifyBGPTelemetry(t *testing.T, dut *ondatra.DUTDevice, nbrIP []string) { - statePath := gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut)).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, "BGP").Bgp() - for _, nbr := range nbrIP { - nbrPath := statePath.Neighbor(nbr) - t.Logf("Waiting for BGP neighbor to establish...") - status, ok := gnmi.Watch(t, dut, nbrPath.SessionState().State(), time.Minute, func(val *ygnmi.Value[oc.E_Bgp_Neighbor_SessionState]) bool { - state, ok := val.Val() - return ok && state == oc.Bgp_Neighbor_SessionState_ESTABLISHED - }).Await(t) - if !ok { - fptest.LogQuery(t, "BGP reported state", nbrPath.State(), gnmi.Get(t, dut, nbrPath.State())) - t.Fatal("No BGP neighbor formed") - } - state, _ := status.Val() - if want := oc.Bgp_Neighbor_SessionState_ESTABLISHED; state != want { - t.Errorf("BGP peer %s status got %d, want %d", nbr, state, want) - } - t.Logf("BGP adjacency for %s: %s", nbr, state) - } -} - -func configureISIS(t *testing.T, dut *ondatra.DUTDevice, intfName []string, dutAreaAddress, dutSysID string) { - d := &oc.Root{} - dutConfIsisPath := gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut)).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_ISIS, isisInstance) - netInstance := d.GetOrCreateNetworkInstance(deviations.DefaultNetworkInstance(dut)) - prot := netInstance.GetOrCreateProtocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_ISIS, isisInstance) - prot.Enabled = ygot.Bool(true) - isis := prot.GetOrCreateIsis() - globalISIS := isis.GetOrCreateGlobal() - globalISIS.LevelCapability = oc.Isis_LevelType_LEVEL_2 - globalISIS.Net = []string{fmt.Sprintf("%v.%v.00", dutAreaAddress, dutSysID)} - globalISIS.GetOrCreateAf(oc.IsisTypes_AFI_TYPE_IPV4, oc.IsisTypes_SAFI_TYPE_UNICAST).Enabled = ygot.Bool(true) - isisLevel2 := isis.GetOrCreateLevel(2) - isisLevel2.MetricStyle = oc.Isis_MetricStyle_WIDE_METRIC - - for _, intf := range intfName { - isisIntf := isis.GetOrCreateInterface(intf) - isisIntf.Enabled = ygot.Bool(true) - isisIntf.CircuitType = oc.Isis_CircuitType_POINT_TO_POINT - isisIntfLevel := isisIntf.GetOrCreateLevel(2) - isisIntfLevel.Enabled = ygot.Bool(true) - isisIntfLevelAfi := isisIntfLevel.GetOrCreateAf(oc.IsisTypes_AFI_TYPE_IPV4, oc.IsisTypes_SAFI_TYPE_UNICAST) - isisIntfLevelAfi.Metric = ygot.Uint32(200) - isisIntfLevelAfi.Enabled = ygot.Bool(true) - } - gnmi.Replace(t, dut, dutConfIsisPath.Config(), prot) -} - -// configureATE configures the interfaces and BGP protocols on an ATE, including -// advertising some(faked) networks over BGP. -func configureATE(t *testing.T, ate *ondatra.ATEDevice) *ondatra.ATETopology { - topo := ate.Topology().New() - - port1 := ate.Port(t, "port1") - iDut1 := topo.AddInterface(atePort1.Name).WithPort(port1) - iDut1.IPv4().WithAddress(atePort1.IPv4CIDR()).WithDefaultGateway(dut1Port1.IPv4) - iDut1.IPv6().WithAddress(atePort1.IPv6CIDR()).WithDefaultGateway(dut1Port1.IPv6) - - isisDut1 := iDut1.ISIS() - isisDut1.WithLevelL2().WithNetworkTypePointToPoint().WithTERouterID(atePort1.IPv4) - - bgpDut1 := iDut1.BGP() - bgpDut1.AddPeer().WithPeerAddress(dut1Port1.IPv4).WithLocalASN(ateAS1). - WithTypeExternal() - bgpDut1.AddPeer().WithPeerAddress(dut1Port1.IPv6).WithLocalASN(ateAS1). - WithTypeExternal() - - t.Logf("Pushing config to ATE and starting protocols...") - - topo.Push(t) - topo.StartProtocols(t) - return topo -} - -func configATE(t *testing.T, ate *ondatra.ATEDevice) *ondatra.ATETopology { - - topo := ate.Topology().New() - - port1 := ate.Port(t, "port1") - iDut1 := topo.AddInterface(atePort1.Name).WithPort(port1) - iDut1.IPv4().WithAddress(atePort1.IPv4CIDR()).WithDefaultGateway(dut1Port1.IPv4) - iDut1.IPv6().WithAddress(atePort1.IPv6CIDR()).WithDefaultGateway(dut1Port1.IPv6) - - isisDut1 := iDut1.ISIS() - isisDut1.WithLevelL2().WithNetworkTypePointToPoint().WithTERouterID(atePort1.IPv4) - - bgpDut1 := iDut1.BGP() - bgpDut1.AddPeer().WithPeerAddress(dut2Port1.IPv4).WithLocalASN(ateAS1). - WithTypeInternal().WithMD5Key(authPWd) - - t.Logf("Pushing config to ATE and starting protocols...") - - topo.Push(t) - topo.StartProtocols(t) - return topo -} - -type bgpNeighbor struct { - as uint32 - neighborip string - isV4 bool - peerGrp string -} - -func configStaticRoute(t *testing.T, dut *ondatra.DUTDevice, prefix string, nexthop string) { - ni := oc.NetworkInstance{Name: ygot.String(deviations.DefaultNetworkInstance(dut))} - static := ni.GetOrCreateProtocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_STATIC, deviations.StaticProtocolName(dut)) - sr := static.GetOrCreateStatic(prefix) - nh := sr.GetOrCreateNextHop("0") - nh.NextHop = oc.UnionString(nexthop) - gnmi.Update(t, dut, gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut)).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_STATIC, deviations.StaticProtocolName(dut)).Config(), static) -} - -// TestTCPMSSPathMTU is to Validate TCP MSS for BGP v4/v6 sessions. -func TestTCPMSSPathMTU(t *testing.T) { - - dut1 := ondatra.DUT(t, "dut1") - dut2 := ondatra.DUT(t, "dut2") - ate := ondatra.ATE(t, "ate") - - dutList := []*ondatra.DUTDevice{dut1, dut2} - - t.Run("Configure DUT1 and DUT2 interfaces", func(t *testing.T) { - configureDUT(t) - }) - - t.Run("Configure DEFAULT network instance on both DUT1 and DUT2", func(t *testing.T) { - for _, dut := range dutList { - dutConfNIPath := gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut)) - gnmi.Replace(t, dut, dutConfNIPath.Type().Config(), oc.NetworkInstanceTypes_NETWORK_INSTANCE_TYPE_DEFAULT_INSTANCE) - } - }) - - dut1ConfPath := gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut1)).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, "BGP") - dut2ConfPath := gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut2)).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, "BGP") - - t.Run("Configure BGP Neighbors DUT1 - ATE", func(t *testing.T) { - t.Logf("Start DUT1 BGP Config.") - gnmi.Delete(t, dut1, dut1ConfPath.Config()) - dut1Nbr1v4 := &bgpNeighbor{as: ateAS1, neighborip: atePort1.IPv4, isV4: true, peerGrp: peerGrpName1} - dut1Nbr1v6 := &bgpNeighbor{as: ateAS1, neighborip: atePort1.IPv6, isV4: false, peerGrp: peerGrpName1} - dut1Nbrs := []*bgpNeighbor{dut1Nbr1v4, dut1Nbr1v6} - dut1Conf := bgpCreateNbr(t, dut1, "", dut1Port2.IPv4, dut1AS, dut1Nbrs) - gnmi.Replace(t, dut1, dut1ConfPath.Config(), dut1Conf) - fptest.LogQuery(t, "DUT1 BGP Config", dut1ConfPath.Config(), gnmi.GetConfig(t, dut1, dut1ConfPath.Config())) - }) - - var topo *ondatra.ATETopology - t.Run("configureATE", func(t *testing.T) { - topo = configureATE(t, ate) - }) - - t.Run("Verify BGP telemetry", func(t *testing.T) { - var dut1NbrIP = []string{atePort1.IPv4, atePort1.IPv6} - verifyBGPTelemetry(t, dut1, dut1NbrIP) - }) - - dut1Port1Path := gnmi.OC().Interface(dut1.Port(t, "port1").Name()) - t.Run("Verify default TCP MSS v4 and v6 session", func(t *testing.T) { - // TODO: - }) - - t.Run("Change the Interface MTU to the ATE port as 5040.", func(t *testing.T) { - t.Logf("Configure DUT1 interface MTU to %v", dut1IntfMtu) - gnmi.Replace(t, dut1, dut1Port1Path.Mtu().Config(), dut1IntfMtu) - t.Logf("Configure DUT1 BGP TCP-MSS value to %v", dut1TcpMss) - gnmi.Replace(t, dut1, dut1ConfPath.Bgp().Neighbor(atePort1.IPv4).Transport().TcpMss().Config(), dut1TcpMss) - gnmi.Replace(t, dut1, dut1ConfPath.Bgp().Neighbor(atePort1.IPv6).Transport().TcpMss().Config(), dut1TcpMss) - }) - - t.Run("Re-establish the BGP sessions by tcp reset.", func(t *testing.T) { - topo.StopProtocols(t) - time.Sleep(1 * time.Minute) - topo.StartProtocols(t) - }) - - t.Run("Verify BGP telemetry after reset.", func(t *testing.T) { - var dut1NbrIP = []string{atePort1.IPv4, atePort1.IPv6} - verifyBGPTelemetry(t, dut1, dut1NbrIP) - }) - - t.Run("Verify BGP TCP MSS value", func(t *testing.T) { - t.Logf("Verify DUT1 BGP TCP-MSS value is to %v for both BGP v4 and v6 sessions.", dut1TcpMss) - if gotTcpMss := gnmi.Get(t, dut1, dut1ConfPath.Bgp().Neighbor(atePort1.IPv4).Transport().TcpMss().State()); gotTcpMss != dut1TcpMss { - t.Errorf("Obtained TCP MSS for BGP v4 on dut1 is not as expected, got is %v, want %v", gotTcpMss, dut1TcpMss) - } - if gotTcp6Mss := gnmi.Get(t, dut1, dut1ConfPath.Bgp().Neighbor(atePort1.IPv6).Transport().TcpMss().State()); gotTcp6Mss != dut1TcpMss { - t.Errorf("Obtained TCP MSS for BGP v6 peer on dut1 is not as expected, got is %v, want %v", gotTcp6Mss, dut1TcpMss) - } - }) - - t.Run("Remove configured BGP TCP MSS for v4 and v6 neighbors on DUT1", func(t *testing.T) { - dut1Port1Path := gnmi.OC().Interface(dut1.Port(t, "port1").Name()) - gnmi.Delete(t, dut1, dut1ConfPath.Config()) - gnmi.Delete(t, dut1, dut1Port1Path.Mtu().Config()) - }) - - t.Run("Configure ISIS Neighbors on DUT1 and ATE", func(t *testing.T) { - dut1PortNames := []string{dut1.Port(t, "port1").Name(), dut1.Port(t, "port2").Name()} - configureISIS(t, dut1, dut1PortNames, dut1AreaAddress, dut1SysID) - }) - - t.Run("Configure static route on DUT2 to ATE to establish multihop iBGP session", func(t *testing.T) { - ateIPAddr := fmt.Sprintf("%s/%d", atePort1.IPv4, uint32(32)) - configStaticRoute(t, dut2, ateIPAddr, dut1Port2.IPv4) - }) - - t.Run("Establish iBGP session with MD5 enabled from ATE port-1 to DUT-2 - multihop iBGP", func(t *testing.T) { - t.Logf("Start DUT2 - ATE Port1 iBGP Config.") - gnmi.Delete(t, dut2, dut2ConfPath.Config()) - dut2Nbr1v4 := &bgpNeighbor{as: ateAS1, neighborip: atePort1.IPv4, isV4: true, peerGrp: peerGrpName1} - dut2Nbrs := []*bgpNeighbor{dut2Nbr1v4} - dut2Conf := bgpCreateNbr(t, dut2, authPWd, dut2Port1.IPv4, dut2AS, dut2Nbrs) - gnmi.Replace(t, dut2, dut2ConfPath.Config(), dut2Conf) - fptest.LogQuery(t, "DUT2 BGP Config", dut2ConfPath.Config(), gnmi.GetConfig(t, dut2, dut2ConfPath.Config())) - }) - - t.Run("Configure iBGP session ATE Port1 - DUT2", func(t *testing.T) { - topo.StopProtocols(t) - topo = configATE(t, ate) - }) - - t.Run("Verify iBGP session between DUT2 - ATE Port1.", func(t *testing.T) { - var dut2NbrIP = []string{atePort1.IPv4} - verifyBGPTelemetry(t, dut2, dut2NbrIP) - }) - - t.Run("Change the MTU on DUT1-DUT2 to 512 bytes and Enable mtu discovery", func(t *testing.T) { - dut2Port1Path := gnmi.OC().Interface(dut2.Port(t, "port1").Name()) - gnmi.Replace(t, dut2, dut2Port1Path.Mtu().Config(), mtu512) - gnmi.Replace(t, dut2, dut2ConfPath.Bgp().Neighbor(atePort1.IPv4).Transport().MtuDiscovery().Config(), true) - }) - - t.Run("Re-establish the BGP sessions by tcp reset", func(t *testing.T) { - topo.StopProtocols(t) - time.Sleep(1 * time.Minute) - topo.StartProtocols(t) - }) - - t.Run("Verify iBGP session between DUT2 - ATE Port1.", func(t *testing.T) { - var dut2NbrIP = []string{atePort1.IPv4} - verifyBGPTelemetry(t, dut2, dut2NbrIP) - }) - - t.Run("Verify TCP MSS adjusted to below 512 bytes", func(t *testing.T) { - // TODO: - }) -} diff --git a/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/metadata.textproto b/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/metadata.textproto deleted file mode 100644 index 6e96c383e9f..00000000000 --- a/feature/experimental/bgp/ate_tests/bgp_tcp_mss_path_mtu/metadata.textproto +++ /dev/null @@ -1,46 +0,0 @@ -# proto-file: github.com/openconfig/featureprofiles/proto/metadata.proto -# proto-message: Metadata - -uuid: "7fbf408a-ac55-4e18-8f7f-1a937bff7921" -plan_id: "RT-1.21" -description: "BGP TCP MSS and PMTUD" -testbed: TESTBED_DUT_ATE_2LINKS -platform_exceptions: { - platform: { - vendor: CISCO - } - deviations: { - ipv4_missing_enabled: true - } -} -platform_exceptions: { - platform: { - vendor: NOKIA - } - deviations: { - use_vendor_native_acl_config: true - explicit_port_speed: true - explicit_interface_in_default_vrf: true - route_policy_under_afi_unsupported: true - interface_enabled: true - } -} -platform_exceptions: { - platform: { - vendor: JUNIPER - } - deviations: { - route_policy_under_afi_unsupported: true - } -} -platform_exceptions: { - platform: { - vendor: ARISTA - } - deviations: { - route_policy_under_afi_unsupported: true - omit_l2_mtu: true - interface_enabled: true - default_network_instance: "default" - } -} From a9875be0b5d8c65efa3592bcfcd7cadfa512d5c8 Mon Sep 17 00:00:00 2001 From: cprabha Date: Fri, 18 Aug 2023 15:48:54 -0700 Subject: [PATCH 12/25] added testbed file for 2 DUT --- topologies/ate2dut.testbed | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 topologies/ate2dut.testbed diff --git a/topologies/ate2dut.testbed b/topologies/ate2dut.testbed new file mode 100644 index 00000000000..d9c878439c7 --- /dev/null +++ b/topologies/ate2dut.testbed @@ -0,0 +1,40 @@ +# proto-file: github.com/openconfig/ondatra/blob/main/proto/testbed.proto +# proto-message: ondatra.Testbed + +# This testbed provides 2 DUTs and 4 ports between them, connected +# pairwise. This is used for control plane testing, not traffic +# testing. + +duts { + id: "dut1" + ports { + id: "port1" + } + ports { + id: "port2" + } +} + +duts { + id: "dut2" + ports { + id: "port1" + } +} + +ates { + id: "ate" + ports { + id: "port1" + } +} + +links { + a: "dut1:port1" + b: "ate:port1" +} + +links { + a: "dut1:port2" + b: "dut2:port1" +} From f753daf95519c1f3df84ef702d614fe411bc6376 Mon Sep 17 00:00:00 2001 From: cprabha Date: Fri, 18 Aug 2023 15:51:59 -0700 Subject: [PATCH 13/25] updated with ate2dut --- topologies/ate2dut.testbed | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/topologies/ate2dut.testbed b/topologies/ate2dut.testbed index d9c878439c7..cdd101a797a 100644 --- a/topologies/ate2dut.testbed +++ b/topologies/ate2dut.testbed @@ -1,9 +1,8 @@ # proto-file: github.com/openconfig/ondatra/blob/main/proto/testbed.proto # proto-message: ondatra.Testbed -# This testbed provides 2 DUTs and 4 ports between them, connected -# pairwise. This is used for control plane testing, not traffic -# testing. +# This testbed provides 2 DUTs and 1 ATE port, connected like below +# ATE ------ DUT1 ----------DUT2 duts { id: "dut1" From 0d8c702a749131f52adadd804dbbcd530203c494 Mon Sep 17 00:00:00 2001 From: cprabha Date: Wed, 30 Aug 2023 14:53:16 -0700 Subject: [PATCH 14/25] Update bgp_tcp_mss_path_mtu_test.go --- .../bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go b/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go index f6e6050f1bd..18fefebce28 100644 --- a/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go +++ b/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go @@ -208,9 +208,9 @@ func configureOTG(t *testing.T, otg *otg.OTG) gosnappi.Config { iDut1Eth := iDut1Dev.Ethernets().Add().SetName(atePort1.Name + ".Eth").SetMac(atePort1.MAC) iDut1Eth.Connection().SetChoice(gosnappi.EthernetConnectionChoice.PORT_NAME).SetPortName(port1.Name()) iDut1Ipv4 := iDut1Eth.Ipv4Addresses().Add().SetName(atePort1.Name + ".IPv4") - iDut1Ipv4.SetAddress(atePort1.IPv4).SetGateway(dut1Port1.IPv4).SetPrefix(int32(atePort1.IPv4Len)) + iDut1Ipv4.SetAddress(atePort1.IPv4).SetGateway(dut1Port1.IPv4).SetPrefix(uint32(atePort1.IPv4Len)) iDut1Ipv6 := iDut1Eth.Ipv6Addresses().Add().SetName(atePort1.Name + ".IPv6") - iDut1Ipv6.SetAddress(atePort1.IPv6).SetGateway(dut1Port1.IPv6).SetPrefix(int32(atePort1.IPv6Len)) + iDut1Ipv6.SetAddress(atePort1.IPv6).SetGateway(dut1Port1.IPv6).SetPrefix(uint32(atePort1.IPv6Len)) isisDut1 := iDut1Dev.Isis().SetName("ISIS").SetSystemId(ATESysID) From f527a4ac3e8f917c63356d04bd4c3290d86a049c Mon Sep 17 00:00:00 2001 From: cprabha Date: Wed, 30 Aug 2023 15:10:01 -0700 Subject: [PATCH 15/25] Update bgp_tcp_mss_path_mtu_test.go --- .../bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go b/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go index 18fefebce28..2c66b2647bd 100644 --- a/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go +++ b/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go @@ -244,9 +244,9 @@ func configOTG(t *testing.T, otg *otg.OTG) gosnappi.Config { iDut1Eth := iDut1Dev.Ethernets().Add().SetName(atePort1.Name + ".Eth").SetMac(atePort1.MAC) iDut1Eth.Connection().SetChoice(gosnappi.EthernetConnectionChoice.PORT_NAME).SetPortName(port1.Name()) iDut1Ipv4 := iDut1Eth.Ipv4Addresses().Add().SetName(atePort1.Name + ".IPv4") - iDut1Ipv4.SetAddress(atePort1.IPv4).SetGateway(dut1Port1.IPv4).SetPrefix(int32(atePort1.IPv4Len)) + iDut1Ipv4.SetAddress(atePort1.IPv4).SetGateway(dut1Port1.IPv4).SetPrefix(uint32(atePort1.IPv4Len)) iDut1Ipv6 := iDut1Eth.Ipv6Addresses().Add().SetName(atePort1.Name + ".IPv6") - iDut1Ipv6.SetAddress(atePort1.IPv6).SetGateway(dut1Port1.IPv6).SetPrefix(int32(atePort1.IPv6Len)) + iDut1Ipv6.SetAddress(atePort1.IPv6).SetGateway(dut1Port1.IPv6).SetPrefix(uint32(atePort1.IPv6Len)) isisDut1 := iDut1Dev.Isis().SetName("ISIS").SetSystemId(ATESysID) From 036b99b4ae2b09baf0305a955df84e910c169d8a Mon Sep 17 00:00:00 2001 From: cprabha Date: Wed, 6 Sep 2023 10:48:07 -0700 Subject: [PATCH 16/25] updated variable --- .../bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go b/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go index 2c66b2647bd..fe4322be8e5 100644 --- a/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go +++ b/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go @@ -62,7 +62,7 @@ const ( dut1SysID = "1920.0000.2001" dut2AreaAddress = "49.0001" dut2SysID = "1920.0000.3001" - ATESysID = "640000000001" + ateSysID = "640000000001" ) var ( @@ -212,7 +212,7 @@ func configureOTG(t *testing.T, otg *otg.OTG) gosnappi.Config { iDut1Ipv6 := iDut1Eth.Ipv6Addresses().Add().SetName(atePort1.Name + ".IPv6") iDut1Ipv6.SetAddress(atePort1.IPv6).SetGateway(dut1Port1.IPv6).SetPrefix(uint32(atePort1.IPv6Len)) - isisDut1 := iDut1Dev.Isis().SetName("ISIS").SetSystemId(ATESysID) + isisDut1 := iDut1Dev.Isis().SetName("ISIS").SetSystemId(ateSysID) isisDut1.Basic().SetIpv4TeRouterId(atePort1.IPv4).SetHostname(isisDut1.Name()).SetLearnedLspFilter(true) isisDut1.Interfaces().Add().SetEthName(iDut1Dev.Ethernets().Items()[0].Name()). @@ -248,7 +248,7 @@ func configOTG(t *testing.T, otg *otg.OTG) gosnappi.Config { iDut1Ipv6 := iDut1Eth.Ipv6Addresses().Add().SetName(atePort1.Name + ".IPv6") iDut1Ipv6.SetAddress(atePort1.IPv6).SetGateway(dut1Port1.IPv6).SetPrefix(uint32(atePort1.IPv6Len)) - isisDut1 := iDut1Dev.Isis().SetName("ISIS").SetSystemId(ATESysID) + isisDut1 := iDut1Dev.Isis().SetName("ISIS").SetSystemId(ateSysID) isisDut1.Basic().SetIpv4TeRouterId(atePort1.IPv4).SetHostname(isisDut1.Name()).SetLearnedLspFilter(true) isisDut1.Interfaces().Add().SetEthName(iDut1Dev.Ethernets().Items()[0].Name()). From f830f0a921b63d26545b113f0437acae1d3f392b Mon Sep 17 00:00:00 2001 From: cprabha Date: Fri, 8 Sep 2023 10:23:17 -0700 Subject: [PATCH 17/25] updated README, deleted testbed file --- .../otg_tests/bgp_tcp_mss_path_mtu/README.md | 22 +++++------ topologies/ate2dut.testbed | 39 ------------------- 2 files changed, 9 insertions(+), 52 deletions(-) delete mode 100644 topologies/ate2dut.testbed diff --git a/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md b/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md index e76eb79636b..0d096df0d7f 100644 --- a/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md +++ b/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md @@ -4,24 +4,20 @@ BGP TCP MSS and PMTUD -## Topology - -"Virtual host on ATE" <--> ATE (port1) <--> DUT - ## Procedure * Establish BGP sessions between: - * ATE (port-1) --- eBGP-IPv4/IPv6 ---- DUT - * Virtual host on ATE ---- iBGP IPv4 ---- DUT. + * ATE port-1 --- eBGP-IPv4/IPv6 ---- DUT1 + * ATE port-1 ---- Multihop iBGP IPv4 ---- DUT2. +* DUT-2 is directly connected to DUT-1. * TODO : Verify that the default TCP MSS value is set below interface MTU value. -* Change the Interface MTU on the DUT port as well as ATE(port1) to 5040B -* Configure IP TCP MSS value of 4096 bytes on the DUT interface to the ATE port1. +* Change the Interface MTU to the ATE port as 5040. +* Configure IP TCP MSS value of 4096 bytes on the interface to the ATE port. * Re-establish the BGP sessions by tcp reset. * Verify that the TCP MSS value is set to 4096 bytes for IPv4 and IPv6. -* Establish iBGP session with MD5 enabled between the "virtual host on ATE" and the DUT. -* Ensure that the MTU on the ATE port towards the virtual host is set at defualt while the virtual-host interface towards ATE is set at 5040B. -* Enable PMTUD on the DUT. -* TODO : Validate that the min MSS value has been adjusted to be below 1500 bytes on the tcp session. +* Establish Multihop iBGP session with MD5 enabled from ATE port-1 to DUT-2. +* Change the MTU on DUT-1 - DUT-2 link to 512 bytes and enable PMTUD on the DUT-2. +* TODO : Validate that the min MSS value has been adjusted to be below 512 bytes on the tcp session. ## Config Parameter coverage @@ -39,4 +35,4 @@ N/A ## Minimum DUT platform requirement -N/A \ No newline at end of file +N/A diff --git a/topologies/ate2dut.testbed b/topologies/ate2dut.testbed deleted file mode 100644 index cdd101a797a..00000000000 --- a/topologies/ate2dut.testbed +++ /dev/null @@ -1,39 +0,0 @@ -# proto-file: github.com/openconfig/ondatra/blob/main/proto/testbed.proto -# proto-message: ondatra.Testbed - -# This testbed provides 2 DUTs and 1 ATE port, connected like below -# ATE ------ DUT1 ----------DUT2 - -duts { - id: "dut1" - ports { - id: "port1" - } - ports { - id: "port2" - } -} - -duts { - id: "dut2" - ports { - id: "port1" - } -} - -ates { - id: "ate" - ports { - id: "port1" - } -} - -links { - a: "dut1:port1" - b: "ate:port1" -} - -links { - a: "dut1:port2" - b: "dut2:port1" -} From 8830fade93e6d65b8be9b0ddf95e70c88f7f534f Mon Sep 17 00:00:00 2001 From: cprabha Date: Mon, 11 Sep 2023 13:28:41 -0700 Subject: [PATCH 18/25] updated with tested --- .../bgp_tcp_mss_path_mtu/metadata.textproto | 40 ++++++++++++++++++- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/metadata.textproto b/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/metadata.textproto index 5af1a710137..6f2c7598736 100644 --- a/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/metadata.textproto +++ b/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/metadata.textproto @@ -1,7 +1,43 @@ # proto-file: github.com/openconfig/featureprofiles/proto/metadata.proto # proto-message: Metadata -uuid: "7fbf408a-ac55-4e18-8f7f-1a937bff7921" +uuid: "5a1c71f3-9c37-4ea3-8101-8f3058ed8c33" plan_id: "RT-1.21" description: "BGP TCP MSS and PMTUD" -testbed: TESTBED_DUT_ATE_2LINKS +testbed: TESTBED_DUT_DUT_ATE_2LINKS +platform_exceptions: { + platform: { + vendor: CISCO + } + deviations: { + ipv4_missing_enabled: true + } +} +platform_exceptions: { + platform: { + vendor: NOKIA + } + deviations: { + route_policy_under_afi_unsupported: true + interface_enabled: true + } +} +platform_exceptions: { + platform: { + vendor: JUNIPER + } + deviations: { + route_policy_under_afi_unsupported: true + } +} +platform_exceptions: { + platform: { + vendor: ARISTA + } + deviations: { + route_policy_under_afi_unsupported: true + omit_l2_mtu: true + interface_enabled: true + default_network_instance: "default" + } +} From 260d9a7947d4850547ae8cec79dd8c97b7b640d5 Mon Sep 17 00:00:00 2001 From: cprabha Date: Thu, 14 Sep 2023 19:23:37 -0700 Subject: [PATCH 19/25] Addressing review comments --- .../otg_tests/bgp_tcp_mss_path_mtu/README.md | 32 +- .../bgp_tcp_mss_path_mtu_test.go | 115 ++++---- .../bgp_tcp_mss_path_mtu/metadata.textproto | 38 +-- internal/deviations/deviations.go | 6 + proto/metadata.proto | 3 + proto/metadata_go_proto/metadata.pb.go | 275 +++++++++--------- 6 files changed, 248 insertions(+), 221 deletions(-) diff --git a/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md b/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md index 0d096df0d7f..3f5f5543bb8 100644 --- a/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md +++ b/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md @@ -2,22 +2,28 @@ ## Summary -BGP TCP MSS and PMTUD +* Validate changes in TCP MSS value is allowed and takes effect. +* Validate DUT's PMTUD compliance. + +## Topology + +* ATE:port1 <-> port1:DUT1:Port2 <-> port1:DUT2 ## Procedure -* Establish BGP sessions between: - * ATE port-1 --- eBGP-IPv4/IPv6 ---- DUT1 - * ATE port-1 ---- Multihop iBGP IPv4 ---- DUT2. -* DUT-2 is directly connected to DUT-1. -* TODO : Verify that the default TCP MSS value is set below interface MTU value. -* Change the Interface MTU to the ATE port as 5040. -* Configure IP TCP MSS value of 4096 bytes on the interface to the ATE port. -* Re-establish the BGP sessions by tcp reset. -* Verify that the TCP MSS value is set to 4096 bytes for IPv4 and IPv6. -* Establish Multihop iBGP session with MD5 enabled from ATE port-1 to DUT-2. -* Change the MTU on DUT-1 - DUT-2 link to 512 bytes and enable PMTUD on the DUT-2. -* TODO : Validate that the min MSS value has been adjusted to be below 512 bytes on the tcp session. +* Establish BGP sessions as follows: + * ATE:port1 --- eBGP-IPv4/IPv6 ---- DUT1:port1. + * ATE:port1 ---- iBGP IPv4 ---- DUT2:port1. +* Verify that the default TCP MSS value is set below the default interface MTU value. +* Change the Interface MTU on the DUT1:port1 port as well as ATE:port1 to 5040B +* Configure IP TCP MSS value of 4096 bytes on the DUT1:port1. +* Re-establish the EBGP sessions by tcp reset. +* Verify that the TCP MSS value is set to 4096 bytes for the IPv4 and IPv6 EBGP sessions. +* Establish iBGP session with MD5 enabled between ATE:port1 and DUT2:port2. +* Ensure that the MTU on the DUT1:port1 towards ATE1:port1 is left at default (1500B) while the ATE1:port1 interface towards DUT1:port1 is set at 5040B. Please also make sure that the DUT2:port2 MTU is set at 5040B as well. +* Enable PMTUD on DUT2:port2. +* Re-establish the IBGP sessions by tcp reset. +* Validate that the min MSS value has been adjusted to be below 1500 bytes on the tcp session. ## Config Parameter coverage diff --git a/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go b/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go index fe4322be8e5..d48b37f9224 100644 --- a/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go +++ b/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go @@ -43,26 +43,25 @@ func TestMain(m *testing.M) { // DUT-1 Port-2 192.0.2.5 -------- DUT-2 Port-1 192.0.2.6 const ( - peerGrpName1 = "BGP-PEER-GROUP1" - dut1AS = 65501 - ateAS1 = 65502 - dut2AS = 65502 - plenIPv4 = 30 - plenIPv6 = 126 - dut1TcpMssDefault = uint16(536) - dut1Tcp6MssDefault = uint16(1240) - dut1IntfMtu = uint16(5040) - dut1TcpMss = uint16(4096) - mtu512 = uint16(512) - vlan10 = 10 - vlan20 = 20 - isisInstance = "DEFAULT" - authPWd = "BGPTCPMSS" - dut1AreaAddress = "49.0001" - dut1SysID = "1920.0000.2001" - dut2AreaAddress = "49.0001" - dut2SysID = "1920.0000.3001" - ateSysID = "640000000001" + peerGrpName1 = "BGP-PEER-GROUP1" + dut1AS = 65501 + ateAS1 = 65502 + dut2AS = 65502 + plenIPv4 = 30 + plenIPv6 = 126 + mtu5040B = uint16(5040) + mtu4096B = uint16(4096) + mtu512B = uint16(512) + mtu1500B = uint16(1500) + vlan10 = 10 + vlan20 = 20 + isisInstance = "DEFAULT" + authPWd = "BGPTCPMSS" + dut1AreaAddress = "49.0001" + dut1SysID = "1920.0000.2001" + dut2AreaAddress = "49.0001" + dut2SysID = "1920.0000.3001" + ateSysID = "640000000001" ) var ( @@ -132,19 +131,15 @@ func bgpCreateNbr(t *testing.T, dut *ondatra.DUTDevice, authPwd, routerId string nv.PeerGroup = ygot.String(nbr.peerGrp) nv.PeerAs = ygot.Uint32(nbr.as) nv.Enabled = ygot.Bool(true) + if authPwd != "" { + nv.AuthPassword = ygot.String(authPWd) + } if nbr.isV4 { - if authPwd != "" { - nv.AuthPassword = ygot.String(authPWd) - } af4 := nv.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST) af4.Enabled = ygot.Bool(true) - af6 := nv.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV6_UNICAST) - af6.Enabled = ygot.Bool(false) } else { af6 := nv.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV6_UNICAST) af6.Enabled = ygot.Bool(true) - af4 := nv.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST) - af4.Enabled = ygot.Bool(false) } } return ni_proto @@ -222,16 +217,15 @@ func configureOTG(t *testing.T, otg *otg.OTG) gosnappi.Config { iDut1Bgp := iDut1Dev.Bgp().SetRouterId(iDut1Ipv4.Address()) iDut1Bgp4Peer := iDut1Bgp.Ipv4Interfaces().Add().SetIpv4Name(iDut1Ipv4.Name()).Peers().Add().SetName(atePort1.Name + ".BGP4.peer") - iDut1Bgp4Peer.SetPeerAddress(iDut1Ipv4.Gateway()).SetAsNumber(ateAS1).SetAsType(gosnappi.BgpV4PeerAsType.EBGP) + iDut1Bgp4Peer.SetPeerAddress(dut1Port1.IPv4).SetAsNumber(ateAS1).SetAsType(gosnappi.BgpV4PeerAsType.EBGP) iDut1Bgp6 := iDut1Dev.Bgp().SetRouterId(iDut1Ipv4.Address()) iDut1Bgp6Peer := iDut1Bgp6.Ipv6Interfaces().Add().SetIpv6Name(iDut1Ipv6.Name()).Peers().Add().SetName(atePort1.Name + ".BGP6.peer") - iDut1Bgp6Peer.SetPeerAddress(iDut1Ipv6.Gateway()).SetAsNumber(ateAS1).SetAsType(gosnappi.BgpV6PeerAsType.EBGP) + iDut1Bgp6Peer.SetPeerAddress(dut1Port1.IPv6).SetAsNumber(ateAS1).SetAsType(gosnappi.BgpV6PeerAsType.EBGP) t.Logf("Pushing config to OTG and starting protocols...") otg.PushConfig(t, config) otg.StartProtocols(t) - return config } @@ -241,7 +235,7 @@ func configOTG(t *testing.T, otg *otg.OTG) gosnappi.Config { port1 := config.Ports().Add().SetName("port1") iDut1Dev := config.Devices().Add().SetName(atePort1.Name) - iDut1Eth := iDut1Dev.Ethernets().Add().SetName(atePort1.Name + ".Eth").SetMac(atePort1.MAC) + iDut1Eth := iDut1Dev.Ethernets().Add().SetName(atePort1.Name + ".Eth").SetMac(atePort1.MAC).SetMtu(uint32(mtu5040B)) iDut1Eth.Connection().SetChoice(gosnappi.EthernetConnectionChoice.PORT_NAME).SetPortName(port1.Name()) iDut1Ipv4 := iDut1Eth.Ipv4Addresses().Add().SetName(atePort1.Name + ".IPv4") iDut1Ipv4.SetAddress(atePort1.IPv4).SetGateway(dut1Port1.IPv4).SetPrefix(uint32(atePort1.IPv4Len)) @@ -308,7 +302,7 @@ func TestTcpMssPathMtu(t *testing.T) { dut1ConfPath := gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut1)).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, "BGP") dut2ConfPath := gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut2)).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, "BGP") - t.Run("Configure BGP Neighbors DUT1 - ATE", func(t *testing.T) { + t.Run("Configure BGP Neighbors DUT1", func(t *testing.T) { t.Logf("Start DUT1 BGP Config.") gnmi.Delete(t, dut1, dut1ConfPath.Config()) dut1Nbr1v4 := &bgpNeighbor{as: ateAS1, neighborip: atePort1.IPv4, isV4: true, peerGrp: peerGrpName1} @@ -322,7 +316,7 @@ func TestTcpMssPathMtu(t *testing.T) { otg := ate.OTG() var otgConfig gosnappi.Config - t.Run("configureOTG", func(t *testing.T) { + t.Run("Configure OTG", func(t *testing.T) { otgConfig = configureOTG(t, otg) }) @@ -332,15 +326,24 @@ func TestTcpMssPathMtu(t *testing.T) { }) dut1Port1Path := gnmi.OC().Interface(dut1.Port(t, "port1").Name()) - t.Run("Verify default TCP MSS v4 and v6 session", func(t *testing.T) { - // TODO: - }) + if !deviations.SkipTcpNegotiatedMssCheck(dut1) { + t.Run("Verify that the default TCP MSS value is set below the default interface MTU value.", func(t *testing.T) { + // Fetch interface MTU value to compare negotiated tcp mss. + gotIntfMTU := gnmi.Get(t, dut1, dut1Port1Path.Mtu().State()) + if gotTcpMss := gnmi.Get(t, dut1, dut1ConfPath.Bgp().Neighbor(atePort1.IPv4).Transport().TcpMss().State()); gotTcpMss > gotIntfMTU || gotTcpMss == 0 { + t.Errorf("Obtained TCP MSS for BGP v4 on dut1 is not as expected, got is %v, want non zero and less than %v", gotTcpMss, mtu4096B) + } + if gotTcp6Mss := gnmi.Get(t, dut1, dut1ConfPath.Bgp().Neighbor(atePort1.IPv6).Transport().TcpMss().State()); gotTcp6Mss > gotIntfMTU || gotTcp6Mss == 0 { + t.Errorf("Obtained TCP MSS for BGP v6 peer on dut1 is not as expected, got is %v, want non zero and less than %v", gotTcp6Mss, mtu4096B) + } + }) + } t.Run("Change the Interface MTU to the ATE port as 5040.", func(t *testing.T) { - t.Logf("Configure DUT1 interface MTU to %v", dut1IntfMtu) - gnmi.Replace(t, dut1, dut1Port1Path.Mtu().Config(), dut1IntfMtu) - t.Logf("Configure DUT1 BGP TCP-MSS value to %v", dut1TcpMss) - gnmi.Replace(t, dut1, dut1ConfPath.Bgp().Neighbor(atePort1.IPv4).Transport().TcpMss().Config(), dut1TcpMss) - gnmi.Replace(t, dut1, dut1ConfPath.Bgp().Neighbor(atePort1.IPv6).Transport().TcpMss().Config(), dut1TcpMss) + t.Logf("Configure DUT1 interface MTU to %v", mtu5040B) + gnmi.Replace(t, dut1, dut1Port1Path.Mtu().Config(), mtu5040B) + t.Logf("Configure DUT1 BGP TCP-MSS value to %v", mtu4096B) + gnmi.Replace(t, dut1, dut1ConfPath.Bgp().Neighbor(atePort1.IPv4).Transport().TcpMss().Config(), mtu4096B) + gnmi.Replace(t, dut1, dut1ConfPath.Bgp().Neighbor(atePort1.IPv6).Transport().TcpMss().Config(), mtu4096B) }) t.Run("Re-establish the BGP sessions by tcp reset.", func(t *testing.T) { @@ -355,12 +358,12 @@ func TestTcpMssPathMtu(t *testing.T) { }) t.Run("Verify BGP TCP MSS value", func(t *testing.T) { - t.Logf("Verify DUT1 BGP TCP-MSS value is to %v for both BGP v4 and v6 sessions.", dut1TcpMss) - if gotTcpMss := gnmi.Get(t, dut1, dut1ConfPath.Bgp().Neighbor(atePort1.IPv4).Transport().TcpMss().State()); gotTcpMss != dut1TcpMss { - t.Errorf("Obtained TCP MSS for BGP v4 on dut1 is not as expected, got is %v, want %v", gotTcpMss, dut1TcpMss) + t.Logf("Verify DUT1 BGP TCP-MSS value is to %v for both BGP v4 and v6 sessions.", mtu4096B) + if gotTcpMss := gnmi.Get(t, dut1, dut1ConfPath.Bgp().Neighbor(atePort1.IPv4).Transport().TcpMss().State()); gotTcpMss != mtu4096B { + t.Errorf("Obtained TCP MSS for BGP v4 on dut1 is not as expected, got is %v, want %v", gotTcpMss, mtu4096B) } - if gotTcp6Mss := gnmi.Get(t, dut1, dut1ConfPath.Bgp().Neighbor(atePort1.IPv6).Transport().TcpMss().State()); gotTcp6Mss != dut1TcpMss { - t.Errorf("Obtained TCP MSS for BGP v6 peer on dut1 is not as expected, got is %v, want %v", gotTcp6Mss, dut1TcpMss) + if gotTcp6Mss := gnmi.Get(t, dut1, dut1ConfPath.Bgp().Neighbor(atePort1.IPv6).Transport().TcpMss().State()); gotTcp6Mss != mtu4096B { + t.Errorf("Obtained TCP MSS for BGP v6 peer on dut1 is not as expected, got is %v, want %v", gotTcp6Mss, mtu4096B) } }) @@ -400,9 +403,15 @@ func TestTcpMssPathMtu(t *testing.T) { verifyBGPTelemetry(t, dut2, dut2NbrIP) }) - t.Run("Change the MTU on DUT1-DUT2 to 512 bytes and Enable mtu discovery", func(t *testing.T) { + t.Run("Configure MTU on ATE1:port1, DUT2:port2 and Enable PMTU discovery on DUT2", func(t *testing.T) { + // MTU on the DUT1:port1 towards ATE1:port1 is left at default. + // ATE1:port1 interface towards DUT1:port1 is set at 5040B + // OTG Port1 MTU is set to 5040B in configOTG. + + // DUT2:port2 MTU is set at 5040B. dut2Port1Path := gnmi.OC().Interface(dut2.Port(t, "port1").Name()) - gnmi.Replace(t, dut2, dut2Port1Path.Mtu().Config(), mtu512) + gnmi.Replace(t, dut2, dut2Port1Path.Mtu().Config(), mtu5040B) + // Enable PMTU discovery on DUT2. gnmi.Replace(t, dut2, dut2ConfPath.Bgp().Neighbor(atePort1.IPv4).Transport().MtuDiscovery().Config(), true) }) @@ -418,7 +427,11 @@ func TestTcpMssPathMtu(t *testing.T) { verifyBGPTelemetry(t, dut2, dut2NbrIP) }) - t.Run("Verify TCP MSS adjusted to below 512 bytes", func(t *testing.T) { - // TODO: - }) + if !deviations.SkipTcpNegotiatedMssCheck(dut2) { + t.Run("Validate that the min MSS value has been adjusted to be below 1500 bytes on the tcp session.", func(t *testing.T) { + if gotTcpMss := gnmi.Get(t, dut2, dut2ConfPath.Bgp().Neighbor(atePort1.IPv4).Transport().TcpMss().State()); gotTcpMss > mtu1500B || gotTcpMss == 0 { + t.Errorf("Obtained TCP MSS for BGP v4 on dut2 is not as expected, got %v, want non zero value and less then %v", gotTcpMss, mtu1500B) + } + }) + } } diff --git a/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/metadata.textproto b/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/metadata.textproto index 6f2c7598736..8b024b48147 100644 --- a/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/metadata.textproto +++ b/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/metadata.textproto @@ -7,37 +7,27 @@ description: "BGP TCP MSS and PMTUD" testbed: TESTBED_DUT_DUT_ATE_2LINKS platform_exceptions: { platform: { - vendor: CISCO - } - deviations: { - ipv4_missing_enabled: true - } -} -platform_exceptions: { - platform: { - vendor: NOKIA + vendor: JUNIPER } deviations: { - route_policy_under_afi_unsupported: true - interface_enabled: true + skip_tcp_negotiated_mss_check: true } } -platform_exceptions: { - platform: { - vendor: JUNIPER +platform_exceptions: { + platform: { + vendor: ARISTA } - deviations: { - route_policy_under_afi_unsupported: true + deviations: { + interface_enabled: true + default_network_instance: "default" } } -platform_exceptions: { - platform: { - vendor: ARISTA +platform_exceptions: { + platform: { + vendor: NOKIA } - deviations: { - route_policy_under_afi_unsupported: true - omit_l2_mtu: true - interface_enabled: true - default_network_instance: "default" + deviations: { + interface_enabled: true } } +tags: TAGS_AGGREGATION \ No newline at end of file diff --git a/internal/deviations/deviations.go b/internal/deviations/deviations.go index ed7f7267f8c..d9bc66a8697 100644 --- a/internal/deviations/deviations.go +++ b/internal/deviations/deviations.go @@ -596,3 +596,9 @@ func ISISCounterManualAddressDropFromAreasUnsupported(dut *ondatra.DUTDevice) bo func ISISCounterPartChangesUnsupported(dut *ondatra.DUTDevice) bool { return lookupDUTDeviations(dut).GetIsisCounterPartChangesUnsupported() } + +// SkipTcpNegotiatedMssCheck returns true for devices that do not +// support telemetry to check negotiated tcp mss value. +func SkipTcpNegotiatedMssCheck(dut *ondatra.DUTDevice) bool { + return lookupDUTDeviations(dut).GetSkipTcpNegotiatedMssCheck() +} diff --git a/proto/metadata.proto b/proto/metadata.proto index a614b68f6a9..ca23a235f22 100644 --- a/proto/metadata.proto +++ b/proto/metadata.proto @@ -327,6 +327,9 @@ message Metadata { // Devices do not support telemetry for isis counter: part-changes. // Arista: partnerissuetracker.corp.google.com/299285991 bool isis_counter_part_changes_unsupported = 107; + // Devices do not support showing negotiated tcp mss value in bgp tcp mss telemetry. + // Juniper: b/300499125 + bool skip_tcp_negotiated_mss_check = 108; // Reserved field numbers and identifiers. reserved 84, 9, 28, 90; diff --git a/proto/metadata_go_proto/metadata.pb.go b/proto/metadata_go_proto/metadata.pb.go index 5415cb33625..21ae11facaa 100644 --- a/proto/metadata_go_proto/metadata.pb.go +++ b/proto/metadata_go_proto/metadata.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0 -// protoc v3.19.3 +// protoc-gen-go v1.31.0 +// protoc v3.6.1 // source: metadata.proto package metadata_go_proto @@ -594,6 +594,9 @@ type Metadata_Deviations struct { // Devices do not support telemetry for isis counter: part-changes. // Arista: partnerissuetracker.corp.google.com/299285991 IsisCounterPartChangesUnsupported bool `protobuf:"varint,107,opt,name=isis_counter_part_changes_unsupported,json=isisCounterPartChangesUnsupported,proto3" json:"isis_counter_part_changes_unsupported,omitempty"` + // Devices do not support showing negotiated tcp mss value in bgp tcp mss telemetry. + // Juniper: b/300499125 + SkipTcpNegotiatedMssCheck bool `protobuf:"varint,108,opt,name=skip_tcp_negotiated_mss_check,json=skipTcpNegotiatedMssCheck,proto3" json:"skip_tcp_negotiated_mss_check,omitempty"` } func (x *Metadata_Deviations) Reset() { @@ -1300,6 +1303,13 @@ func (x *Metadata_Deviations) GetIsisCounterPartChangesUnsupported() bool { return false } +func (x *Metadata_Deviations) GetSkipTcpNegotiatedMssCheck() bool { + if x != nil { + return x.SkipTcpNegotiatedMssCheck + } + return false +} + type Metadata_PlatformExceptions struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1363,7 +1373,7 @@ var file_metadata_proto_rawDesc = []byte{ 0x74, 0x69, 0x6e, 0x67, 0x1a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6f, 0x6e, 0x64, 0x61, 0x74, 0x72, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x62, 0x65, - 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb9, 0x3d, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa4, 0x3d, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, @@ -1394,7 +1404,7 @@ var file_metadata_proto_rawDesc = []byte{ 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x0e, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, - 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x1a, 0xed, 0x35, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, + 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x1a, 0xd8, 0x35, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x69, 0x70, 0x76, 0x34, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, @@ -1726,136 +1736,135 @@ var file_metadata_proto_rawDesc = []byte{ 0x0a, 0x1c, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x66, 0x61, 0x62, 0x72, 0x69, 0x63, 0x5f, 0x63, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x59, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x73, 0x6b, 0x69, 0x70, 0x46, 0x61, 0x62, 0x72, 0x69, 0x63, - 0x43, 0x61, 0x72, 0x64, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x5b, - 0x0a, 0x2b, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x6f, 0x77, 0x65, - 0x72, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x5f, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x5f, 0x69, - 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x5a, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x26, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x50, 0x6f, - 0x77, 0x65, 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x49, 0x6e, - 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x57, 0x0a, 0x2a, 0x69, - 0x73, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x5f, 0x73, 0x61, 0x6d, 0x65, - 0x5f, 0x6c, 0x31, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, - 0x6c, 0x32, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x5b, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x23, 0x69, 0x73, 0x69, 0x73, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x53, 0x61, 0x6d, 0x65, - 0x4c, 0x31, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x57, 0x69, 0x74, 0x68, 0x4c, 0x32, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x12, 0x57, 0x0a, 0x2a, 0x62, 0x67, 0x70, 0x5f, 0x73, 0x65, 0x74, 0x5f, - 0x6d, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x65, 0x71, 0x75, - 0x61, 0x6c, 0x5f, 0x6f, 0x73, 0x70, 0x66, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x18, 0x5c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x23, 0x62, 0x67, 0x70, 0x53, 0x65, 0x74, - 0x4d, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x45, 0x71, 0x75, 0x61, 0x6c, - 0x4f, 0x73, 0x70, 0x66, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x4e, 0x0a, - 0x24, 0x70, 0x34, 0x72, 0x74, 0x5f, 0x67, 0x64, 0x70, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, - 0x65, 0x73, 0x5f, 0x64, 0x6f, 0x74, 0x31, 0x71, 0x5f, 0x73, 0x75, 0x62, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x66, 0x61, 0x63, 0x65, 0x18, 0x5d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x20, 0x70, 0x34, 0x72, - 0x74, 0x47, 0x64, 0x70, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x44, 0x6f, 0x74, 0x31, - 0x71, 0x53, 0x75, 0x62, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, 0x59, 0x0a, - 0x2a, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, - 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x5e, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x25, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x55, 0x6e, 0x73, - 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x65, 0x74, 0x5f, - 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x5f, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0d, 0x73, 0x65, 0x74, 0x4e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, - 0x12, 0x73, 0x0a, 0x38, 0x69, 0x73, 0x69, 0x73, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x6c, 0x69, 0x66, - 0x65, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, 0x72, - 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x72, 0x65, 0x66, 0x72, - 0x65, 0x73, 0x68, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x60, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x31, 0x69, 0x73, 0x69, 0x73, 0x4c, 0x73, 0x70, 0x4c, 0x69, 0x66, 0x65, 0x74, - 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x69, - 0x72, 0x65, 0x73, 0x4c, 0x73, 0x70, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x49, 0x6e, 0x74, - 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x77, 0x0a, 0x3a, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x65, 0x5f, 0x6c, 0x6f, 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x6d, 0x6f, 0x64, 0x65, - 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6c, 0x6f, 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x6d, - 0x6f, 0x64, 0x65, 0x18, 0x61, 0x20, 0x01, 0x28, 0x08, 0x52, 0x33, 0x61, 0x67, 0x67, 0x72, 0x65, - 0x67, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x4d, 0x6f, 0x64, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x50, 0x6f, - 0x72, 0x74, 0x4c, 0x6f, 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x4f, - 0x0a, 0x24, 0x6c, 0x69, 0x6e, 0x65, 0x63, 0x61, 0x72, 0x64, 0x5f, 0x63, 0x70, 0x75, 0x5f, 0x75, - 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x6e, 0x73, 0x75, 0x70, - 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x62, 0x20, 0x01, 0x28, 0x08, 0x52, 0x21, 0x6c, 0x69, - 0x6e, 0x65, 0x63, 0x61, 0x72, 0x64, 0x43, 0x70, 0x75, 0x55, 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, - 0x53, 0x0a, 0x26, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, - 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x75, 0x6e, - 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x63, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x23, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6f, - 0x6e, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x55, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x64, 0x12, 0x5c, 0x0a, 0x2b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, - 0x65, 0x72, 0x5f, 0x63, 0x61, 0x72, 0x64, 0x5f, 0x63, 0x70, 0x75, 0x5f, 0x75, 0x74, 0x69, 0x6c, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, - 0x74, 0x65, 0x64, 0x18, 0x64, 0x20, 0x01, 0x28, 0x08, 0x52, 0x27, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x43, 0x61, 0x72, 0x64, 0x43, 0x70, 0x75, 0x55, 0x74, 0x69, 0x6c, + 0x43, 0x61, 0x72, 0x64, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x57, + 0x0a, 0x2a, 0x69, 0x73, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x5f, 0x73, + 0x61, 0x6d, 0x65, 0x5f, 0x6c, 0x31, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x77, 0x69, + 0x74, 0x68, 0x5f, 0x6c, 0x32, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x5b, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x23, 0x69, 0x73, 0x69, 0x73, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x53, + 0x61, 0x6d, 0x65, 0x4c, 0x31, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x57, 0x69, 0x74, 0x68, 0x4c, + 0x32, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x57, 0x0a, 0x2a, 0x62, 0x67, 0x70, 0x5f, 0x73, + 0x65, 0x74, 0x5f, 0x6d, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x5f, + 0x65, 0x71, 0x75, 0x61, 0x6c, 0x5f, 0x6f, 0x73, 0x70, 0x66, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x5c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x23, 0x62, 0x67, 0x70, + 0x53, 0x65, 0x74, 0x4d, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x45, 0x71, + 0x75, 0x61, 0x6c, 0x4f, 0x73, 0x70, 0x66, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x12, 0x4e, 0x0a, 0x24, 0x70, 0x34, 0x72, 0x74, 0x5f, 0x67, 0x64, 0x70, 0x5f, 0x72, 0x65, 0x71, + 0x75, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x64, 0x6f, 0x74, 0x31, 0x71, 0x5f, 0x73, 0x75, 0x62, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x18, 0x5d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x20, + 0x70, 0x34, 0x72, 0x74, 0x47, 0x64, 0x70, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x44, + 0x6f, 0x74, 0x31, 0x71, 0x53, 0x75, 0x62, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, + 0x12, 0x59, 0x0a, 0x2a, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6c, 0x69, 0x6e, + 0x6b, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x5f, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x5e, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x25, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x6e, + 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x55, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x73, + 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x5f, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x73, 0x65, 0x74, 0x4e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x55, + 0x73, 0x65, 0x72, 0x12, 0x73, 0x0a, 0x38, 0x69, 0x73, 0x69, 0x73, 0x5f, 0x6c, 0x73, 0x70, 0x5f, + 0x6c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x72, + 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, + 0x60, 0x20, 0x01, 0x28, 0x08, 0x52, 0x31, 0x69, 0x73, 0x69, 0x73, 0x4c, 0x73, 0x70, 0x4c, 0x69, + 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x52, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x4c, 0x73, 0x70, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x77, 0x0a, 0x3a, 0x61, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x6f, 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x6d, + 0x6f, 0x64, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x6d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6c, 0x6f, 0x6f, 0x70, 0x62, 0x61, 0x63, + 0x6b, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x61, 0x20, 0x01, 0x28, 0x08, 0x52, 0x33, 0x61, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x4d, + 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x4d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x50, 0x6f, 0x72, 0x74, 0x4c, 0x6f, 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x4d, 0x6f, 0x64, + 0x65, 0x12, 0x4f, 0x0a, 0x24, 0x6c, 0x69, 0x6e, 0x65, 0x63, 0x61, 0x72, 0x64, 0x5f, 0x63, 0x70, + 0x75, 0x5f, 0x75, 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x6e, + 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x62, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x21, 0x6c, 0x69, 0x6e, 0x65, 0x63, 0x61, 0x72, 0x64, 0x43, 0x70, 0x75, 0x55, 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, - 0x65, 0x64, 0x12, 0x45, 0x0a, 0x1f, 0x66, 0x61, 0x62, 0x72, 0x69, 0x63, 0x5f, 0x64, 0x72, 0x6f, - 0x70, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x5f, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, - 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x65, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1c, 0x66, 0x61, 0x62, - 0x72, 0x69, 0x63, 0x44, 0x72, 0x6f, 0x70, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x55, 0x6e, - 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x55, 0x0a, 0x27, 0x6c, 0x69, 0x6e, - 0x65, 0x63, 0x61, 0x72, 0x64, 0x5f, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x75, 0x74, 0x69, - 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x64, 0x18, 0x66, 0x20, 0x01, 0x28, 0x08, 0x52, 0x24, 0x6c, 0x69, 0x6e, 0x65, - 0x63, 0x61, 0x72, 0x64, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x55, 0x74, 0x69, 0x6c, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, - 0x12, 0x46, 0x0a, 0x20, 0x71, 0x6f, 0x73, 0x5f, 0x76, 0x6f, 0x71, 0x5f, 0x64, 0x72, 0x6f, 0x70, - 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x5f, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x64, 0x18, 0x67, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1c, 0x71, 0x6f, 0x73, 0x56, - 0x6f, 0x71, 0x44, 0x72, 0x6f, 0x70, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x55, 0x6e, 0x73, - 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x44, 0x0a, 0x1f, 0x61, 0x74, 0x65, 0x5f, - 0x69, 0x70, 0x76, 0x36, 0x5f, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, - 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x68, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x1b, 0x61, 0x74, 0x65, 0x49, 0x70, 0x76, 0x36, 0x46, 0x6c, 0x6f, 0x77, 0x4c, 0x61, - 0x62, 0x65, 0x6c, 0x55, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x50, - 0x0a, 0x25, 0x69, 0x73, 0x69, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x73, 0x5f, 0x63, 0x73, - 0x6e, 0x70, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, 0x75, 0x6e, 0x73, 0x75, - 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x69, 0x20, 0x01, 0x28, 0x08, 0x52, 0x21, 0x69, - 0x73, 0x69, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x73, 0x43, 0x73, 0x6e, 0x70, 0x49, 0x6e, 0x74, - 0x65, 0x72, 0x76, 0x61, 0x6c, 0x55, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, - 0x12, 0x71, 0x0a, 0x37, 0x69, 0x73, 0x69, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, - 0x5f, 0x6d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, - 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x72, 0x65, 0x61, 0x73, 0x5f, - 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x6a, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x30, 0x69, 0x73, 0x69, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x4d, 0x61, - 0x6e, 0x75, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x44, 0x72, 0x6f, 0x70, 0x46, - 0x72, 0x6f, 0x6d, 0x41, 0x72, 0x65, 0x61, 0x73, 0x55, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, - 0x74, 0x65, 0x64, 0x12, 0x50, 0x0a, 0x25, 0x69, 0x73, 0x69, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, - 0x5f, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x6b, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x21, 0x69, 0x73, 0x69, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x50, - 0x61, 0x72, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x55, 0x6e, 0x73, 0x75, 0x70, 0x70, - 0x6f, 0x72, 0x74, 0x65, 0x64, 0x4a, 0x04, 0x08, 0x54, 0x10, 0x55, 0x4a, 0x04, 0x08, 0x09, 0x10, - 0x0a, 0x4a, 0x04, 0x08, 0x1c, 0x10, 0x1d, 0x1a, 0xa0, 0x01, 0x0a, 0x12, 0x50, 0x6c, 0x61, 0x74, - 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, - 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x25, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, - 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, - 0x6d, 0x12, 0x47, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0a, - 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xc7, 0x01, 0x0a, 0x07, 0x54, - 0x65, 0x73, 0x74, 0x62, 0x65, 0x64, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, - 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x0f, 0x0a, 0x0b, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x10, 0x01, - 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, - 0x44, 0x55, 0x54, 0x5f, 0x34, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, - 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x41, 0x54, 0x45, 0x5f, - 0x32, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x03, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x45, 0x53, 0x54, - 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x34, 0x4c, 0x49, 0x4e, - 0x4b, 0x53, 0x10, 0x04, 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, - 0x44, 0x55, 0x54, 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x39, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x5f, 0x4c, - 0x41, 0x47, 0x10, 0x05, 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, - 0x44, 0x55, 0x54, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x32, 0x4c, 0x49, 0x4e, - 0x4b, 0x53, 0x10, 0x06, 0x22, 0x6d, 0x0a, 0x04, 0x54, 0x61, 0x67, 0x73, 0x12, 0x14, 0x0a, 0x10, - 0x54, 0x41, 0x47, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x41, 0x47, 0x47, 0x52, 0x45, - 0x47, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x41, 0x47, 0x53, - 0x5f, 0x44, 0x41, 0x54, 0x41, 0x43, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x5f, 0x45, 0x44, 0x47, 0x45, - 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x45, 0x44, 0x47, 0x45, 0x10, - 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, - 0x54, 0x10, 0x04, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x64, 0x12, 0x53, 0x0a, 0x26, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, + 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x5f, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x63, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x23, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x43, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x55, 0x6e, 0x73, 0x75, + 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x5c, 0x0a, 0x2b, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x63, 0x61, 0x72, 0x64, 0x5f, 0x63, 0x70, 0x75, 0x5f, 0x75, + 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x6e, 0x73, 0x75, 0x70, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x64, 0x20, 0x01, 0x28, 0x08, 0x52, 0x27, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x43, 0x61, 0x72, 0x64, 0x43, 0x70, 0x75, 0x55, + 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x6e, 0x73, 0x75, 0x70, 0x70, + 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x45, 0x0a, 0x1f, 0x66, 0x61, 0x62, 0x72, 0x69, 0x63, 0x5f, + 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x5f, 0x75, 0x6e, 0x73, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x65, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1c, + 0x66, 0x61, 0x62, 0x72, 0x69, 0x63, 0x44, 0x72, 0x6f, 0x70, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x55, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x55, 0x0a, 0x27, + 0x6c, 0x69, 0x6e, 0x65, 0x63, 0x61, 0x72, 0x64, 0x5f, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, + 0x75, 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x6e, 0x73, 0x75, + 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x66, 0x20, 0x01, 0x28, 0x08, 0x52, 0x24, 0x6c, + 0x69, 0x6e, 0x65, 0x63, 0x61, 0x72, 0x64, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x55, 0x74, 0x69, + 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, + 0x74, 0x65, 0x64, 0x12, 0x46, 0x0a, 0x20, 0x71, 0x6f, 0x73, 0x5f, 0x76, 0x6f, 0x71, 0x5f, 0x64, + 0x72, 0x6f, 0x70, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x5f, 0x75, 0x6e, 0x73, 0x75, + 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x67, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1c, 0x71, + 0x6f, 0x73, 0x56, 0x6f, 0x71, 0x44, 0x72, 0x6f, 0x70, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x55, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x44, 0x0a, 0x1f, 0x61, + 0x74, 0x65, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x5f, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x68, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x1b, 0x61, 0x74, 0x65, 0x49, 0x70, 0x76, 0x36, 0x46, 0x6c, 0x6f, + 0x77, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x55, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, + 0x64, 0x12, 0x50, 0x0a, 0x25, 0x69, 0x73, 0x69, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x73, + 0x5f, 0x63, 0x73, 0x6e, 0x70, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, 0x75, + 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x69, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x21, 0x69, 0x73, 0x69, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x73, 0x43, 0x73, 0x6e, 0x70, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x55, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, + 0x74, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x37, 0x69, 0x73, 0x69, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x5f, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x72, 0x65, + 0x61, 0x73, 0x5f, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x6a, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x30, 0x69, 0x73, 0x69, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x44, 0x72, + 0x6f, 0x70, 0x46, 0x72, 0x6f, 0x6d, 0x41, 0x72, 0x65, 0x61, 0x73, 0x55, 0x6e, 0x73, 0x75, 0x70, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x50, 0x0a, 0x25, 0x69, 0x73, 0x69, 0x73, 0x5f, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x73, 0x5f, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, + 0x6b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x21, 0x69, 0x73, 0x69, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x55, 0x6e, 0x73, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x40, 0x0a, 0x1d, 0x73, 0x6b, 0x69, 0x70, + 0x5f, 0x74, 0x63, 0x70, 0x5f, 0x6e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x6d, 0x73, 0x73, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x6c, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x19, 0x73, 0x6b, 0x69, 0x70, 0x54, 0x63, 0x70, 0x4e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, + 0x65, 0x64, 0x4d, 0x73, 0x73, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4a, 0x04, 0x08, 0x54, 0x10, 0x55, + 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x1c, 0x10, 0x1d, 0x4a, 0x04, 0x08, 0x5a, + 0x10, 0x5b, 0x1a, 0xa0, 0x01, 0x0a, 0x12, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, + 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x08, 0x70, 0x6c, 0x61, + 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x70, + 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, + 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, + 0x72, 0x6d, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x47, 0x0a, 0x0a, + 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x44, + 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xc7, 0x01, 0x0a, 0x07, 0x54, 0x65, 0x73, 0x74, 0x62, 0x65, + 0x64, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x45, + 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x54, + 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x34, + 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x45, 0x53, 0x54, 0x42, + 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x32, 0x4c, 0x49, 0x4e, 0x4b, + 0x53, 0x10, 0x03, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, + 0x55, 0x54, 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x34, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x04, 0x12, + 0x1e, 0x0a, 0x1a, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x41, + 0x54, 0x45, 0x5f, 0x39, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x5f, 0x4c, 0x41, 0x47, 0x10, 0x05, 0x12, + 0x1e, 0x0a, 0x1a, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x44, + 0x55, 0x54, 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x32, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x06, 0x22, + 0x6d, 0x0a, 0x04, 0x54, 0x61, 0x67, 0x73, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x47, 0x53, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, + 0x10, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x41, 0x47, 0x47, 0x52, 0x45, 0x47, 0x41, 0x54, 0x49, 0x4f, + 0x4e, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x44, 0x41, 0x54, 0x41, + 0x43, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x5f, 0x45, 0x44, 0x47, 0x45, 0x10, 0x02, 0x12, 0x0d, 0x0a, + 0x09, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x45, 0x44, 0x47, 0x45, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, + 0x54, 0x41, 0x47, 0x53, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x54, 0x10, 0x04, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( From d0b808714396a5625212bc196ba78fea8d1f1aa6 Mon Sep 17 00:00:00 2001 From: cprabha Date: Thu, 14 Sep 2023 19:30:10 -0700 Subject: [PATCH 20/25] Restored version in metadata.pb.go --- proto/metadata_go_proto/metadata.pb.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proto/metadata_go_proto/metadata.pb.go b/proto/metadata_go_proto/metadata.pb.go index 21ae11facaa..246e71fb9b6 100644 --- a/proto/metadata_go_proto/metadata.pb.go +++ b/proto/metadata_go_proto/metadata.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v3.6.1 +// protoc-gen-go v1.30.0 +// protoc v3.19.3 // source: metadata.proto package metadata_go_proto From eeb083fab2da0666849f7786667c0dc13adc1d2f Mon Sep 17 00:00:00 2001 From: cprabha Date: Fri, 15 Sep 2023 11:42:27 -0700 Subject: [PATCH 21/25] Updating review comments --- .../bgp_tcp_mss_path_mtu_test.go | 12 +++++------- .../bgp_tcp_mss_path_mtu/metadata.textproto | 2 +- internal/deviations/deviations.go | 6 +++--- proto/metadata_go_proto/metadata.pb.go | 4 ++-- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go b/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go index d48b37f9224..939a466627f 100644 --- a/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go +++ b/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go @@ -111,11 +111,10 @@ func configureDUT(t *testing.T) { // bgpCreateNbr creates bgp configuration on dut device. func bgpCreateNbr(t *testing.T, dut *ondatra.DUTDevice, authPwd, routerId string, localAs uint32, nbrs []*bgpNeighbor) *oc.NetworkInstance_Protocol { - d := &oc.Root{} ni1 := d.GetOrCreateNetworkInstance(deviations.DefaultNetworkInstance(dut)) - ni_proto := ni1.GetOrCreateProtocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, "BGP") - bgp := ni_proto.GetOrCreateBgp() + niProto := ni1.GetOrCreateProtocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, "BGP") + bgp := niProto.GetOrCreateBgp() global := bgp.GetOrCreateGlobal() global.RouterId = ygot.String(routerId) global.As = ygot.Uint32(localAs) @@ -142,7 +141,7 @@ func bgpCreateNbr(t *testing.T, dut *ondatra.DUTDevice, authPwd, routerId string af6.Enabled = ygot.Bool(true) } } - return ni_proto + return niProto } // verifyBGPTelemetry checks that the dut has an established BGP session with reasonable settings. @@ -281,7 +280,6 @@ type bgpNeighbor struct { // TestTcpMssPathMtu is to Validate TCP MSS for BGP v4/v6 sessions. func TestTcpMssPathMtu(t *testing.T) { - dut1 := ondatra.DUT(t, "dut1") dut2 := ondatra.DUT(t, "dut2") ate := ondatra.ATE(t, "ate") @@ -326,7 +324,7 @@ func TestTcpMssPathMtu(t *testing.T) { }) dut1Port1Path := gnmi.OC().Interface(dut1.Port(t, "port1").Name()) - if !deviations.SkipTcpNegotiatedMssCheck(dut1) { + if !deviations.SkipTCPNegotiatedMssCheck(dut1) { t.Run("Verify that the default TCP MSS value is set below the default interface MTU value.", func(t *testing.T) { // Fetch interface MTU value to compare negotiated tcp mss. gotIntfMTU := gnmi.Get(t, dut1, dut1Port1Path.Mtu().State()) @@ -427,7 +425,7 @@ func TestTcpMssPathMtu(t *testing.T) { verifyBGPTelemetry(t, dut2, dut2NbrIP) }) - if !deviations.SkipTcpNegotiatedMssCheck(dut2) { + if !deviations.SkipTCPNegotiatedMssCheck(dut2) { t.Run("Validate that the min MSS value has been adjusted to be below 1500 bytes on the tcp session.", func(t *testing.T) { if gotTcpMss := gnmi.Get(t, dut2, dut2ConfPath.Bgp().Neighbor(atePort1.IPv4).Transport().TcpMss().State()); gotTcpMss > mtu1500B || gotTcpMss == 0 { t.Errorf("Obtained TCP MSS for BGP v4 on dut2 is not as expected, got %v, want non zero value and less then %v", gotTcpMss, mtu1500B) diff --git a/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/metadata.textproto b/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/metadata.textproto index 8b024b48147..661b420ddf1 100644 --- a/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/metadata.textproto +++ b/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/metadata.textproto @@ -30,4 +30,4 @@ platform_exceptions: { interface_enabled: true } } -tags: TAGS_AGGREGATION \ No newline at end of file +tags: TAGS_AGGREGATION diff --git a/internal/deviations/deviations.go b/internal/deviations/deviations.go index d9bc66a8697..6360623fd37 100644 --- a/internal/deviations/deviations.go +++ b/internal/deviations/deviations.go @@ -597,8 +597,8 @@ func ISISCounterPartChangesUnsupported(dut *ondatra.DUTDevice) bool { return lookupDUTDeviations(dut).GetIsisCounterPartChangesUnsupported() } -// SkipTcpNegotiatedMssCheck returns true for devices that do not +// SkipTCPNegotiatedMssCheck returns true for devices that do not // support telemetry to check negotiated tcp mss value. -func SkipTcpNegotiatedMssCheck(dut *ondatra.DUTDevice) bool { - return lookupDUTDeviations(dut).GetSkipTcpNegotiatedMssCheck() +func SkipTCPNegotiatedMssCheck(dut *ondatra.DUTDevice) bool { + return lookupDUTDeviations(dut).GetSkipTCPNegotiatedMssCheck() } diff --git a/proto/metadata_go_proto/metadata.pb.go b/proto/metadata_go_proto/metadata.pb.go index 246e71fb9b6..21ae11facaa 100644 --- a/proto/metadata_go_proto/metadata.pb.go +++ b/proto/metadata_go_proto/metadata.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0 -// protoc v3.19.3 +// protoc-gen-go v1.31.0 +// protoc v3.6.1 // source: metadata.proto package metadata_go_proto From 6b5b510c6238953903181616deda562e11cf8146 Mon Sep 17 00:00:00 2001 From: cprabha Date: Fri, 15 Sep 2023 12:40:18 -0700 Subject: [PATCH 22/25] Fixing conflicts --- internal/deviations/deviations.go | 2 +- proto/metadata_go_proto/metadata.pb.go | 79 +++++++++++++------------- 2 files changed, 42 insertions(+), 39 deletions(-) diff --git a/internal/deviations/deviations.go b/internal/deviations/deviations.go index aea0569d0ad..3d869bf5cd3 100644 --- a/internal/deviations/deviations.go +++ b/internal/deviations/deviations.go @@ -600,7 +600,7 @@ func ISISCounterPartChangesUnsupported(dut *ondatra.DUTDevice) bool { // SkipTCPNegotiatedMssCheck returns true for devices that do not // support telemetry to check negotiated tcp mss value. func SkipTCPNegotiatedMssCheck(dut *ondatra.DUTDevice) bool { - return lookupDUTDeviations(dut).GetSkipTCPNegotiatedMssCheck() + return lookupDUTDeviations(dut).GetSkipTcpNegotiatedMssCheck() } // TransceiverThresholdsUnsupported returns true if the device does not support threshold container under /components/component/transceiver. diff --git a/proto/metadata_go_proto/metadata.pb.go b/proto/metadata_go_proto/metadata.pb.go index 7d7fb290ffc..25f8b55fc51 100644 --- a/proto/metadata_go_proto/metadata.pb.go +++ b/proto/metadata_go_proto/metadata.pb.go @@ -1305,7 +1305,6 @@ func (x *Metadata_Deviations) GetIsisCounterPartChangesUnsupported() bool { return false } - func (x *Metadata_Deviations) GetSkipTcpNegotiatedMssCheck() bool { if x != nil { return x.SkipTcpNegotiatedMssCheck @@ -1383,7 +1382,7 @@ var file_metadata_proto_rawDesc = []byte{ 0x74, 0x69, 0x6e, 0x67, 0x1a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6f, 0x6e, 0x64, 0x61, 0x74, 0x72, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x62, 0x65, - 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa4, 0x3d, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf2, 0x3d, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, @@ -1414,7 +1413,7 @@ var file_metadata_proto_rawDesc = []byte{ 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x0e, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, - 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x1a, 0xd8, 0x35, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, + 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x1a, 0xa6, 0x36, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x69, 0x70, 0x76, 0x34, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, @@ -1840,42 +1839,46 @@ var file_metadata_proto_rawDesc = []byte{ 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x55, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x40, 0x0a, 0x1d, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x74, 0x63, 0x70, 0x5f, 0x6e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x6d, 0x73, 0x73, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x6c, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x6d, 0x73, 0x73, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x6d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x73, 0x6b, 0x69, 0x70, 0x54, 0x63, 0x70, 0x4e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, - 0x65, 0x64, 0x4d, 0x73, 0x73, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4a, 0x04, 0x08, 0x54, 0x10, 0x55, - 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x1c, 0x10, 0x1d, 0x4a, 0x04, 0x08, 0x5a, - 0x10, 0x5b, 0x1a, 0xa0, 0x01, 0x0a, 0x12, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, - 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x08, 0x70, 0x6c, 0x61, - 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x70, - 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, - 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, - 0x72, 0x6d, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x47, 0x0a, 0x0a, - 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x44, - 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xc7, 0x01, 0x0a, 0x07, 0x54, 0x65, 0x73, 0x74, 0x62, 0x65, - 0x64, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x45, - 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x54, - 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x34, - 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x45, 0x53, 0x54, 0x42, - 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x32, 0x4c, 0x49, 0x4e, 0x4b, - 0x53, 0x10, 0x03, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, - 0x55, 0x54, 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x34, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x04, 0x12, - 0x1e, 0x0a, 0x1a, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x41, - 0x54, 0x45, 0x5f, 0x39, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x5f, 0x4c, 0x41, 0x47, 0x10, 0x05, 0x12, - 0x1e, 0x0a, 0x1a, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x44, - 0x55, 0x54, 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x32, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x06, 0x22, - 0x6d, 0x0a, 0x04, 0x54, 0x61, 0x67, 0x73, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x47, 0x53, 0x5f, - 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, - 0x10, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x41, 0x47, 0x47, 0x52, 0x45, 0x47, 0x41, 0x54, 0x49, 0x4f, - 0x4e, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x44, 0x41, 0x54, 0x41, - 0x43, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x5f, 0x45, 0x44, 0x47, 0x45, 0x10, 0x02, 0x12, 0x0d, 0x0a, - 0x09, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x45, 0x44, 0x47, 0x45, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, - 0x54, 0x41, 0x47, 0x53, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x54, 0x10, 0x04, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, - + 0x65, 0x64, 0x4d, 0x73, 0x73, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x4c, 0x0a, 0x22, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, + 0x6f, 0x6c, 0x64, 0x73, 0x5f, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, + 0x18, 0x6c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x72, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x55, 0x6e, 0x73, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x4a, 0x04, 0x08, 0x54, 0x10, 0x55, 0x4a, 0x04, + 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x1c, 0x10, 0x1d, 0x4a, 0x04, 0x08, 0x5a, 0x10, 0x5b, + 0x1a, 0xa0, 0x01, 0x0a, 0x12, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x78, 0x63, + 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, + 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x70, 0x65, 0x6e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x47, 0x0a, 0x0a, 0x64, 0x65, + 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, + 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x65, 0x76, + 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x22, 0xc7, 0x01, 0x0a, 0x07, 0x54, 0x65, 0x73, 0x74, 0x62, 0x65, 0x64, 0x12, + 0x17, 0x0a, 0x13, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x45, 0x53, 0x54, + 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x45, 0x53, + 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x34, 0x4c, 0x49, + 0x4e, 0x4b, 0x53, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, + 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x32, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x10, + 0x03, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, + 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x34, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x04, 0x12, 0x1e, 0x0a, + 0x1a, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x41, 0x54, 0x45, + 0x5f, 0x39, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x5f, 0x4c, 0x41, 0x47, 0x10, 0x05, 0x12, 0x1e, 0x0a, + 0x1a, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x44, 0x55, 0x54, + 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x32, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x06, 0x22, 0x6d, 0x0a, + 0x04, 0x54, 0x61, 0x67, 0x73, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, + 0x41, 0x47, 0x53, 0x5f, 0x41, 0x47, 0x47, 0x52, 0x45, 0x47, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, + 0x01, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x43, 0x45, + 0x4e, 0x54, 0x45, 0x52, 0x5f, 0x45, 0x44, 0x47, 0x45, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x54, + 0x41, 0x47, 0x53, 0x5f, 0x45, 0x44, 0x47, 0x45, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x41, + 0x47, 0x53, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x54, 0x10, 0x04, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( From 6d35a66243df0246e538ba7434bfd158751e90cb Mon Sep 17 00:00:00 2001 From: cprabha Date: Tue, 19 Sep 2023 17:45:41 -0700 Subject: [PATCH 23/25] REsolved conflicts and updated README --- .../otg_tests/bgp_tcp_mss_path_mtu/README.md | 6 +- proto/metadata.proto | 2 +- proto/metadata_go_proto/metadata.pb.go | 127 ++++++------------ 3 files changed, 47 insertions(+), 88 deletions(-) diff --git a/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md b/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md index 3f5f5543bb8..45457c0b801 100644 --- a/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md +++ b/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md @@ -19,9 +19,9 @@ * Configure IP TCP MSS value of 4096 bytes on the DUT1:port1. * Re-establish the EBGP sessions by tcp reset. * Verify that the TCP MSS value is set to 4096 bytes for the IPv4 and IPv6 EBGP sessions. -* Establish iBGP session with MD5 enabled between ATE:port1 and DUT2:port2. -* Ensure that the MTU on the DUT1:port1 towards ATE1:port1 is left at default (1500B) while the ATE1:port1 interface towards DUT1:port1 is set at 5040B. Please also make sure that the DUT2:port2 MTU is set at 5040B as well. -* Enable PMTUD on DUT2:port2. +* Establish iBGP session with MD5 enabled between ATE:port1 and DUT2:port1. +* Ensure that the MTU on the DUT1:port1 towards ATE1:port1 is left at default (1500B) while the ATE1:port1 interface towards DUT1:port1 is set at 5040B. Please also make sure that the DUT2:port1 MTU is set at 5040B as well. +* Enable PMTUD on DUT2:port1. * Re-establish the IBGP sessions by tcp reset. * Validate that the min MSS value has been adjusted to be below 1500 bytes on the tcp session. diff --git a/proto/metadata.proto b/proto/metadata.proto index 296ff3485b6..d50d1997d52 100644 --- a/proto/metadata.proto +++ b/proto/metadata.proto @@ -329,7 +329,7 @@ message Metadata { bool isis_counter_part_changes_unsupported = 107; // Devices do not support showing negotiated tcp mss value in bgp tcp mss telemetry. // Juniper: b/300499125 - bool skip_tcp_negotiated_mss_check = 109; + bool skip_tcp_negotiated_mss_check = 110; // Devices do not support threshold container under /components/component/transceiver. bool transceiver_thresholds_unsupported = 108; // Update interface loopback mode using raw gnmi API due to server version. diff --git a/proto/metadata_go_proto/metadata.pb.go b/proto/metadata_go_proto/metadata.pb.go index b83a0fa9794..37d29aab7ee 100644 --- a/proto/metadata_go_proto/metadata.pb.go +++ b/proto/metadata_go_proto/metadata.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0 -// protoc v3.19.3 +// protoc-gen-go v1.31.0 +// protoc v3.6.1 // source: metadata.proto package metadata_go_proto @@ -596,7 +596,7 @@ type Metadata_Deviations struct { IsisCounterPartChangesUnsupported bool `protobuf:"varint,107,opt,name=isis_counter_part_changes_unsupported,json=isisCounterPartChangesUnsupported,proto3" json:"isis_counter_part_changes_unsupported,omitempty"` // Devices do not support showing negotiated tcp mss value in bgp tcp mss telemetry. // Juniper: b/300499125 - SkipTcpNegotiatedMssCheck bool `protobuf:"varint,109,opt,name=skip_tcp_negotiated_mss_check,json=skipTcpNegotiatedMssCheck,proto3" json:"skip_tcp_negotiated_mss_check,omitempty"` + SkipTcpNegotiatedMssCheck bool `protobuf:"varint,110,opt,name=skip_tcp_negotiated_mss_check,json=skipTcpNegotiatedMssCheck,proto3" json:"skip_tcp_negotiated_mss_check,omitempty"` // Devices do not support threshold container under /components/component/transceiver. TransceiverThresholdsUnsupported bool `protobuf:"varint,108,opt,name=transceiver_thresholds_unsupported,json=transceiverThresholdsUnsupported,proto3" json:"transceiver_thresholds_unsupported,omitempty"` // Update interface loopback mode using raw gnmi API due to server version. @@ -1391,8 +1391,7 @@ var file_metadata_proto_rawDesc = []byte{ 0x74, 0x69, 0x6e, 0x67, 0x1a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6f, 0x6e, 0x64, 0x61, 0x74, 0x72, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x62, 0x65, - 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf2, 0x3d, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf8, 0x3d, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xba, 0x3e, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, @@ -1423,8 +1422,7 @@ var file_metadata_proto_rawDesc = []byte{ 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x0e, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, - 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x1a, 0xa6, 0x36, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, - 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x1a, 0xac, 0x36, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, + 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x1a, 0xee, 0x36, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x69, 0x70, 0x76, 0x34, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, @@ -1850,89 +1848,50 @@ var file_metadata_proto_rawDesc = []byte{ 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x55, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x40, 0x0a, 0x1d, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x74, 0x63, 0x70, 0x5f, 0x6e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x6d, 0x73, 0x73, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x6d, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x6d, 0x73, 0x73, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x6e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x73, 0x6b, 0x69, 0x70, 0x54, 0x63, 0x70, 0x4e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x73, 0x73, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x4c, 0x0a, 0x22, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x5f, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x6c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x55, 0x6e, 0x73, - 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x4a, 0x04, 0x08, 0x54, 0x10, 0x55, 0x4a, 0x04, - 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x1c, 0x10, 0x1d, 0x4a, 0x04, 0x08, 0x5a, 0x10, 0x5b, - 0x1a, 0xa0, 0x01, 0x0a, 0x12, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x78, 0x63, - 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, - 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x70, 0x65, 0x6e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, - 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x47, 0x0a, 0x0a, 0x64, 0x65, - 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, - 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x65, 0x76, - 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x22, 0xc7, 0x01, 0x0a, 0x07, 0x54, 0x65, 0x73, 0x74, 0x62, 0x65, 0x64, 0x12, - 0x17, 0x0a, 0x13, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x45, 0x53, 0x54, - 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x45, 0x53, - 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x34, 0x4c, 0x49, - 0x4e, 0x4b, 0x53, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, - 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x32, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x10, - 0x03, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, - 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x34, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x04, 0x12, 0x1e, 0x0a, - 0x1a, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x41, 0x54, 0x45, - 0x5f, 0x39, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x5f, 0x4c, 0x41, 0x47, 0x10, 0x05, 0x12, 0x1e, 0x0a, - 0x1a, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x44, 0x55, 0x54, - 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x32, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x06, 0x22, 0x6d, 0x0a, - 0x04, 0x54, 0x61, 0x67, 0x73, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, - 0x41, 0x47, 0x53, 0x5f, 0x41, 0x47, 0x47, 0x52, 0x45, 0x47, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, - 0x01, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x43, 0x45, - 0x4e, 0x54, 0x45, 0x52, 0x5f, 0x45, 0x44, 0x47, 0x45, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x54, - 0x41, 0x47, 0x53, 0x5f, 0x45, 0x44, 0x47, 0x45, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x41, - 0x47, 0x53, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x54, 0x10, 0x04, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -======= - 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x4c, 0x0a, 0x22, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, - 0x64, 0x73, 0x5f, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x6c, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x65, 0x69, 0x76, 0x65, - 0x72, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x55, 0x6e, 0x73, 0x75, 0x70, - 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x46, 0x0a, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, - 0x61, 0x63, 0x65, 0x5f, 0x6c, 0x6f, 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x6d, 0x6f, 0x64, - 0x65, 0x5f, 0x72, 0x61, 0x77, 0x5f, 0x67, 0x6e, 0x6d, 0x69, 0x18, 0x6d, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x1c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x4c, 0x6f, 0x6f, 0x70, 0x62, - 0x61, 0x63, 0x6b, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x61, 0x77, 0x47, 0x6e, 0x6d, 0x69, 0x4a, 0x04, - 0x08, 0x54, 0x10, 0x55, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x1c, 0x10, 0x1d, - 0x4a, 0x04, 0x08, 0x5a, 0x10, 0x5b, 0x1a, 0xa0, 0x01, 0x0a, 0x12, 0x50, 0x6c, 0x61, 0x74, 0x66, - 0x6f, 0x72, 0x6d, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, - 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x25, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6c, - 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, - 0x12, 0x47, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0a, 0x64, - 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xc7, 0x01, 0x0a, 0x07, 0x54, 0x65, - 0x73, 0x74, 0x62, 0x65, 0x64, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, - 0x0a, 0x0b, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x10, 0x01, 0x12, - 0x1a, 0x0a, 0x16, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x44, - 0x55, 0x54, 0x5f, 0x34, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x54, - 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x32, - 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x03, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x45, 0x53, 0x54, 0x42, - 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x34, 0x4c, 0x49, 0x4e, 0x4b, - 0x53, 0x10, 0x04, 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, - 0x55, 0x54, 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x39, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x5f, 0x4c, 0x41, - 0x47, 0x10, 0x05, 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, - 0x55, 0x54, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x32, 0x4c, 0x49, 0x4e, 0x4b, - 0x53, 0x10, 0x06, 0x22, 0x6d, 0x0a, 0x04, 0x54, 0x61, 0x67, 0x73, 0x12, 0x14, 0x0a, 0x10, 0x54, - 0x41, 0x47, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x41, 0x47, 0x47, 0x52, 0x45, 0x47, - 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x41, 0x47, 0x53, 0x5f, - 0x44, 0x41, 0x54, 0x41, 0x43, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x5f, 0x45, 0x44, 0x47, 0x45, 0x10, - 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x45, 0x44, 0x47, 0x45, 0x10, 0x03, - 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x54, - 0x10, 0x04, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x46, 0x0a, 0x20, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x6c, 0x6f, 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x6d, + 0x6f, 0x64, 0x65, 0x5f, 0x72, 0x61, 0x77, 0x5f, 0x67, 0x6e, 0x6d, 0x69, 0x18, 0x6d, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x1c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x4c, 0x6f, 0x6f, + 0x70, 0x62, 0x61, 0x63, 0x6b, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x61, 0x77, 0x47, 0x6e, 0x6d, 0x69, + 0x4a, 0x04, 0x08, 0x54, 0x10, 0x55, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x1c, + 0x10, 0x1d, 0x4a, 0x04, 0x08, 0x5a, 0x10, 0x5b, 0x1a, 0xa0, 0x01, 0x0a, 0x12, 0x50, 0x6c, 0x61, + 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x41, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, + 0x72, 0x6d, 0x12, 0x47, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x0a, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xc7, 0x01, 0x0a, 0x07, + 0x54, 0x65, 0x73, 0x74, 0x62, 0x65, 0x64, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x45, 0x53, 0x54, 0x42, + 0x45, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x10, + 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, + 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x34, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x02, 0x12, 0x1a, 0x0a, + 0x16, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x41, 0x54, 0x45, + 0x5f, 0x32, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x03, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x45, 0x53, + 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x34, 0x4c, 0x49, + 0x4e, 0x4b, 0x53, 0x10, 0x04, 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, + 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x39, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x5f, + 0x4c, 0x41, 0x47, 0x10, 0x05, 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, + 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x32, 0x4c, 0x49, + 0x4e, 0x4b, 0x53, 0x10, 0x06, 0x22, 0x6d, 0x0a, 0x04, 0x54, 0x61, 0x67, 0x73, 0x12, 0x14, 0x0a, + 0x10, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x41, 0x47, 0x47, 0x52, + 0x45, 0x47, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x41, 0x47, + 0x53, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x43, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x5f, 0x45, 0x44, 0x47, + 0x45, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x45, 0x44, 0x47, 0x45, + 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, + 0x49, 0x54, 0x10, 0x04, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( From f0ac7cfa04cf7aa9ad868bdd5d45e949584804b8 Mon Sep 17 00:00:00 2001 From: cprabha Date: Thu, 21 Sep 2023 09:04:50 -0700 Subject: [PATCH 24/25] updated pkg name --- .../bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go b/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go index 939a466627f..863fab77632 100644 --- a/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go +++ b/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package bgp_tcp_mss_path_mtu_otg_test +package bgp_tcp_mss_path_mtu_test import ( "fmt" @@ -194,7 +194,6 @@ func configureISIS(t *testing.T, dut *ondatra.DUTDevice, intfName []string, dutA } func configureOTG(t *testing.T, otg *otg.OTG) gosnappi.Config { - config := otg.NewConfig(t) port1 := config.Ports().Add().SetName("port1") @@ -229,7 +228,6 @@ func configureOTG(t *testing.T, otg *otg.OTG) gosnappi.Config { } func configOTG(t *testing.T, otg *otg.OTG) gosnappi.Config { - config := otg.NewConfig(t) port1 := config.Ports().Add().SetName("port1") From ab93a91cdb013f7280253ca5d3961ae71f4ebbbc Mon Sep 17 00:00:00 2001 From: cprabha Date: Thu, 21 Sep 2023 09:17:52 -0700 Subject: [PATCH 25/25] updated with review comments --- .../bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go | 4 ++-- internal/deviations/deviations.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go b/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go index 863fab77632..4b5ed1fcc14 100644 --- a/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go +++ b/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go @@ -322,7 +322,7 @@ func TestTcpMssPathMtu(t *testing.T) { }) dut1Port1Path := gnmi.OC().Interface(dut1.Port(t, "port1").Name()) - if !deviations.SkipTCPNegotiatedMssCheck(dut1) { + if !deviations.SkipTCPNegotiatedMSSCheck(dut1) { t.Run("Verify that the default TCP MSS value is set below the default interface MTU value.", func(t *testing.T) { // Fetch interface MTU value to compare negotiated tcp mss. gotIntfMTU := gnmi.Get(t, dut1, dut1Port1Path.Mtu().State()) @@ -423,7 +423,7 @@ func TestTcpMssPathMtu(t *testing.T) { verifyBGPTelemetry(t, dut2, dut2NbrIP) }) - if !deviations.SkipTCPNegotiatedMssCheck(dut2) { + if !deviations.SkipTCPNegotiatedMSSCheck(dut2) { t.Run("Validate that the min MSS value has been adjusted to be below 1500 bytes on the tcp session.", func(t *testing.T) { if gotTcpMss := gnmi.Get(t, dut2, dut2ConfPath.Bgp().Neighbor(atePort1.IPv4).Transport().TcpMss().State()); gotTcpMss > mtu1500B || gotTcpMss == 0 { t.Errorf("Obtained TCP MSS for BGP v4 on dut2 is not as expected, got %v, want non zero value and less then %v", gotTcpMss, mtu1500B) diff --git a/internal/deviations/deviations.go b/internal/deviations/deviations.go index b87f4194e39..90b341b0d63 100644 --- a/internal/deviations/deviations.go +++ b/internal/deviations/deviations.go @@ -599,7 +599,7 @@ func ISISCounterPartChangesUnsupported(dut *ondatra.DUTDevice) bool { // SkipTCPNegotiatedMssCheck returns true for devices that do not // support telemetry to check negotiated tcp mss value. -func SkipTCPNegotiatedMssCheck(dut *ondatra.DUTDevice) bool { +func SkipTCPNegotiatedMSSCheck(dut *ondatra.DUTDevice) bool { return lookupDUTDeviations(dut).GetSkipTcpNegotiatedMssCheck() }