[action] [PR:27906] copp: fix UDLD skip check to cover all Nokia H5/H6 fanout variants - #1413
Merged
Merged
Conversation
### Description of PR
Summary:
Fixes the UDLD COPP policer test (`test_copp.py::TestCOPP::test_policer[UDLD]`) incorrectly running (and failing) on Nokia H6-128 fanout, and potentially other untested Nokia H5/H6 port-count variants.
### Type of change
- [x] Bug fix
- [ ] Testbed and Framework(new/improvement)
- [ ] New Test case
- [ ] Skipped for non-supported platforms
- [ ] Test case improvement
### Back port request
- [ ] 202311
- [ ] 202405
- [ ] 202411
- [ ] 202505
- [ ] 202511
- [x] 202512
- [x] 202605
### Approach
#### What is the motivation for this PR?
PR Azure#1233 (commit 4d8c483) added a skip for the UDLD policer test on Nokia H5/H6 SONiC fanouts, since these platforms' Broadcom SAI only supports `trap`/`drop` packet actions for the UDLD hostif trap type, not `forward` — so UDLD frames never reach the DUT and the policer-rate assertion (expects a nonzero forwarded PPS) always fails.
However, the skip only matched two exact platform strings:
```python
['arista_7060x6_64pe', 'x86_64-nokia_ixr7220_h5_64o-r0', 'x86_64-nokia_ixr7220_h6_64-r0']
```
Other Nokia H5/H6 port-count variants — e.g. `x86_64-nokia_ixr7220_h6_128-r0` (used by `str4-Nokia-7220-Th6p-leaf-1`), `x86_64-nokia_ixr7220_h5_64d-r0`, `x86_64-nokia_ixr7220_h5_32d-r0` — were not covered, even though they use the same ASIC/SAI family and have the identical limitation. As a result the test ran (rather than skipped) on those platforms and failed:
```
AssertionError: Copp policer constraint check failed, Actual PPS: 0 Expected PPS range: 90.0 - 130.0
```
#### How did you do it?
Verified directly on `str4-Nokia-7220-Th6p-leaf-1` (platform `x86_64-nokia_ixr7220_h6_128-r0`) that the Broadcom SAI driver (`_brcm_sai_create_hostif_trap_validate` in `brcm_sai_host_intf.c`) rejects `SAI_PACKET_ACTION_FORWARD`/`COPY`/`TRANSIT` for `SAI_HOSTIF_TRAP_TYPE_UDLD` with `SAI_STATUS_NOT_SUPPORTED`/`SAI_STATUS_INVALID_PARAMETER` — only `trap` and `drop` are valid actions for this trap type on this ASIC family, confirming the same root cause as the original Arista/H5/H6-64 skip.
Replaced the exact-match list with a regex match (`x86_64-nokia_ixr7220_h[56]_.*`) so any current or future Nokia H5/H6 port-count variant is covered, instead of enumerating every SKU string individually.
#### How did you verify/test it?
- Confirmed the exact failure reproduces on `str4-Nokia-7220-Th6p-leaf-1` (h6_128 platform) prior to the fix.
- Verified the new regex matches all currently known Nokia H5/H6 platform folder names in `sonic-buildimage/device/nokia/`: `h5_32d`, `h5_64d`, `h5_64o`, `h6_64`, `h6_128`, while leaving the Arista match untouched.
- `flake8`/pre-commit checks pass on the modified file.
#### Any platform specific information?
Nokia IXR-7220 H5/H6 family fanouts running SONiC (Broadcom TH5/TH6 based).
#### Supported testbed topology if it's a new test case?
N/A (existing test, fixing a platform-detection gap)
### Documentation
N/A
Signed-off-by: Sonic Build Admin <sonicbld@microsoft.com>
Collaborator
Author
|
Original PR: sonic-net/sonic-mgmt#27906 |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Collaborator
Author
|
/azp run |
1 similar comment
Collaborator
Author
|
/azp run |
|
Azure Pipelines: 1 pipeline(s) were filtered out due to trigger conditions. |
Merged
12 tasks
|
Azure Pipelines: 1 pipeline(s) were filtered out due to trigger conditions. |
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.
Description of PR
Summary:
Fixes the UDLD COPP policer test (
test_copp.py::TestCOPP::test_policer[UDLD]) incorrectly running (and failing) on Nokia H6-128 fanout, and potentially other untested Nokia H5/H6 port-count variants.Type of change
Back port request
Approach
What is the motivation for this PR?
PR #1233 (commit 4d8c483) added a skip for the UDLD policer test on Nokia H5/H6 SONiC fanouts, since these platforms' Broadcom SAI only supports
trap/droppacket actions for the UDLD hostif trap type, notforward— so UDLD frames never reach the DUT and the policer-rate assertion (expects a nonzero forwarded PPS) always fails.However, the skip only matched two exact platform strings:
Other Nokia H5/H6 port-count variants — e.g.
x86_64-nokia_ixr7220_h6_128-r0(used bystr4-Nokia-7220-Th6p-leaf-1),x86_64-nokia_ixr7220_h5_64d-r0,x86_64-nokia_ixr7220_h5_32d-r0— were not covered, even though they use the same ASIC/SAI family and have the identical limitation. As a result the test ran (rather than skipped) on those platforms and failed:How did you do it?
Verified directly on
str4-Nokia-7220-Th6p-leaf-1(platformx86_64-nokia_ixr7220_h6_128-r0) that the Broadcom SAI driver (_brcm_sai_create_hostif_trap_validateinbrcm_sai_host_intf.c) rejectsSAI_PACKET_ACTION_FORWARD/COPY/TRANSITforSAI_HOSTIF_TRAP_TYPE_UDLDwithSAI_STATUS_NOT_SUPPORTED/SAI_STATUS_INVALID_PARAMETER— onlytrapanddropare valid actions for this trap type on this ASIC family, confirming the same root cause as the original Arista/H5/H6-64 skip.Replaced the exact-match list with a regex match (
x86_64-nokia_ixr7220_h[56]_.*) so any current or future Nokia H5/H6 port-count variant is covered, instead of enumerating every SKU string individually.How did you verify/test it?
str4-Nokia-7220-Th6p-leaf-1(h6_128 platform) prior to the fix.sonic-buildimage/device/nokia/:h5_32d,h5_64d,h5_64o,h6_64,h6_128, while leaving the Arista match untouched.flake8/pre-commit checks pass on the modified file.Any platform specific information?
Nokia IXR-7220 H5/H6 family fanouts running SONiC (Broadcom TH5/TH6 based).
Supported testbed topology if it's a new test case?
N/A (existing test, fixing a platform-detection gap)
Documentation
N/A
Signed-off-by: Sonic Build Admin sonicbld@microsoft.com