Commit c5034dd
Program port profile in
Summary:
Fixing port profile tests for Chenab
Facebook :
On Chenab, `AgentPortProfileTest` crashes the agent instead of failing:
```
mlnx_port_in_use_check: Failed remove port oid 1000100000001 - is a router interface
mlnx_remove_port: Failed to remove port 0x1
[port] Failed to remove sai object : PortSaiId(281479271677953): OBJECT IN USE
terminate called after throwing an instance of 'facebook::fboss::SaiApiError'
```
Two Chenab properties combine to produce this:
- `utility::getInterfaceType()` returns `cfg::InterfaceType::PORT` for
`ASIC_VENDOR_CHENAB`, so every router interface is bound to a port rather
than to a VLAN.
- `SaiPortManager::createOnlyAttributeChanged()` recreates the SAI port
whenever `HwLaneList` differs, independent of `SAI_PORT_SPEED_CHANGE`
(which Chenab reports as unsupported). Chenab's `changePortByRecreate()`
is a bare `removePort()` + `addPort()` and does not chain delete the
attached router interface, so `sai_remove_port` is rejected.
`setup()` reprogrammed the two test ports from the 400G_4 safe profile to
the profile under test, changing the lane count and taking exactly that
path. `ConfigUtils.cpp` already records the constraint: "chenab does not
support dynamic port profile change, as it may lead to recreation of ports
by delete and add".
Program the profile as part of `initialConfig()` instead, so the ports come
up on it at cold boot and are never recreated, and skip `setup()` on Chenab.
Gated on `ASIC_VENDOR_CHENAB` so every other platform keeps the existing
`oneL3IntfTwoPortConfig` + `applyNewConfig` path and its warm boot round trip
is unaffected.
The profile survives warm boot because `applyInitialConfig()` persists the
config to `agent.conf` and `AgentEnsemble` reads that same file back on the
warm boot run, so the reapplied config is a no-op delta.
___
Differential Revision: D117126187
fbshipit-source-id: 14b260410ede01a4f9112f990f354ab03e19f093initialConfig for AgentPortProfileTest
1 parent 599d601 commit c5034dd
1 file changed
Lines changed: 50 additions & 0 deletions
Lines changed: 50 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
50 | 87 | | |
51 | 88 | | |
52 | 89 | | |
| |||
185 | 222 | | |
186 | 223 | | |
187 | 224 | | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
188 | 230 | | |
189 | 231 | | |
190 | 232 | | |
| |||
209 | 251 | | |
210 | 252 | | |
211 | 253 | | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
212 | 262 | | |
213 | 263 | | |
214 | 264 | | |
| |||
0 commit comments