G
YouTube TikTok Games
Skip to content

[Cisco][P200] Fixes for PFC test cases - #1857

Open
itskittycisco wants to merge 2 commits into
meta:mainfrom
itskittycisco:p200_pfc_fixes
Open

itskittycisco wants to merge 2 commits into
meta:mainfrom
itskittycisco:p200_pfc_fixes

Conversation

@itskittycisco

@itskittycisco itskittycisco commented Oct 29, 2026 •

Copy link
Copy Markdown

Pre-submission checklist

  • I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running pip install -r requirements-dev.txt && pre-commit install
  • pre-commit run

Summary

Issue:
P200 requires SAI_BUFFER_POOL_ATTR_RESERVED_BUFFER_SIZE on the egress pool
create. The SDK uses that reserve when calculating buffer profiles, and the
reserve cannot be changed after a profile is bound.

SaiBufferManager starts the P200 egress pool at getMMUSizeBytes(), 88 MB (92274688), and sets reservedBytes to 20 MB (20971520). Those are local values. Before the single SAI create, the PFC test's FLAGS_egress_buffer_pool_size replaces the size with 1505000 (1,500,000 shared plus 5,000 headroom) and leaves the 20 MB reserve in place. SAI sees one create, size 1505000 and reserve 20971520, and rejects it because the reserve is larger than the pool. The reserve has to fit inside the pool, and that size is fixed on this create.

Fix:

  1. Leave the 20MB P200 reserve unchanged. For P200, set the test egress pool
    to 50MB (52428800), which holds that reserve. The ingress PFC pool stays
    1.5MB with XoffSize 5000, so XOFF still comes from the small ingress
    pool. Other ASICs keep the existing small egress pool.
  2. Enable the required PFC features in the P200Asic.cpp
    INGRESS_PRIORITY_GROUP_SHARED_WATERMARK is needed only for AgentTrafficPfcGenTest.verifyIngressPriorityGroupWatermarks

Test Plan

Manually verified these following tests on Hw:
Ingress buffer (7):
1 AgentIngressBufferTest.validateConfig.  - PASS
2 AgentIngressBufferTest.validateHighBufferValues - PASS
3 AgentIngressBufferTest.validateLossyMode - PASS
4 AgentIngressBufferTest.validatePGHeadroomLimitChange - PASS
5 AgentIngressBufferTest.validatePGParamChange - PASS
6 AgentIngressBufferTest.validatePGQueueChanges - PASS
7 AgentIngressBufferTest.validatePgNoPfc - PASS
 
PFC config, counters, traffic, and watchdog (12):
1 AgentPfcConfigTest.PfcRxTxCombinations - PASS
2 AgentPfcConfigTest.PfcWatchdogProgrammingSequence - PASS 
3 AgentTrafficPfcTest.verifyPfcWithDefaultCfg         - PASS
4 AgentTrafficPfcTest.verifyPfcWithMapChanges_0.      - PASS
5 AgentTrafficPfcTest.verifyPfcWithMapChanges_1       - PASS
6 AgentTrafficPfcTest.verifyPfcWithScaleCfg           - PASS 
7 AgentTrafficPfcTest.verifyPfcWithZeroGlobalHeadRoomCfg  - PASS
8 AgentTrafficPfcWatchdogTest.PfcWatchdogDetection     - PASS
9 AgentTrafficPfcWatchdogTest.PfcWatchdogReset         - PASS 
10 AgentTrafficPfcZeroPgHeadroomTest.verifyPfcWithZeroPgHeadRoomCfg - PASS
11 AgentTrafficPfcZeroPgHeadroomTest.verifyWithScaleCfgInCongestionDrops - PASS
12 AgentTrafficPfcGenTest.verifyIngressPriorityGroupWatermarks - PASS

@Tianyu-Meta
Tianyu-Meta requested a review from a team as a code owner November 12, 2026 08:43
@meta-codesync

meta-codesync Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

@Tianyu-Meta has imported this pull request. If you are a Meta employee, you can view this in D131449022.

This branch has not been deployed

No deployments
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.

2 participants