Skip to content

gribi/hashing_test: add dataplane hashing test with physical/software… - #5884

Open
singhh07 wants to merge 1 commit into
openconfig:mainfrom
singhh07:add_hashing_test
Open

gribi/hashing_test: add dataplane hashing test with physical/software…#5884
singhh07 wants to merge 1 commit into
openconfig:mainfrom
singhh07:add_hashing_test

Conversation

@singhh07

@singhh07 singhh07 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds automated dataplane hashing test (Hashing) verifying traffic distribution across multiple Network Instances (Default, Transit, Self-Site, Egress) using a mix of physical loopback pairs and dynamically discovered software loopback interfaces with Link Aggregation Groups (LAGs).

Changes

  • Added test implementation in feature/gribi/otg_tests/hashing_test/hashing_test.go
  • Updated test metadata & vendor deviations in feature/gribi/otg_tests/hashing_test/metadata.textproto
  • Synced test registry entry in testregistry.textproto

Validation

  • gofmt & goimports clean
  • revive lint clean
  • IP documentation address rules verified (RFC 5737 / RFC 2544)
  • README OC Path & Canonical OC specs validated

@singhh07
singhh07 requested review from a team as code owners August 11, 2026 10:17
@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 a new dataplane hashing test suite designed to verify traffic distribution across multiple paths using physical and software loopbacks. The changes include the core test logic, necessary platform-specific configuration deviations, and the required updates to the test registry to support automated test execution.

Highlights

  • New Test Implementation: Added hashing_test.go to implement comprehensive dataplane hashing tests utilizing both physical and software loopbacks.
  • Metadata Updates: Updated metadata.textproto to include platform-specific deviations for Cisco, Arista, and Nokia, ensuring cross-platform compatibility.
  • Test Registration: Registered the new hashing test in testregistry.textproto to enable automated execution.
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.

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

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.

Code Review

This pull request introduces a new dataplane hashing test (hashing_test.go) that utilizes physical and software loopbacks to verify traffic distribution across multiple stages using gRIBI and OTG. It also updates the test registry and metadata with platform-specific deviations. Feedback on the implementation highlights critical style guide violations and performance optimizations: first, a static sleep should be replaced with otgutils.WaitForARP before starting traffic to ensure proper neighbor resolution; second, the helper functions getPhysicalPortCounters and getEgressPacketsPhys should be refactored to use gnmi.OCBatch() to eliminate the 'N+1' query anti-pattern caused by calling gnmi.Lookup inside loops.

Comment thread feature/gribi/otg_tests/hashing_test/hashing_test.go
Comment thread feature/gribi/otg_tests/hashing_test/hashing_test.go
Comment thread feature/gribi/otg_tests/hashing_test/hashing_test.go
@singhh07
singhh07 force-pushed the add_hashing_test branch 2 times, most recently from e8a1c06 to 4a8c82c Compare August 11, 2026 19:18
@navaneethyv

Copy link
Copy Markdown
Contributor

/gemini review

@navaneethyv
navaneethyv requested a review from alokmtri-g August 12, 2026 13:17
@navaneethyv

Copy link
Copy Markdown
Contributor

@alokmtri-g to take it to green as this is a critical test for us.

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

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.

Code Review

This pull request introduces a new dataplane hashing test (hashing_test.go) using physical and software loopbacks across multiple VRFs, along with corresponding metadata and registry updates. The code review identified several important issues: a lifecycle ordering bug where the gRIBI client is closed before the cleanup flush runs, a performance anti-pattern of serial gNMI operations during cleanup that should be batched, an unnecessary static sleep after starting traffic, and a potential nil pointer dereference when checking subinterfaces.

Comment thread feature/gribi/otg_tests/hashing_test/hashing_test.go
Comment thread feature/gribi/otg_tests/hashing_test/hashing_test.go
Comment thread feature/gribi/otg_tests/hashing_test/hashing_test.go Outdated
Comment thread feature/gribi/otg_tests/hashing_test/hashing_test.go
@navaneethyv

Copy link
Copy Markdown
Contributor

/gemini review

@navaneethyv

navaneethyv commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Please add passing logs for all vendors for taking this to green, please mention the run time of this test.

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

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.

Code Review

This pull request introduces a new test for dataplane hashing with physical and software loopbacks in the feature/gribi/otg_tests/hashing_test directory. It includes the implementation of the test logic, updates to the metadata for platform-specific deviations, and registration of the new test in the test registry. I have no feedback to provide as there were no review comments.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants