-
Notifications
You must be signed in to change notification settings - Fork 175
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
[ycable] add definitions of some new API's for Y-Cable infrastructure #301
Conversation
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
sonic_y_cable/y_cable_base.py
Outdated
|
||
raise NotImplementedError | ||
|
||
def mem_read(self): |
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.
def mem_read(self, target, addr, length):
Could we add additional three input parameters:
- target : local (TOR) or remote (NIC) MCU
- addr : the starting address of the MCU's memory space
- length: length to be read, unit: byte
sonic_y_cable/y_cable_base.py
Outdated
None | ||
|
||
Returns: | ||
a Dictionary: |
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.
Should we return bytearray to represent the data or there is another approach is to convert the data to human readable string and return it as dictionary?
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
…#301) Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com This PR adds the following API's useful for muxcable MCU's debug, these are added as base class for muxcable API's and implemented by vendor def queue_info(self): This API should dump all the meaningful data from the eeprom which can help vendor debug the queue info currently relevant to the MCU using this API the vendor could check how many txns are currently in the queue etc for debugging purpose def reset_cause(self): This API should return the reset cause for the NIC MCU. This should help ascertain whether a reset was caused by soft reboot or cable poweroff def operation_time(self): This API should return the time since the cable is powered on from NIC MCU side This should be helpful in debugging purposes as to if/when the cable has been powered on def mem_read(self): This API should return the memory contents/as well as pointers/counters for DMA or hardware FIFO's which could be useful for debugging the state of the MCU
…#301) Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com This PR adds the following API's useful for muxcable MCU's debug, these are added as base class for muxcable API's and implemented by vendor def queue_info(self): This API should dump all the meaningful data from the eeprom which can help vendor debug the queue info currently relevant to the MCU using this API the vendor could check how many txns are currently in the queue etc for debugging purpose def reset_cause(self): This API should return the reset cause for the NIC MCU. This should help ascertain whether a reset was caused by soft reboot or cable poweroff def operation_time(self): This API should return the time since the cable is powered on from NIC MCU side This should be helpful in debugging purposes as to if/when the cable has been powered on def mem_read(self): This API should return the memory contents/as well as pointers/counters for DMA or hardware FIFO's which could be useful for debugging the state of the MCU
…PI's (sonic-net#301) This PR adds a try/catch block for some abstract muxcable API's. In particular the exception logic is added for all the API's where there is a possibility for exceptions to be passed by Vendor API's implementation, in this regard ycabled will have all abstract muxcable API's covered by exception logic with this PR. If the exception is caught it will be just logged and daemon will resume its normal operation. Description Motivation and Context How Has This Been Tested? Unit-tests and deploying changes on testbed Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com
This PR adds the following API's useful for muxcable MCU's debug, these are added as base class for muxcable API's and implemented by vendor
Description
Motivation and Context
How Has This Been Tested?
Additional Information (Optional)