Commit 7e93e7b
Ladakh800bcls: fixup HwSwitchMatcher exception in AgentNeighborTest
Summary:
Desciption:
AgentNeighborTest* failed with following exception
C++ exception with description "HwSwitchMatcher::switchId api must be called only when there is a single switchId" thrown in the test body.
Root Cause:
On multi NPU platform, in function facebook::fboss::utility::NeighborInfo getNeighborInfo, when calling following
auto switchId = ensemble.getSw()
->getScopeResolver()
->scope(ensemble.masterLogicalPortIds())
.switchId();
scope(ensemble.masterLogicalPortIds()) returns an array, so can't get switchId().
Fix:
As this function is designed to retrieve the current state of neighbor entry for a specific interfaceId directly from the ASIC, so changed to get the switchId based on the interfaceId information.
Reviewed By: daiwei1983
Differential Revision: D90621646
fbshipit-source-id: 1e9f785b2da532c46052c9fe8d1ee607dd791cef1 parent 7468cad commit 7e93e7b
1 file changed
+7
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
| |||
0 commit comments