[Celestica] Leh800bcls: Fix SRv6 encapsulation tests by passing correct SwitchID for packet injection - #1607
Open
gang-tao wants to merge 1 commit into
Open
[Celestica] Leh800bcls: Fix SRv6 encapsulation tests by passing correct SwitchID for packet injection#1607gang-tao wants to merge 1 commit into
gang-tao wants to merge 1 commit into
Conversation
…ct SwitchID for packet injection
Contributor
|
@jchallag has imported this pull request. If you are a Meta employee, you can view this in D119363282. |
Contributor
|
LGTM |
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.
Pre-submission checklist
pip install -r requirements-dev.txt && pre-commit installpre-commit runSummary
In Multi-NPU Split-Agent architectures (such as the leh800bcls platform), executing SRv6 encapsulation hardware tests on a secondary NPU (switch 1 / NPU1) was failing. Specifically,
AgentSrv6EncapTest/0.VerifyDscpQueueMappingsucceeded on NPU0 but timed out on NPU1 with egress queue packet counters remaining at zero during CPU-injected packet validation.Root Cause
In the affected test cases, packets were injected into the data path by directly calling the low-level
this->getSw()->sendPacketSwitchedAsync(std::move(txPacket)). Because no explicit targetSwitchIDwas provided, the multi-ASIC fallback mechanism inMultiHwSwitchHandler::sendPacketSwitchedAsyncsilently routed all CPU-switched packets toswitch 0(NPU0). As a result, when the test suite was evaluating NPU1, the packet counters on NPU1's egress ports never incremented, leading to assertion timeouts.Solution
Replaced the direct
this->getSw()->sendPacketSwitchedAsync(...)calls withthis->sendPacketSwitchedAsync(...)in bothVerifyDscpQueueMappingandverifySrv6EncapEcnMarkingtest cases inAgentSrv6EncapTests.cpp.The
AgentHwTest::sendPacketSwitchedAsynchelper automatically resolves and attaches the correctSwitchIDunder test (viagetSwitchIdUnderTest), ensuring that the injected packets are physical-routed to the correct NPU.Test Plan
AgentSrv6EncapTest/0.VerifyDscpQueueMappingAgentSrv6EncapTest/0.verifySrv6EncapEcnMarkingAgentSrv6EncapTest/1.VerifyDscpQueueMappingAgentSrv6EncapTest/1.verifySrv6EncapEcnMarking