Skip to content

[eeprom_tlv_info] Optimize EEPROM data process by using visitor pattern#193

Merged
jleveque merged 4 commits intosonic-net:masterfrom
Junchao-Mellanox:optimize-eeprom-process
Jun 11, 2021
Merged

[eeprom_tlv_info] Optimize EEPROM data process by using visitor pattern#193
jleveque merged 4 commits intosonic-net:masterfrom
Junchao-Mellanox:optimize-eeprom-process

Conversation

@Junchao-Mellanox
Copy link
Contributor

Description

  1. Use visitor pattern accessing EEPROM data
  2. Provide utility functions to access redis data base

Motivation and Context

Remove EEPROM cache file and use DB instead

How Has This Been Tested?

Manual test and regression test

Additional Information (Optional)

@lgtm-com
Copy link

lgtm-com bot commented Jun 7, 2021

This pull request introduces 1 alert when merging 2c3729b into 295b68c - view on LGTM.com

new alerts:

  • 1 for Unused local variable

@keboliu keboliu requested a review from jleveque June 7, 2021 07:05
@jleveque jleveque merged commit fc2e9e2 into sonic-net:master Jun 11, 2021
@Junchao-Mellanox Junchao-Mellanox deleted the optimize-eeprom-process branch June 15, 2021 01:27
qiluo-msft pushed a commit that referenced this pull request Jun 16, 2021
…rn (#193)

Remove EEPROM cache file and use DB instead

1. Use visitor pattern accessing EEPROM data
2. Provide utility functions to access redis data base
oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-platform-common that referenced this pull request Oct 25, 2024
…#193)

- Description
I added a del directive for the global platform_chassis object in xcvrd on deinit to ensure that the pointer is properly cleaned up such that the __del__() method is successfully called on the chassis object which closes its connection to SAI.

- Motivation and Context
On Mellanox platforms on 202012 we are seeing that in some cases xcvrd is maintaining the socket to the API past its deconstruction causing an error from SAI. This was traced by reproducing the issue and identifying that the pmon container was causing this issue where xcvrd is the only daemon within pmon that opens a SDK socket on Mellanox.

Error in log...

syncd#SDK: [SX_API_INTERNAL.ERR] Failed command read at communication channel: Connection reset by peer

- How Has This Been Tested?
Change was uploaded to xcvrd on running pmon container on a switch running the latest 202012 build. xcvrd was then restarted with supervisord and we verified that we could no longer reproduce the bug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants