Skip to content

[Celestica] Leh800bcls: Fix SRv6 decapsulation QoS mapping and Multi-NPU packet routing - #1609

Closed
gang-tao wants to merge 1 commit into
facebook:mainfrom
gang-tao:leh800bcls_agent_fix25
Closed

gang-tao wants to merge 1 commit into
facebook:mainfrom
gang-tao:leh800bcls_agent_fix25

Conversation

@gang-tao

@gang-tao gang-tao commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

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
[INFO] Stashing unstaged files to /work/home/gangtao/.cache/pre-commit/patch1788758710-2761128.
clang-format.............................................................Passed
shellcheck...........................................(no files to check)Skipped
shfmt................................................(no files to check)Skipped
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check json...........................................(no files to check)Skipped
check for merge conflicts................................................Passed
ruff check...........................................(no files to check)Skipped
ruff format..........................................(no files to check)Skipped
Prevent sai_impl in fboss manifest.......................................Passed
[INFO] Restored changes from /work/home/gangtao/.cache/pre-commit/patch1788758710-2761128.

Summary

In AgentSrv6DecapTest switched test packets were previously injected via this->getSw()->sendPacketSwitchedAsync(...) without specifying the target SwitchID.
In multi-NPU split-agent environments (e.g. dual-NPU leh800bcls), this caused switched traffic to fallback and route exclusively to Switch 0. Consequently, test cases running on secondary NPUs (Switch 1) timed out with 0 packets received.
This PR replaces getSw()->sendPacketSwitchedAsync with this->sendPacketSwitchedAsync, which dynamically routes traffic to the active SwitchID under test.

Test Plan

Case passed on both NPU0 and NPU1:

  • NPU0
Removed "/etc/systemd/system/fboss_hw_agent_oss@1.service".
Cleaning up FBOSS HW Agent Service for index=0...
Cleaning up FBOSS HW Agent Service for index=1...
Running all tests took 0:01:39.649817 between 2026-10-14 11:19:53.266924 and 2026-10-14 11:21:32.916741
[ PASSED ] cold_boot.AgentSrv6DecapTest/0.VerifyDscpQueueMapping (17764 ms)
[ PASSED ] warm_boot.AgentSrv6DecapTest/0.VerifyDscpQueueMapping (11399 ms)
[ PASSED ] cold_boot.AgentSrv6DecapTest/1.VerifyDscpQueueMapping (17034 ms)
[ PASSED ] warm_boot.AgentSrv6DecapTest/1.VerifyDscpQueueMapping (11371 ms)
Summary:
   PASSED : 4
   FAILED : 0
   SKIPPED : 0
   TIMEOUT : 0

Test output stored at: hwtest_results_2026_Oct_14-11_21_32_AM.csv

  • NPU1
Running all tests took 0:01:40.154005 between 2026-10-14 11:21:48.291563 and 2026-10-14 11:23:28.445568
[ PASSED ] cold_boot.AgentSrv6DecapTest/0.VerifyDscpQueueMapping (18162 ms)
[ PASSED ] warm_boot.AgentSrv6DecapTest/0.VerifyDscpQueueMapping (11314 ms)
[ PASSED ] cold_boot.AgentSrv6DecapTest/1.VerifyDscpQueueMapping (17416 ms)
[ PASSED ] warm_boot.AgentSrv6DecapTest/1.VerifyDscpQueueMapping (10409 ms)
Summary:
   PASSED : 4
   FAILED : 0
   SKIPPED : 0
   TIMEOUT : 0

Test output stored at: hwtest_results_2026_Oct_14-11_23_28_AM.csv

@gang-tao
gang-tao requested a review from a team as a code owner September 7, 2026 07:40
@meta-cla meta-cla Bot added the CLA Signed label Sep 7, 2026
@meta-codesync

meta-codesync Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

@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);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should use delCPUMatcher() to rightly remove the Action. delmatcher() seems to be a NO-op here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@gang-tao
gang-tao force-pushed the leh800bcls_agent_fix25 branch from 6299016 to 99ee053 Compare September 10, 2026 02:13
@facebook-github-tools

Copy link
Copy Markdown

@gang-tao has updated the pull request. You must reimport the pull request before landing.

@msomasundaran

Copy link
Copy Markdown
Contributor

It is not clear why the acl failure is ladakh specific. Adding @jasmeetbagga to review that part.

@gang-tao

Copy link
Copy Markdown
Contributor Author

It is not clear why the acl failure is ladakh specific. Adding @jasmeetbagga to review that part.
Hi @msomasundaran
I didn't see this passed on other TH6 platform. let me know if I am wrong. Thanks.

@jchallag

Copy link
Copy Markdown
Contributor

Hi @gang-tao , it looks like this issue is fixed on TH platforms in a different way and we may not need this fix. We will still need multi-NPU part of this PR. can you please rebase and update?

Comment thread fboss/agent/test/agent_hw_tests/AgentSrv6DecapTests.cpp
@gang-tao
gang-tao force-pushed the leh800bcls_agent_fix25 branch from 99ee053 to 59e70ad Compare October 13, 2026 12:53
@facebook-github-tools

Copy link
Copy Markdown

@gang-tao has updated the pull request. You must reimport the pull request before landing.

@gang-tao

Copy link
Copy Markdown
Contributor Author

Hi @gang-tao , it looks like this issue is fixed on TH platforms in a different way and we may not need this fix. We will still need multi-NPU part of this PR. can you please rebase and update?

@jchallag updated as you suggested. thanks

@jchallag

Copy link
Copy Markdown
Contributor

@gang-tao can you update the summary, title and testplan as well? hope it is verified on the latest rebase.

@gang-tao

Copy link
Copy Markdown
Contributor Author

@gang-tao can you update the summary, title and testplan as well? hope it is verified on the latest rebase.
@jchallag

After rebasing and making the changes, I ran into two regression issues:
1 'Update : update mySids application to HW failed'
2 Check failed: intfID == 0 (10 vs. 0) Portless interface 10 on vlan 4094 has no SwitchInfo::loopbackIntfId, but this platform has 2 l3 switches

After the fix, I hit the original issue again.

I wanted to check if this was already tested and verified on a single NPU? Could you let me know which single NPU platform this was fixed on? I'll double-check it on another platform (TH6) as well

@jchallag

Copy link
Copy Markdown
Contributor

@gang-tao this was tested on icecube platform. commit hash 0ee51b9 .

@gang-tao

Copy link
Copy Markdown
Contributor Author

@gang-tao this was tested on icecube platform. commit hash 0ee51b9 .

@jchallag
I found the root cause. The previous fix for the first regression wasn't complete, which caused the TunnelId on MySidEntry to not be set. Now that I've applied the fix, it works. I have updated the summary and test plan.
Thanks!

@meta-codesync meta-codesync Bot closed this in 9a797dd Oct 14, 2026
@meta-codesync meta-codesync Bot added the Merged label Oct 14, 2026
@meta-codesync

meta-codesync Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

@jchallag merged this pull request in 9a797dd.

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