Aft 1.1 fix - #4950
Aft 1.1 fix#4950manan-patel wants to merge 15 commits into
Conversation
Pull Request Functional Test Report for #4950 / e6ef7b2Virtual Devices
Hardware Devices
|
Summary of ChangesHello @manan-patel, 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 several key improvements to AFT (Address Family Table) tests. It enhances test flexibility by allowing dynamic IPv6 subnet mask adjustments based on device deviations, refines interface state manipulation for more reliable churn simulations, and corrects a bug in the AFT cache to ensure accurate next-hop group data. These changes collectively aim to improve the stability and correctness of network device testing, particularly for BGP and AFT convergence scenarios. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. 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 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 counter productive. 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. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new deviation, SubnetMaskChange, to allow for different IPv6 prefix lengths in the AFT base test. The changes include adding new constants for different prefix lengths, modifying the test logic to select the prefix length based on the deviation, and defining the new deviation in the proto and Go files. Additionally, there's a fix in aft_cache.go to handle duplicate next-hop IDs.
My review has identified a critical bug in afts_base_test.go where interfaces are incorrectly disabled instead of being enabled, which will cause test failures. I've also pointed out several medium-severity issues, including a redundant else block, and a failure to adhere to the repository style guide for deviation definitions by omitting a required issue tracker URL. There are also opportunities to improve comment clarity for the new deviation.
| // SetSubnetMaskChange returns true if device requires changing subnet mask length | ||
| func SubnetMaskChange(dut *ondatra.DUTDevice) bool { | ||
| return lookupDUTDeviations(dut).GetSubnetMaskChange() | ||
| } |
There was a problem hiding this comment.
According to the repository style guide, deviation accessor functions must include a comment with a URL to an issue tracker. This helps in tracking the removal of the deviation. Please add the issue tracker URL.
Additionally, the function comment // SetSubnetMaskChange... is slightly misleading as the function name is SubnetMaskChange. It's better to keep them consistent for clarity.
| // SetSubnetMaskChange returns true if device requires changing subnet mask length | |
| func SubnetMaskChange(dut *ondatra.DUTDevice) bool { | |
| return lookupDUTDeviations(dut).GetSubnetMaskChange() | |
| } | |
| // SubnetMaskChange returns true if device requires changing subnet mask length. | |
| // https://issuetracker.google.com/issues/xxxxx | |
| func SubnetMaskChange(dut *ondatra.DUTDevice) bool { | |
| return lookupDUTDeviations(dut).GetSubnetMaskChange() | |
| } |
References
- The repository style guide requires that accessor functions for deviations include a comment with a URL to an issue tracker. This is specified in lines 83-86 of the guide. (link)
| // SetSubnetMaskChange returns true if it needs to be changed | ||
| bool subnet_mask_change = 358; |
There was a problem hiding this comment.
The comment // SetSubnetMaskChange returns true if it needs to be changed is inconsistent with the field name subnet_mask_change and is a bit vague. A more descriptive comment would improve clarity for developers using this deviation.
| // SetSubnetMaskChange returns true if it needs to be changed | |
| bool subnet_mask_change = 358; | |
| // SubnetMaskChange indicates whether the IPv6 subnet mask length needs to be changed for the test. | |
| bool subnet_mask_change = 358; |
Pull Request Test Coverage Report for Build 21276411438Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
| bool config_acl_oc_unsupported = 357; | ||
|
|
||
| // SetSubnetMaskChange returns true if it needs to be changed | ||
| bool subnet_mask_change = 358; |
There was a problem hiding this comment.
@manan-patel, Can you kindly elaborate why is this deviation is needed and also create bug with the details so that we can review and track the changes if needed.
There was a problem hiding this comment.
when we have /128 subnet mask for Ipv6, we use CEM resources. With case BGP v6 routes, those resources are getting exhausted.
- cmd to validate the status
show controllers npu debugshell 0 "script resource_usage" location 0/7/CPU0 | i CENTRAL_EM
with /64 (not entire ip match) LPM resources are used
show controllers npu debugshell 0 "script resource_usage" location 0/7/CPU0 | i LPM
We can control the allocation across CEM and LPM using hw-module CLIs; however, there are inherent limitations, and these CLIs must be configured with the appropriate profile in mind
There was a problem hiding this comment.
can we make 900K 64 and 100K /128 routes then.
There was a problem hiding this comment.
Hi Param, we have validated locally 900k /64 and 100k /128 routes. Should we uplift the FNT to cover the combination?
…tion for v6 prefixes for low and full scale, base profile distributes 90% /64 and 10% /128 v6 scale
|
Hi @manan-patel, could you please resolve the merge conflicts and rebase the branch so the checks turn green? |
|
Hi @manan-patel , Please rebase / squash the commits so the commit history remains clean and only includes test changes. |
No description provided.