-
Notifications
You must be signed in to change notification settings - Fork 0
[DO NOT MERGE] Add debug logs to write_eeprom #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -528,12 +529,31 @@ def write_eeprom(self, offset, num_bytes, write_buffer): | |||
Example: | |||
mlxreg -d /dev/mst/mt52100_pciconf0 --reg_name MCIA --indexes slot_index=0,module=1,device_address=154,page_number=5,i2c_device_address=0x50,size=1,bank_number=0 --set dword[0]=0x01000000 -y | |||
""" | |||
|
|||
logger.log_error(f'--- err:-5_debug --- Entered write_eeprom()') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
having LOG ERR add ERR message to LOG. You should change it to NOTICE\INFO
else: | ||
stack_trace.append(f"{func_name}()") | ||
execution_flow = " --> ".join(reversed(stack_trace)) | ||
logger.log_error(f'--- err:-5_debug --- Call Stack: {execution_flow}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
having LOG ERR add ERR message to LOG. You should change it to NOTICE\INFO
if num_bytes != len(write_buffer): | ||
logger.log_error("Error mismatch between buffer length and number of bytes to be written") | ||
return False | ||
|
||
while num_bytes > 0: | ||
page_num, page, page_offset = self._get_page_and_page_offset(offset) | ||
logger.log_error(f'--- err:-5_debug --- Attempt to write to: page={page}, offset={page_offset}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
having LOG ERR add ERR message to LOG. You should change it to NOTICE\INFO
… automatically (sonic-net#635) #### Why I did it src/sonic-platform-common ``` * d9de488 - (HEAD -> 202412, origin/202412) [code sync] Merge code from sonic-net/sonic-platform-common:202411 to 202412 (#28) (7 hours ago) [mssonicbld] * 30112ca - [code sync] Merge code from sonic-net/sonic-platform-common:202411 to 202412 (#26) (31 hours ago) [mssonicbld] * a36263b - [code sync] Merge code from sonic-net/sonic-platform-common:202411 to 202412 (#24) (2 days ago) [mssonicbld] ``` #### How I did it #### How to verify it #### Description for the changelog
…tically (sonic-net#753) #### Why I did it src/sonic-sairedis ``` * 0c1750e - (HEAD -> 202412, origin/HEAD, origin/202412) Merge pull request #32 from r12f/cherry-pick-1509 (9 hours ago) [Riff] |\ | failure_prs.log skip_prs.log 995e71f - [sairedis/syncd] Implement bulk get support (sonic-net#1509) (19 hours ago) [Stepan Blyshchak] * | 2f4d39d - Fixing the sairedis build issue caused at https://github.com/sonic-ne… (#33) (18 hours ago) [mssonicbld] * | 1da1f58 - Fix counter issues on VS platform (#35) (18 hours ago) [mssonicbld] |/ * 4d1b885 - Merge pull request #28 from r12f/cherry-pick-1234 (20 hours ago) [Riff] * 3c5f3e1 - sonic-sairedis : Wred stats feature changes on Sai-redis and Syncd (sonic-net#1234) (30 hours ago) [r12f] ``` #### How I did it #### How to verify it #### Description for the changelog
…tomatically (sonic-net#789) #### Why I did it src/sonic-linux-kernel ``` * 971a5d3 - (HEAD -> 202412, origin/HEAD, origin/202412) [code sync] Merge code from sonic-net/sonic-linux-kernel:202411 to 202412 (#28) (21 hours ago) [mssonicbld] ``` #### How I did it #### How to verify it #### Description for the changelog
…omatically (sonic-net#811) #### Why I did it src/sonic-swss-common ``` * fc3fba2 - (HEAD -> 202412, origin/HEAD, origin/202412) [FC] remove FLEX_COUNTER_DELAY_STATUS_FIELD (sonic-net#982) (#28) (16 hours ago) [mssonicbld] ``` #### How I did it #### How to verify it #### Description for the changelog
Why I did it
To debug the 'err:-5' issue. Need to understand whether this error log appears as a result of a read eeprom operation (which in that case, can be ignored), or due to a write operation (needs to be handled).
Work item tracking
How I did it
Added logs.
How to verify it
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)