Skip to content

[WIP] Giro/pf 1.22 cisco patch#5506

Draft
karthikeya-remilla wants to merge 8 commits into
openconfig:mainfrom
b4firex:giro/pf-1.22-cisco-patch
Draft

[WIP] Giro/pf 1.22 cisco patch#5506
karthikeya-remilla wants to merge 8 commits into
openconfig:mainfrom
b4firex:giro/pf-1.22-cisco-patch

Conversation

@karthikeya-remilla
Copy link
Copy Markdown
Contributor

@karthikeya-remilla karthikeya-remilla commented May 26, 2026

Intermediate fix to test PF-1.22 with IXIA for Cisco DUT

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces necessary infrastructure and configuration updates to enable PF-1.22 testing on Cisco devices. It includes vendor-specific handling for aggregate interfaces, GUE decapsulation via CLI, and improvements to the robustness of protocol startup and traffic verification in the existing test suite.

Highlights

  • Cisco Device Support: Added infrastructure to support Cisco devices in PF-1.22 tests, including vendor-specific LAG naming and GUE decapsulation CLI configuration.
  • Test Robustness: Refactored protocol startup and traffic verification logic to be more resilient, including retries for protocol establishment and improved load-balancing validation.
  • Test Coverage: Updated GUE decapsulation tests to support IPv6 tunnel addresses and refined flow configurations.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the GUE decapsulation and hashing test to support IPv6 outer headers and adds Cisco-specific CLI configurations for decapsulation. Key feedback includes avoiding direct use of dut.Vendor() in favor of the deviations package, removing unnecessary time.Sleep calls, restoring commented-out flow indices to maintain test coverage, cleaning up unused variables and commented-out code, and ensuring all new deviations are tracked with valid issue tracker URLs.

Comment on lines +388 to +391
// TODO: remove this
if dut.Vendor() == ondatra.ARISTA {
cfgplugins.ConfigureLoadbalance(t, dut)
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

Avoid using dut.Vendor() for vendor-specific logic or configurations in tests. Instead, use the deviations package to maintain test abstraction and portability across different vendors. Since load_balance_policy_oc_unsupported is defined as a deviation, you should use deviations.LoadBalancePolicyOCUnsupported(dut) here.

	if deviations.LoadBalancePolicyOCUnsupported(dut) {
		cfgplugins.ConfigureLoadbalance(t, dut)
	}
References
  1. Avoid using "dut.Vendor()" for vendor-specific logic or configurations in tests. Instead, use the "deviations" package to maintain test abstraction and portability across different vendors.

Comment on lines +1108 to +1110
ate.OTG().PushConfig(t, top)
time.Sleep(pushStartWaitTime)
t.Log("Starting protocols...")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Avoid using time.Sleep to wait between pushing config and starting protocols. The style guide recommends using gnmi.Watch with .Await for waiting on conditions, which is already handled by waitForOTGProtocolsUpWithRetry right after starting protocols. This unnecessary sleep adds a 20-second delay to every test run.

Suggested change
ate.OTG().PushConfig(t, top)
time.Sleep(pushStartWaitTime)
t.Log("Starting protocols...")
ate.OTG().PushConfig(t, top)
t.Log("Starting protocols...")
References
  1. Avoid time.Sleep: Use gnmi.Watch with .Await for waiting on conditions. (link)

Comment on lines +177 to +188
activeFlowIndices := []int{
2, // First ECMP case: keep only this forwarding check enabled for now.
// 1,
// 3,
// 4,
// 5,
// 6,
// 7,
// 8,
// 9,
// 10,
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Commenting out almost all flow indices severely reduces test coverage. Please ensure that all test cases/flows are restored and executed before merging this pull request.

}
}
t.Logf("Load balancing has been verified on the LAG interfaces.")
_ = excludeLag
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The excludeLag variable is completely unused now because testLoadBalance no longer accepts it as a parameter. Instead of using the blank identifier _ = excludeLag to suppress the compiler error, please remove the variable and its assignments entirely.

Comment on lines +375 to +376
aggIDsList = append(aggIDsList, AggregateInterfaceIDs[dut.Vendor()][(aggID1)])
//cfgplugins.DeleteAggregate(t, dut, AggregateInterfaceIDs[dut.Vendor()][(aggID1)], dutAggPorts1)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Commented-out code should be removed to keep the codebase clean and maintainable. Also, please avoid using dut.Vendor() directly in tests to maintain vendor abstraction.

Suggested change
aggIDsList = append(aggIDsList, AggregateInterfaceIDs[dut.Vendor()][(aggID1)])
//cfgplugins.DeleteAggregate(t, dut, AggregateInterfaceIDs[dut.Vendor()][(aggID1)], dutAggPorts1)
aggIDsList = append(aggIDsList, AggregateInterfaceIDs[dut.Vendor()][(aggID1)])
References
  1. Avoid using "dut.Vendor()" for vendor-specific logic or configurations in tests. Instead, use the "deviations" package to maintain test abstraction and portability across different vendors.

Comment on lines +384 to +385
aggIDsList = append(aggIDsList, AggregateInterfaceIDs[dut.Vendor()][(aggID2)])
//cfgplugins.DeleteAggregate(t, dut, AggregateInterfaceIDs[dut.Vendor()][(aggID2)], dutAggPorts2)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Commented-out code should be removed to keep the codebase clean and maintainable. Also, please avoid using dut.Vendor() directly in tests to maintain vendor abstraction.

Suggested change
aggIDsList = append(aggIDsList, AggregateInterfaceIDs[dut.Vendor()][(aggID2)])
//cfgplugins.DeleteAggregate(t, dut, AggregateInterfaceIDs[dut.Vendor()][(aggID2)], dutAggPorts2)
aggIDsList = append(aggIDsList, AggregateInterfaceIDs[dut.Vendor()][(aggID2)])
References
  1. Avoid using "dut.Vendor()" for vendor-specific logic or configurations in tests. Instead, use the "deviations" package to maintain test abstraction and portability across different vendors.

Comment thread proto/metadata.proto
bool prefix_limit_exceeded_telemetry_unsupported = 139;
// Skip setting allow-multiple-as while configuring eBGP
// Arista: partnerissuetracker.corp.google.com/issues/317422300
// TODO CISCO: Add bug here
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Deviations must be tracked with an issue tracker URL. Please replace this placeholder TODO with a valid issue tracker link (e.g., https://issuetracker.google.com/issues/xxxxx or https://github.com/openconfig/featureprofiles/issues/xxxxx).

References
  1. Add a comment to the accessor function containing a URL link to an issue tracker which tracks removal of the deviation. The format should be https://issuetracker.google.com/issues/xxxxx. (link)

Comment thread proto/metadata.proto
bool macsec_unsupported = 279;

// Arista b/390506900
// TODO: Add Cisco bug here
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Deviations must be tracked with an issue tracker URL. Please replace this placeholder TODO with a valid issue tracker link (e.g., https://issuetracker.google.com/issues/xxxxx or https://github.com/openconfig/featureprofiles/issues/xxxxx).

References
  1. Add a comment to the accessor function containing a URL link to an issue tracker which tracks removal of the deviation. The format should be https://issuetracker.google.com/issues/xxxxx. (link)

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants