Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OTG Test - RT-1.4: BGP Graceful Restart #1509

Open
wants to merge 193 commits into
base: main
Choose a base branch
from

Conversation

octpetre
Copy link
Contributor

@octpetre octpetre commented May 3, 2023

OTG Test conversion of RT-1.4: BGP Graceful Restart
Resolves #580
The ACL sections were replaced by the "Initiate graceful restart" in the case of DUT helper and "gnoi restart pid" in case of DUT restart initiator

@octpetre octpetre requested review from a team as code owners May 3, 2023 21:58
@octpetre octpetre requested a review from thesrinath May 3, 2023 21:58
@coveralls
Copy link

coveralls commented Jul 16, 2024

Pull Request Test Coverage Report for Build 12184701459

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 55.268%

Totals Coverage Status
Change from base Build 12183513739: 0.0%
Covered Lines: 1983
Relevant Lines: 3588

💛 - Coveralls

@octpetre octpetre marked this pull request as ready for review July 23, 2024 19:57
@octpetre
Copy link
Contributor Author

@sachendras could you please review the corrections I've made to the README file. I'm assuming we would want to run 1.4.5 for both IBGP and EBGP. Also for tests 1.4.7 through 1.4.10 when testing EBGP I'm assuming the direction of traffic is ATE port2 - ATE Port1 (EBGP routes). In this case the notification will be sent from DUT port1

@jasdeep-hundal jasdeep-hundal dismissed their stale review September 12, 2024 03:44

Outdated review.

}

func TestBGPPGracefulRestart(t *testing.T) {
cases := []struct {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move these cases before the RT-1.4.1 test so that they are defined closer to where they are used.


srcBgp := srcDev.Bgp().SetRouterId(srcIpv4.Address())
srcBgp4Peer := srcBgp.Ipv4Interfaces().Add().SetIpv4Name(srcIpv4.Name()).Peers().Add().SetName(ateSrc.Name + ".BGP4.peer")
srcBgp4Peer.Advanced().SetKeepAliveInterval(keepaliveTimer).SetHoldTimeInterval(3 * keepaliveTimer)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a comment is worth it here explaining the relationship between the keep alive/hold time values? I think it's implied in the README, but will make it easier to understand the code.

Comment on lines +404 to +406
// ate.OTG().StartProtocols(t)
t.Log("Pushing config to ATE and starting protocols...")

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment/commented out code can both be dropped.

pgGrV4.Enabled = ygot.Bool(true)
pgGrV4.RestartTime = ygot.Uint16(grRestartTime)
pgGrV4.StaleRoutesTime = ygot.Uint16(grStaleRouteTime)
// pg.PeerAs = ygot.Uint32(ateAS)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be removed?

pgGrV6.Enabled = ygot.Bool(true)
pgGrV6.RestartTime = ygot.Uint16(grRestartTime)
pgGrV6.StaleRoutesTime = ygot.Uint16(grStaleRouteTime)
// pgv6.PeerAs = ygot.Uint32(ateAS)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be removed?

Comment on lines +197 to +198
pgGrV4.RestartTime = ygot.Uint16(grRestartTime)
pgGrV4.StaleRoutesTime = ygot.Uint16(grStaleRouteTime)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These (RestartTime and StaleRoutesTime) are indicated in the README as set at the 'global' level. (I believe the existing ATE test does do that.) Might also imply changes in checkBgpGRConfig?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we do wind up sending traffic from both ATE interfaces, do we want to rename config in general to reflect IBGP vs. EBGP instead? (Eg. srcEth -> iBGPEth maybe).

@octpetre octpetre requested a review from dplore as a code owner September 25, 2024 15:48
t.Log("Configure/update Network Instance")
fptest.ConfigureDefaultNetworkInstance(t, dut)

if deviations.ExplicitPortSpeed(dut) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This deviation can be removed

vendor: NOKIA
}
deviations: {
explicit_port_speed: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be removed, please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OTG: RT-1.4: BGP Graceful Restart
7 participants