Skip to content

Update the dataplane hashing test README to cover more traffic profile and test scenario - #5954

Open
singhh07 wants to merge 4 commits into
openconfig:mainfrom
singhh07:singhh07-hashing-readme-update
Open

Update the dataplane hashing test README to cover more traffic profile and test scenario#5954
singhh07 wants to merge 4 commits into
openconfig:mainfrom
singhh07:singhh07-hashing-readme-update

Conversation

@singhh07

@singhh07 singhh07 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Update the dataplane hashing test README to cover more traffic profile and test scenario

Summary

This PR updates the test plan specification in feature/gribi/otg_tests/hashing_test/README.md to define Dataplane Hashing verification (ECMP, WCMP, and Intra-LAG load balancing) using a combination of physical loopback pairs and software terminal loopback interfaces across multiple Network Instances (DEFAULT, TRANSIT, SELF_SITE, EGRESS) with different traffic profiles.

1. Traffic Profiles

  • Plain IPv4/IPv6: Evaluates native 5-tuple L3/L4 entropy across destination IP, source IP, and UDP ports.
  • IPnIP Encapsulation (Encap): Uses static outer IP endpoints (0 outer entropy) with randomized 5-tuple inner payload to verify inner-header hash computation and prevent tunnel polarization.

2. Tolerance & Evaluation Criteria

Standardized the acceptable distribution threshold across all next-hops and member links to a $\pm 2%$ relative tolerance:
$$\text{Acceptable Ratio Range} = \text{Expected Ratio} \times (1 \pm 0.02)$$

3. Test Scenarios

Scenario 1: Multi-Stage Max Fan-out (8-Wide ECMP & WCMP)

  • Sub-case 1.1: 8-Wide Uniform ECMP:
    • Uniform distribution across all 8 next-hops (~12.50% each, acceptable range: 12.25% – 12.75%) across TRANSIT and SELF_SITE VRFs.
  • Sub-case 1.2: Equal Paths, Unequal Weights (1:2 WCMP Ratio):
    • Stage 2 (TRANSIT) (4 Physical Loops @ weight 2 + 4 Soft Loops @ weight 1 $\rightarrow$ Total weight 12):
      • Physical Loops (4 ports): ~16.67% each (acceptable range: 16.33% – 17.00%)
      • Soft Loops (4 ports): ~8.33% each (acceptable range: 8.16% – 8.50%)
    • Stage 3 (SELF_SITE) (3 Physical Loops @ weight 2 + 5 Soft Loops @ weight 1 $\rightarrow$ Total weight 11):
      • Physical Loops (3 ports): ~18.18% each (acceptable range: 17.82% – 18.54%)## Description
        This PR updates the test plan and specification in feature/gribi/otg_tests/hashing_test/README.md to comprehensively cover dataplane hashing test cases, including tunnel encapsulation/decapsulation handling, weighted cost multi-pathing (WCMP), and asymmetric Link Aggregation Group (LAG) member capacity. ## Key Updates
  1. Traffic Profiles:
    • Plain IPv4/IPv6: Evaluates native 5-tuple L3/L4 entropy.
    • IPnIP Encapsulation (Encap): Uses static outer IP endpoints (0 outer entropy) with randomized 5-tuple inner payload to verify inner-header hash computation and prevent tunnel polarization.
    • IPnIP Decapsulation (Decap): Matches gRIBI decapsulation routes to verify post-decap inner-header hashing.
  2. Tolerance and Evaluation Criteria:
    • Standardized the acceptable distribution threshold to $\pm 2%$ relative tolerance ($\text{Expected Ratio} \times (1 \pm 0.02)$).
  3. Test Scenarios:
    • Scenario 1 (8-Wide ECMP & WCMP): - Sub-case 1.1: 8-Wide Uniform ECMP ($\sim 12.5%$ per next-hop). - Sub-case 1.2: Equal Paths, Unequal Weights ($1:2$ ratio $\rightarrow \sim 8.3%$ on soft loops vs. $\sim 16.6%$ on physical loops).
    • Scenario 2 (Intra-LAG Member Distribution):
      • Uniform distribution across a 7-member LAG bundle ($\sim 14.28%$ per link).
    • Scenario 3 (Asymmetric Paths & Weighted Load Balancing — 3-Wide LAGs): - Sub-case 3.1 (Capacity-Based Weights — 3:2:2): Matches physical member counts ($\sim 42.86%, \sim 28.57%, \sim 28.57%$). - Sub-case 3.2 (Overriding Capacity / Equal Weights — 1:1:1): Verifies software weights strictly override physical member capacity ($\sim 33.33%$ split per LAG).
  4. OpenConfig Coverage:
    • Added OpenConfig telemetry paths for loopback-mode, aggregate LAG attributes, ACL bindings, and gRIBI / gNMI RPCs.

…ap, and IPnIP Decap traffic flows, along with WCMP and asymmetric capacity

## Description
This PR updates the test plan and specification in `feature/gribi/otg_tests/hashing_test/README.md` to comprehensively cover dataplane hashing test cases, including tunnel encapsulation/decapsulation handling, weighted cost multi-pathing (WCMP), and asymmetric Link Aggregation Group (LAG) member capacity.
## Key Updates
1. **Traffic Profiles**:
   - **Plain IPv4/IPv6**: Evaluates native 5-tuple L3/L4 entropy.
   - **IPnIP Encapsulation (Encap)**: Uses static outer IP endpoints (0 outer entropy) with randomized 5-tuple inner payload to verify inner-header hash computation and prevent tunnel polarization.
   - **IPnIP Decapsulation (Decap)**: Matches gRIBI decapsulation routes to verify post-decap inner-header hashing.
2. **Tolerance and Evaluation Criteria**:
   - Standardized the acceptable distribution threshold to **$\pm 2\%$ relative tolerance** ($\text{Expected Ratio} \times (1 \pm 0.02)$).
3. **Test Scenarios**:
   - **Scenario 1 (8-Wide ECMP & WCMP)**:
     - *Sub-case 1.1*: 8-Wide Uniform ECMP ($\sim 12.5\%$ per next-hop).
     - *Sub-case 1.2*: Equal Paths, Unequal Weights ($1:2$ ratio $\rightarrow \sim 8.3\%$ on soft loops vs. $\sim 16.6\%$ on physical loops).
   - **Scenario 2 (Intra-LAG Member Distribution)**:
     - Uniform distribution across a 7-member LAG bundle ($\sim 14.28\%$ per link).
   - **Scenario 3 (Asymmetric Paths & Weighted Load Balancing — 3-Wide LAGs)**:
     - *Sub-case 3.1 (Capacity-Based Weights — 3:2:2)*: Matches physical member counts ($\sim 42.86\%, \sim 28.57\%, \sim 28.57\%$).
     - *Sub-case 3.2 (Overriding Capacity / Equal Weights — 1:1:1)*: Verifies software weights strictly override physical member capacity ($\sim 33.33\%$ split per LAG).
4. **OpenConfig Coverage**:
   - Added OpenConfig telemetry paths for loopback-mode, aggregate LAG attributes, ACL bindings, and gRIBI / gNMI RPCs.
@singhh07
singhh07 requested a review from a team as a code owner August 25, 2026 18:36
@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 significantly enhances the dataplane hashing test specification for gRIBI/OTG environments. By introducing diverse traffic profiles and complex test scenarios, the update ensures robust validation of hashing uniformity, weight enforcement, and anti-polarization mechanisms across various network instances and LAG configurations.

Highlights

  • Expanded Test Coverage: Updated the hashing test plan to include IPnIP encapsulation/decapsulation traffic profiles and detailed scenarios for WCMP and asymmetric LAG member capacity.
  • Standardized Evaluation: Established a strict ±2% relative tolerance threshold for hashing distribution across all test scenarios.
  • OpenConfig Telemetry: Added comprehensive coverage for loopback modes, LAG attributes, ACL bindings, and relevant gRIBI/gNMI RPCs.
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 comprehensively updates the dataplane hashing test documentation (README.md), detailing the topology of physical and software loopbacks, traffic profiles (Plain IP, IPnIP Encap, and IPnIP Decap), and three new test scenarios covering multi-stage fan-out, intra-LAG distribution, and asymmetric paths. Feedback on the changes highlights a mathematical error in the expected traffic distribution percentages for Stage 3 in Sub-case 1.2, where the ratio of physical to software loopbacks differs from Stage 2.

Comment thread feature/gribi/otg_tests/hashing_test/README.md Outdated
@navaneethyv
navaneethyv requested a review from AmrNJ August 26, 2026 03:14
…e and test scenario

## Summary
This PR updates the test plan specification in `feature/gribi/otg_tests/hashing_test/README.md` to define Dataplane Hashing verification (ECMP, WCMP, and Intra-LAG load balancing) using a combination of physical loopback pairs and software terminal loopback interfaces across multiple Network Instances (`DEFAULT`, `TRANSIT`, `SELF_SITE`, `EGRESS`) with different traffic profiles.
---
## 1. Traffic Profiles
- **Plain IPv4/IPv6**: Evaluates native 5-tuple L3/L4 entropy across destination IP, source IP, and UDP ports.
- **IPnIP Encapsulation (Encap)**: Uses static outer IP endpoints (0 outer entropy) with randomized 5-tuple inner payload to verify inner-header hash computation and prevent tunnel polarization.
---
## 2. Tolerance & Evaluation Criteria
Standardized the acceptable distribution threshold across all next-hops and member links to a **$\pm 2\%$ relative tolerance**:
$$\text{Acceptable Ratio Range} = \text{Expected Ratio} \times (1 \pm 0.02)$$
---
## 3. Test Scenarios
### **Scenario 1: Multi-Stage Max Fan-out (8-Wide ECMP & WCMP)**
- **Sub-case 1.1: 8-Wide Uniform ECMP**:
  - Uniform distribution across all 8 next-hops (**~12.50%** each, acceptable range: **12.25% – 12.75%**) across `TRANSIT` and `SELF_SITE` VRFs.
- **Sub-case 1.2: Equal Paths, Unequal Weights (1:2 WCMP Ratio)**:
  - **Stage 2 (`TRANSIT`)** (4 Physical Loops @ weight 2 + 4 Soft Loops @ weight 1 $\rightarrow$ Total weight 12):
    - **Physical Loops (4 ports)**: **~16.67%** each (acceptable range: **16.33% – 17.00%**)
    - **Soft Loops (4 ports)**: **~8.33%** each (acceptable range: **8.16% – 8.50%**)
  - **Stage 3 (`SELF_SITE`)** (3 Physical Loops @ weight 2 + 5 Soft Loops @ weight 1 $\rightarrow$ Total weight 11):
    - **Physical Loops (3 ports)**: **~18.18%** each (acceptable range: **17.82% – 18.54%**)
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.

2 participants