Skip to content

Commit b8e3fa2

Browse files
Protick Bhowmickmeta-codesync[bot]
authored andcommitted
Remove FirmwareMinorVersion query for PAI
Summary: PAI sdk does not support the `FirmwareMinorVersion` switch attribute. When querying this attribute, the SAI API returns error code. This diff removes the `FirmwareMinorVersion` query from `fwVersionImpl()` and updates the version string format to only include the major version. The firmware version struct still populates the major version correctly. Reference from PAI 4.0 testing: ``` s_a[0].id=172; // FirmwareMinorVersion rv=switch_api->get_switch_attribute(...); // rv: fffb0000 (SAI_STATUS_ATTR_NOT_SUPPORTED) ``` Also in the pai reference guide, we see that only FirmwareMajorVersion attribute is supported {F1984397807} **note: This change is limited ot SaiPhyRetimer class which is only used by ladakh** Reviewed By: harshitgulati18 Differential Revision: D89773816 fbshipit-source-id: c48364acf0cbf8cefc67ad79c378c165f4a120d4
1 parent 5ff28b2 commit b8e3fa2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

fboss/lib/phy/SaiPhyRetimer.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,7 @@ PhyFwVersion SaiPhyRetimer::fwVersionImpl() const {
130130
phy::PhyFwVersion fw;
131131
fw.version() = SaiApiTable::getInstance()->switchApi().getAttribute(
132132
switchId, SaiSwitchTraits::Attributes::FirmwareMajorVersion{});
133-
fw.minorVersion() = SaiApiTable::getInstance()->switchApi().getAttribute(
134-
switchId, SaiSwitchTraits::Attributes::FirmwareMinorVersion{});
135-
fw.versionStr() = fmt::format("{}.{}", *fw.version(), *fw.minorVersion());
133+
fw.versionStr() = fmt::format("{}", *fw.version());
136134
if (auto versionStr = fw.versionStr()) {
137135
XLOG(DBG5) << "fwVersionImpl switchId=" << switchId
138136
<< ", version=" << *versionStr;

0 commit comments

Comments
 (0)