Fix test issue for test_ipv6_bgp_scale.py#22676
Merged
roy-sror merged 1 commit intosonic-net:masterfrom Mar 18, 2026
Merged
Conversation
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
d9e9f29 to
c1f7a26
Compare
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
PriyanshTratiya
previously approved these changes
Mar 2, 2026
Contributor
PriyanshTratiya
left a comment
There was a problem hiding this comment.
LGTM, Thanks Wei!
Contributor
Author
|
/azpw run |
Collaborator
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
roy-sror
previously approved these changes
Mar 8, 2026
c1f7a26 to
8e11916
Compare
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
8e11916 to
af13a86
Compare
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
3465280
af13a86 to
3465280
Compare
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Change-Id: I776836c6d5806c8af5f6f50ce2401a01d1f8539a Signed-off-by: Wei Guo <[email protected]>
3465280 to
796d654
Compare
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
nhe-NV
approved these changes
Mar 16, 2026
yxieca
approved these changes
Mar 18, 2026
Collaborator
yxieca
left a comment
There was a problem hiding this comment.
AI agent on behalf of Ying. Reviewed; no issues found.
mssonicbld
pushed a commit
to mssonicbld/sonic-mgmt
that referenced
this pull request
Mar 18, 2026
Signed-off-by: mssonicbld <[email protected]>
Collaborator
|
Cherry-pick PR to 202511: #23070 |
12 tasks
mssonicbld
pushed a commit
that referenced
this pull request
Mar 18, 2026
Signed-off-by: mssonicbld <[email protected]>
| duthost.facts['router_mac'], | ||
| pdp.get_mac(pdp.port_to_device(injection_port), injection_port), | ||
| icmp_type | ||
| global_icmp_type |
Contributor
There was a problem hiding this comment.
Hi @weiguo-nvidia , any particular reason why we use the global_icmp_type here? It does not seem to change as the test progresses, whereas the icmp_type variable uses a cycle within a safe range and will distinguish packets across tests.
Contributor
There was a problem hiding this comment.
This looks like a conflict resolution/rebase regression, Will update this if no particular reason to use global_icmp_type
12 tasks
12 tasks
vrajeshe
pushed a commit
to vrajeshe/sonic-mgmt
that referenced
this pull request
Mar 23, 2026
Signed-off-by: Venkata Gouri Rajesh Etla <[email protected]>
ravaliyel
pushed a commit
to ravaliyel/sonic-mgmt
that referenced
this pull request
Mar 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary: Fix test issue for test_ipv6_bgp_scale.py
Fixes # (issue)
calculate_downtime()function. Please see the detail info as belowType of change
Back port request
Approach
What is the motivation for this PR?
The
calculate_downtime()function intest_ipv6_bgp_scale.pyuses[:-1]on themask_rx_cntdict values to exclude the backplane port from the RX total:This is incorrect because
[:-1]removes the last entry by dict insertion order, not the backplane port. The dict insertion order depends on which port first receives a matching packet, which is non-deterministic and varies between runs.In topologies without a backplane (e.g.,
t1-isolated-*),mask_rx_cntcontains only legitimate data port entries and no backplane entry at all. The[:-1]unconditionally removes a valid egress port's counter, causing false packet loss to be reported.For example, in a
test_bgp_admin_flap[1]failure:mask_rx_cnthad exactly 32 entries, all corresponding to BGP neighbor ports (no backplane)[:-1]excluded port(0, 176)(Ethernet176 / ARISTA113T1) which received 1019 packetsmissing_pkt_cnt = 1019anddowntime = 0.4185s, exceeding the 0.2s thresholdThe bug also makes the test flaky — depending on which port happens to be last in the dict, the "missing" count changes, causing random pass/fail results.
How did you do it?
Replaced the fragile
[:-1]approach with explicit backplane port identification usingptf.config['port_map'].When PTF initializes, backplane ports are registered in
ptf.config['port_map']with interface name"backplane"(seeptfadapter/__init__.pyget_ifaces_map()). The new helper_get_backplane_ports()queries this config to find backplane port keys, andcalculate_downtime()excludes only those specific ports from the RX sum.ciscovs-7nodes): backplane ports are correctly identified and excluded_get_backplane_ports()returns an empty set, no ports are excludedHow did you verify/test it?
Run regression test, pass
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation