[Celestica] Leh800bcls: Fix SRv6 decapsulation QoS mapping and Multi-NPU packet routing - #1609
[Celestica] Leh800bcls: Fix SRv6 decapsulation QoS mapping and Multi-NPU packet routing#1609gang-tao wants to merge 1 commit into
Conversation
|
@jchallag has imported this pull request. If you are a Meta employee, you can view this in D119364585. |
| auto config = this->getAgentEnsemble()->getCurrentConfig(); | ||
| auto aclName = folly::to<std::string>("trap-", this->kV6RouteDstIp.str()); | ||
| utility::delAcl(&config, aclName); | ||
| utility::delMatcher(&config, aclName); |
There was a problem hiding this comment.
I think you should use delCPUMatcher() to rightly remove the Action. delmatcher() seems to be a NO-op here
There was a problem hiding this comment.
Hi @jchallag
Thank you for your incredibly sharp and precise review! You are 100% correct, utility::delMatcher only cleans up config->dataPlaneTrafficPolicy().
Now I added a new utility::delCPUMatcher() helper in AclTestUtils to target the CPU traffic policy and updated the VerifyDscpQueueMapping setup block to use utility::delCPUMatcher(&config, aclName).
Retested the case and all passed.
- NPU0
Running all tests took 0:01:47.259575 between 2026-09-10 05:05:22.888876 and 2026-09-10 05:07:10.148451
[ PASSED ] cold_boot.AgentSrv6DecapTest/0.VerifyDscpQueueMapping (16878 ms)
[ PASSED ] warm_boot.AgentSrv6DecapTest/0.VerifyDscpQueueMapping (10908 ms)
[ PASSED ] cold_boot.AgentSrv6DecapTest/1.VerifyDscpQueueMapping (17789 ms)
[ PASSED ] warm_boot.AgentSrv6DecapTest/1.VerifyDscpQueueMapping (10816 ms)
Summary:
PASSED : 4
FAILED : 0
SKIPPED : 0
TIMEOUT : 0
Test output stored at: hwtest_results_2026_Sep_10-05_07_10_AM.csv
- NPU1
Running all tests took 0:01:47.729228 between 2026-09-10 05:07:38.133611 and 2026-09-10 05:09:25.862839
[ PASSED ] cold_boot.AgentSrv6DecapTest/0.VerifyDscpQueueMapping (16976 ms)
[ PASSED ] warm_boot.AgentSrv6DecapTest/0.VerifyDscpQueueMapping (10943 ms)
[ PASSED ] cold_boot.AgentSrv6DecapTest/1.VerifyDscpQueueMapping (17485 ms)
[ PASSED ] warm_boot.AgentSrv6DecapTest/1.VerifyDscpQueueMapping (10812 ms)
Summary:
PASSED : 4
FAILED : 0
SKIPPED : 0
TIMEOUT : 0
Test output stored at: hwtest_results_2026_Sep_10-05_09_25_AM.csv
…NPU packet routing
6299016 to
99ee053
Compare
|
@gang-tao has updated the pull request. You must reimport the pull request before landing. |
Pre-submission checklist
pip install -r requirements-dev.txt && pre-commit installpre-commit runSummary
During Multi-NPU Split-Agent hardware testing on the
leh800bclsplatform, the SRv6 decapsulation QoS queue mapping test case (AgentSrv6DecapTest/0.VerifyDscpQueueMappingandAgentSrv6DecapTest/1.VerifyDscpQueueMapping) was failing on both NPU0 and NPU1.Specifically, all CPU-switched and front-panel injected IPv6-in-IPv6 decapsulated traffic was routed to the correct egress port but erroneously fell back to the minimum priority queue (Queue 0, Silver Queue) instead of matching the configured Olympic QoS map. This resulted in assertion timeouts during queue packet verification.
Root Cause
All decapsulated traffic (64 packets representing all Olympic DSCPs) ended up in Queue 0.
In
AgentSrv6DecapTests.cpp, a global Trap ACL is registered duringinitialConfigto match the inner destination IPkV6RouteDstIp(2800:2::1/128) with the actionCOPYto CPU, enabling packet snooping for other payload validation test cases.In the TH6 hardware pipeline, when decapsulated traffic matches this active Trap ACL, the Ingress Field Processor (IFP)'s
COPYto CPU action is assigned absolute priority. This action forcefully overrides and clears the internal priority (Traffic Class, TC) of the matching packets (resettingTC = 0) at the egress stage, completely bypassing the decapsulation RIF's ingress QoS DSCP trust mapping.VerifyDscpQueueMappingtimed out with 0 packets received when executed on NPU1 (Switch 1).Both test cases directly called the low-level
this->getSw()->sendPacketSwitchedAsync(...)API. Because no targetSwitchIDwas provided, the multi-ASIC fallback handler silently routed all CPU-injected packets to Switch 0 (NPU0). Therefore, the egress queue counters on NPU1's ports never incremented when testing NPU1.Solution
The QoS mapping test (
VerifyDscpQueueMapping) only validates the egress port stats and does not require packet snooping. InVerifyDscpQueueMapping::setup(), we leverage the official FBOSS utility helpersutility::delAclandutility::delMatcherto dynamically remove the specific Trap ACL ("trap-2800:2::1") before applying the configuration. Since other snoop-based tests (such asVerifySrv6DecapV6) run their own setup cycle, the global Trap ACL remains intact for them.Replaced all low-level
getSw()->sendPacketSwitchedAsynccalls withthis->sendPacketSwitchedAsyncinside VerifyDscpQueueMapping. This helper automatically attaches the correctSwitchIDunder test, ensuring packets are physical-routed to the correct NPU.Test Plan
Rebuild the split-agent hardware tests binary and execute the suite on both NPU0 and NPU1 to verify that the queue counters increment perfectly and all assertions pass under both cold-boot and warm-boot states.