Repository navigation
TE-3.31 gribi: Fix traffic generation and tolerance check in hierarchical_weight_resolution_pbf_test - #6202
Conversation
…t_resolution_pbf_test
Summary of ChangesHello, 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 improves the reliability and accuracy of the hierarchical weight resolution test by addressing packet distribution imbalances. By aligning traffic generation parameters with existing test standards and ensuring that platform-specific tolerance deviations are respected, the changes eliminate previous test failures caused by flow truncation and overly strict hardcoded thresholds. Highlights
Using Gemini Code AssistThe 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
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 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
|
Pull Request Functional Test Report for #6202 / e088f58Virtual Devices
Hardware Devices
|
There was a problem hiding this comment.
Code Review
This pull request updates the hierarchical weight resolution PBF test by adjusting the flow packet size, rate, and duration, adding UDP source and destination port increments, and dynamically updating the tolerance value based on device deviations. The reviewer pointed out that modifying the package-level global variable tolerance inside a test case is an anti-pattern that can lead to state leakage and flaky tests, suggesting instead to define it as a local variable.
|
Hi @AmrNJ @navaneethyv @jayakumarramisetty, could you please help review this PR or assign someone who can take a look? Thanks! |
|
Hi @navaneethyv @jayakumarramisetty @AmrNJ |
Description
This PR addresses packet distribution imbalances and test inconsistencies in
hierarchical_weight_resolution_pbf_testby aligning its traffic parameters with the sister test (hierarchical_weight_resolution_test) and ensuring platform tolerance deviations are checked consistently.Problem
Premature Flow Truncation & Under-Sampling:
ipv4FlowCountis configured to65,000flows.flowipv4.Rate().SetPps(...)andflowipv4.Duration().Continuous()were omitted intestTraffic(), causing OTG to default to1,000 PPS.60,359packets were transmitted.4,641flows (~7.14% of the flow space) were truncated and never transmitted, skewing the hardware hash distribution into the buckets by~0.3% - 0.47%and causing failures against the strict0.20%tolerance.Missing 5-Tuple L4 Entropy:
hierarchical_weight_resolution_test(which includes an inner UDP header incrementing across 50,000 ports), this test lacked an inner L4 header, reducing entropy for the switch load-balancing hash engines.Inconsistent Tolerance Deviation Check:
testBasicHierarchicalWeight()(4 VLANs) andtestHierarchicalWeightBoundaryScenario()(18 VLANs).testHierarchicalWeightBoundaryScenario(), the test properly queriesdeviations.HierarchicalWeightResolutionTolerance(dut)to check whether the platform has an approved tolerance deviation (e.g., Juniper specifies0.4inmetadata.textproto).testBasicHierarchicalWeight(), this check was omitted, causing it to compare directly against the hardcoded package-level defaulttolerance = 0.2and ignoring any platform-specific tolerance configured inmetadata.textproto.Solution
flowipv4.Size().SetFixed(300)(from100) and explicitly configuredflowipv4.Rate().SetPps(10000)andflowipv4.Duration().Continuous(), transmitting >600,000 packets per minute (>9 complete iterations of the 65,000 flow space) to eliminate cyclic flow truncation.hierarchical_weight_resolution_test).tolerance := deviations.HierarchicalWeightResolutionTolerance(dut)insidet.Run("testTraffic", ...)intestBasicHierarchicalWeight()so platform-specific tolerance deviations are applied without mutating the package-leveltolerancevariable (per Gemini review feedback).Hardware Verification
Validated both
TestBasicHierarchicalWeightWithVrfPolW(4 VLANs) andTestHierarchicalWeightBoundaryScenarioWithVrfPolW(18 VLANs) — including bothtestTrafficandvalidateAFTWeights— across physical hardware testbeds for all 4 vendors after applying the localtoleranceupdate (5/5 PASS):5m 41s, all subtests)TE-3.31 7280_j2.log
5m 35s, all subtests)TE-3.31 7280_j2cplus.log
4m 43s, all subtests)TE-3.31 7250_ixr10e.log
5m 58s, all subtests)TE-3.31 PTX10001.log
5m 14s, all subtests)TE-3.31 Cisco8808.log