Skip to content

copp: fix UDLD skip check to cover all Nokia H5/H6 fanout variants - #27906

Merged
bingwang-ms merged 2 commits into
sonic-net:masterfrom
bingwang-ms:fix/copp-udld-skip-nokia-h6-128
Sep 14, 2026
Merged

bingwang-ms merged 2 commits into
sonic-net:masterfrom
bingwang-ms:fix/copp-udld-skip-nokia-h6-128

Conversation

@bingwang-ms

@bingwang-ms bingwang-ms commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

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

  • 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
  • 202512
  • 202605

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/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:

['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

The UDLD skip logic in test_policer only matched the exact platform
strings 'x86_64-nokia_ixr7220_h5_64o-r0' and
'x86_64-nokia_ixr7220_h6_64-r0'. Other Nokia H5/H6 port-count variants
(e.g. x86_64-nokia_ixr7220_h6_128-r0, h5_64d, h5_32d) share the same
Broadcom SAI/ASIC limitation -- only 'trap' is a supported packet
action for the UDLD hostif trap, not 'forward' -- but were not covered
by the exact-match list, so the test ran and failed instead of being
skipped.

Confirmed on str4-Nokia-7220-Th6p-leaf-1 (platform
x86_64-nokia_ixr7220_h6_128-r0): the Broadcom SAI driver
(_brcm_sai_create_hostif_trap_validate) rejects
SAI_PACKET_ACTION_FORWARD/COPY/TRANSIT for
SAI_HOSTIF_TRAP_TYPE_UDLD with SAI_STATUS_NOT_SUPPORTED /
SAI_STATUS_INVALID_PARAMETER, so UDLD can only be trapped or dropped
on this ASIC family, never forwarded.

Replace the exact-match list with a regex that matches any
x86_64-nokia_ixr7220_h5_*/h6_* platform, so all current and future
port-count variants of these platforms are correctly skipped.

Signed-off-by: Bing Wang <bingwang@microsoft.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Nexthop 4210 fanouts (platform x86_64-nexthop_4210-r0021, used e.g. by
str4-nh4210-leaf-01) are also Broadcom-based and have empty COPP
config with the same UDLD trap-only limitation as the Nokia H5/H6 and
Arista 7060x6 fanouts, so extend the skip condition to cover them too.

Signed-off-by: Bing Wang <bingwang@microsoft.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@mssonicbld

Copy link
Copy Markdown
Collaborator

Cherry-pick PR to msft-202512: Azure/sonic-mgmt.msft#1413

@mssonicbld

Copy link
Copy Markdown
Collaborator

This PR has backport request label(s) for branch(es): msft-202512,202605, but is missing required test information. Please make sure you tick the tested branch(es) in the Tested branch section and provide test evidence (e.g., 202512: <test result>) in the Test result section as well in your PR description.

---Powered by SONiC BuildBot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants