7543993af3
- Why I did it There are 3 tasks in xcvrd: main task, run a loop to recover missing SFP static information to DB every 1 minute SFP state task, a process which listens cable plug in/out event, insert SFP static information to DB while a cable is inserted SFP DOM update task, a thread which handles cable DOM information update every 1 minute Let assume user replaces QSFP with QSFP-DD. There are two issues: Only SFP state task listens cable plug in/out event, main task and SFP DOM update task does not know SFP type has changed, they still “think” the SFP type is QSFP. So, main task and SFP DOM update task uses QSFP standard to parse QSFP-DD EEPROM which causes corrupted data. There is a race condition between main task and SFP state task. They both insert SFP static information to DB. Depends on timing, it is possible that main task using wrong SFP type to override SFP static information. The PR is to fix these two issues. There is no such issue on 202205 and above because there is a refactor for xcvrd: SFP state task was changed from process to thread, so that all 3 tasks share the same memory space, they always have correct SFP type. Recover missing SFP information logical was moved from main task to SFP state task. There is no race condition anymore. - How I did it It is difficult to back port latest xcvrd because there are many refactor/new features in xcvrd after 202012 release. It will be huge effort to do so. Based on that, we decided to fix the issue on Nvidia platform API side. The fix is that: refreshing SFP type before any SFP API which accessing SFP EEPROM. Refreshing SFP type before any SFP API would cause a small performance down: Due to my test on 202012 branch, accessing transceiver INFO and DOM INFO for 32 ports takes 1.7 seconds before the change. The number changes to 2.4 seconds after the change. I suppose the performance down is acceptable. - How to verify it Manual test Regression |
||
---|---|---|
.. | ||
bios | ||
docker-saiserver-mlnx | ||
docker-syncd-mlnx | ||
docker-syncd-mlnx-rpc | ||
hw-management | ||
issu-version | ||
mft | ||
mlnx-platform-api | ||
mlnx-sai | ||
sdk-src | ||
.gitignore | ||
asic_table.j2 | ||
bios.mk | ||
docker-saiserver-mlnx.dep | ||
docker-saiserver-mlnx.mk | ||
docker-syncd-mlnx-rpc.dep | ||
docker-syncd-mlnx-rpc.mk | ||
docker-syncd-mlnx.dep | ||
docker-syncd-mlnx.mk | ||
fw.dep | ||
fw.mk | ||
hw-management.dep | ||
hw-management.mk | ||
issu-version.dep | ||
issu-version.mk | ||
libsaithrift-dev.dep | ||
libsaithrift-dev.mk | ||
mft.dep | ||
mft.mk | ||
mlnx-ffb.dep | ||
mlnx-ffb.mk | ||
mlnx-ffb.sh | ||
mlnx-fw-upgrade.j2 | ||
mlnx-onie-fw-update.dep | ||
mlnx-onie-fw-update.mk | ||
mlnx-onie-fw-update.sh | ||
mlnx-platform-api.dep | ||
mlnx-platform-api.mk | ||
mlnx-sai.dep | ||
mlnx-sai.mk | ||
mlnx-ssd-fw-update.dep | ||
mlnx-ssd-fw-update.mk | ||
mlnx-ssd-fw-update.sh | ||
one-image.dep | ||
one-image.mk | ||
peripheral_table.j2 | ||
platform.conf | ||
rules.dep | ||
rules.mk | ||
sdk.dep | ||
sdk.mk | ||
zero_profiles.j2 |