[Celestica] Leh800bcls: Upgrade BCM logDropReasons OSS stub to real decoder - #1606
[Celestica] Leh800bcls: Upgrade BCM logDropReasons OSS stub to real decoder#1606gang-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 D119363197. |
| case SAI_PACKET_DROP_TYPE_INGRESS_RDROP: | ||
| ingressNames.push_back("RDROP"); | ||
| break; | ||
| case SAI_PACKET_DROP_TYPE_INGRESS_RUC: |
There was a problem hiding this comment.
SAI_PACKET_DROP_TYPE_INGRESS_RUC is explicitly classified as a non-drop reason in the internal decoder . This is inconsistent with the change
There was a problem hiding this comment.
Hi @jchallag
Thanks for the catch! You are completely right—SAI_PACKET_DROP_TYPE_INGRESS_RUC represents Routed Unicast (non-drop) packets, and treating it as an active drop reason is indeed incorrect and inconsistent.
|
In general, i think there are many more drop reasons that needs to be taken care of. Did we check if this breaks other platforms? |
…ecoder and adapt genericReasons whitelist
Hi @jchallag As for other NPUs, I took that into consideration: the current code is placed in fboss/agent/hw/sai/switch/npu/bcm/oss/SaiSwitchManager.cpp, which is specific to the BCM OSS target platform. Other vendors have their own corresponding directories, so this will not introduce any duplicate symbol conflicts or break other platforms. retested and case passed:
If you have further questions, feel free to leave additional comments. Thanks! |
92d2002 to
9398af3
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
Following commit
3e2ff0c591which introduced a no-op OSS stub forlogDropReasons()to resolve SAI 15.4 linker failures, Broadcom XGS platforms in the open-source branch still lack actual drop reason decoding and logging. As a result, tests inAgentDropReasonTests.cppconsistently fail with timeouts.The test expects to observe the drop reason
L3_DST_DISCARDbut instead logsingress=[] egress=[]indefinitely, or fails due to unexpected companion generic drop reasons (e.g.
60,66) being reported alongside it.Root Cause
logDropReasonsinnpu/bcm/oss/SaiSwitchManager.cppis an empty no-op stub since the proprietary implementation resides in Meta's closed-sourcefacebook/directory. No actual logs containing"DROP reasons ingress"are emitted on public builds.Solution
fboss/agent/hw/sai/switch/npu/bcm/oss/SaiSwitchManager.cppinto a real decoder. It utilizes the standard, public experimental SAI headers<experimental/saidropextensions.h>under theBRCM_SAI_SDK_XGS_GTE_15_0macro to decode and print named drop reasons. This fully avoids symbol conflicts with Meta's internal builds.SAI_PACKET_DROP_TYPE_INGRESS_RDISC(59),SAI_PACKET_DROP_TYPE_INGRESS_RUC(60),SAI_PACKET_DROP_TYPE_INGRESS_RIMDR(65), andSAI_PACKET_DROP_TYPE_INGRESS_RDROP(66) to their string names.Test Plan
fboss_hw_agent-sai_implandmulti_switch_agent_hw_testusing SAI 15.4.0.0_odp and 14.2.0.0_odp.AgentDropReasonTest.ingressL3DstDiscardDroppasses successfully.