Skip to content

Commit

Permalink
Add port 65 to the BSP mapping
Browse files Browse the repository at this point in the history
Summary: DVT units now have 65 ports (new management port was added). Port 65 was missing from the platform mapping, so we weren't tracking this port in qsfp_service. This was causing some issues in CLIs that expected this port to exist in the qsfp CLIs (since it exists in the agent CLIs)

Reviewed By: harshitgulati18

Differential Revision: D61502040

fbshipit-source-id: 289463fb12669b37e4f8fc3a5b642f6c2ef310a5
  • Loading branch information
Chet Powers authored and facebook-github-bot committed Aug 20, 2024
1 parent 11ed6e9 commit ef329b0
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
1 change: 1 addition & 0 deletions fboss/lib/bsp/bspmapping/input/Montblanc_BspMapping.csv
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,4 @@ TcvrId,TcvrLaneIdList,PimId,AccessControllerId,AccessControlType,ResetPath,Reset
63,5 6 7 8,1,63,CPLD,/run/devmap/xcvrs/xcvr_63/xcvr_reset_63,1,1,/run/devmap/xcvrs/xcvr_63/xcvr_present_63,1,0,63,I2C,/run/devmap/i2c-busses/XCVR_63,126,/sys/class/leds/port63_led2:blue:status,/sys/class/leds/port63_led2:yellow:status
64,1 2 3 4,1,64,CPLD,/run/devmap/xcvrs/xcvr_64/xcvr_reset_64,1,1,/run/devmap/xcvrs/xcvr_64/xcvr_present_64,1,0,64,I2C,/run/devmap/i2c-busses/XCVR_64,127,/sys/class/leds/port64_led1:blue:status,/sys/class/leds/port64_led1:yellow:status
64,5 6 7 8,1,64,CPLD,/run/devmap/xcvrs/xcvr_64/xcvr_reset_64,1,1,/run/devmap/xcvrs/xcvr_64/xcvr_present_64,1,0,64,I2C,/run/devmap/i2c-busses/XCVR_64,128,/sys/class/leds/port64_led2:blue:status,/sys/class/leds/port64_led2:yellow:status
65,1 2 3 4,1,65,CPLD,/run/devmap/xcvrs/xcvr_65/xcvr_reset_65,1,1,/run/devmap/xcvrs/xcvr_65/xcvr_present_65,1,0,65,I2C,/run/devmap/i2c-busses/XCVR_65,129,/sys/class/leds/port65_led1:blue:status,/sys/class/leds/port65_led1:yellow:status
37 changes: 37 additions & 0 deletions fboss/lib/bsp/montblanc/MontblancBspPlatformMapping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2254,6 +2254,37 @@ constexpr auto kJsonBspPlatformMappingStr = R"(
"7": 128,
"8": 128
}
},
"65": {
"tcvrId": 65,
"accessControl": {
"controllerId": "65",
"type": 1,
"reset": {
"sysfsPath": "/run/devmap/xcvrs/xcvr_65/xcvr_reset_65",
"mask": 1,
"gpioOffset": 0,
"resetHoldHi": 1
},
"presence": {
"sysfsPath": "/run/devmap/xcvrs/xcvr_65/xcvr_present_65",
"mask": 1,
"gpioOffset": 0,
"presentHoldHi": 0
},
"gpioChip": ""
},
"io": {
"controllerId": "65",
"type": 1,
"devicePath": "/run/devmap/i2c-busses/XCVR_65"
},
"tcvrLaneToLedId": {
"1": 129,
"2": 129,
"3": 129,
"4": 129
}
}
},
"phyMapping": {},
Expand Down Expand Up @@ -3026,6 +3057,12 @@ constexpr auto kJsonBspPlatformMappingStr = R"(
"bluePath": "/sys/class/leds/port64_led2:blue:status",
"yellowPath": "/sys/class/leds/port64_led2:yellow:status",
"transceiverId": 64
},
"129": {
"id": 129,
"bluePath": "/sys/class/leds/port65_led1:blue:status",
"yellowPath": "/sys/class/leds/port65_led1:yellow:status",
"transceiverId": 65
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion fboss/qsfp_service/test/BspPlatformMapTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ TEST_F(BspPlatformMapTest, checkNumPimTransceivers) {
// Check Montblanc
auto mbBspPlatformMap = MontblancBspPlatformMapping();
EXPECT_EQ(mbBspPlatformMap.numPims(), 1);
EXPECT_EQ(mbBspPlatformMap.numTransceivers(), 64);
EXPECT_EQ(mbBspPlatformMap.numTransceivers(), 65);
// Check Kamet
auto m400bfuBspPlatformMap = Meru400bfuBspPlatformMapping();
EXPECT_EQ(m400bfuBspPlatformMap.numPims(), 1);
Expand Down

0 comments on commit ef329b0

Please sign in to comment.