Skip to content

Fix EEPROM vendor extension TLV number counting issue#70

Merged
jleveque merged 7 commits intosonic-net:masterfrom
keboliu:eeprom_tlv_fix
Dec 7, 2019
Merged

Fix EEPROM vendor extension TLV number counting issue#70
jleveque merged 7 commits intosonic-net:masterfrom
keboliu:eeprom_tlv_fix

Conversation

@keboliu
Copy link
Copy Markdown
Collaborator

@keboliu keboliu commented Dec 7, 2019

TlvInfoDecoder class is using a member variable _TLV_NUM_VENDOR_EXT to counting the vendor extension TLV numbers in the system EEPROM, each time function update_eeprom_db be called, _TLV_NUM_VENDOR_EXT will be accumulated, which will cause EEPROM extension TLV number not correct after an update.

The fix is to replace this member variable with a local variable in the function update_eeprom_db, the local variable is set to 0 before start to count the TLV, this will eliminate this issue

revised formatting by adding extra blank lines to align with PEP8

@jleveque jleveque added the Bug label Dec 7, 2019
@jleveque jleveque merged commit 88cf320 into sonic-net:master Dec 7, 2019
@keboliu
Copy link
Copy Markdown
Collaborator Author

keboliu commented Dec 9, 2019

@jleveque would you please help to label this fix for bmtor and 201911 branch?

@jleveque
Copy link
Copy Markdown
Contributor

jleveque commented Dec 9, 2019

@keboliu: We have not yet created either of those branches in this repo.

lguohan pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Dec 11, 2019
sonic-net/sonic-platform-common#71 [Bug fix] fix a syntax error which was introduced by last commit
sonic-net/sonic-platform-common#70 Fix EEPROM vendor extension TLV number counting issue
sonic-net/sonic-platform-common#62 Platform Driver Development Framework (PDDF): 1) Changes to psu base class (1.0 APIs) to support PDDF CLI utils, 2) Adding fan_base class to support PDDF fan CLI utils (comments incorporated)
sonic-net/sonic-platform-common#68 DeviceBase.get_name should raise NotImplementedError like other member
oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-platform-common that referenced this pull request Oct 25, 2024
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.

3 participants