-
Notifications
You must be signed in to change notification settings - Fork 160
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
[xcvrd] initial support for integrating vendor specfic class objects for calling Y-Cable API's inside xcvrd #197
[xcvrd] initial support for integrating vendor specfic class objects for calling Y-Cable API's inside xcvrd #197
Conversation
…for calling Y-Cable API's inside xcvrd Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
This pull request introduces 4 alerts when merging 368ff10 into 2d2749a - view on LGTM.com new alerts:
|
dependent on sonic-net/sonic-platform-common#203 |
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>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
This pull request introduces 16 alerts when merging 7091782 into 53e1532 - view on LGTM.com new alerts:
|
|
||
model = port_info_dict.get('model') | ||
|
||
if vendor is None: |
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.
if model is None:
?
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.
fixed
can you add unit test accordingly? |
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
sonic-xcvrd/tests/test_xcvrd.py
Outdated
mux_info_dict['version_nic_active'] = '0.8' | ||
mux_info_dict['version_nic_inactive'] = '0.7' | ||
mux_info_dict['version_nic_next'] = '0.7' | ||
set_show_firmware_fields("Ethernet0", mux_info_dict, xcvrd_show_fw_res_tbl) |
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.
What is being tested in this test case?
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.
added an assert for return code
fixed
@@ -22,6 +26,10 @@ | |||
|
|||
helper_logger = logger.Logger(SYSLOG_IDENTIFIER) | |||
|
|||
y_cable_port_instances = {} | |||
y_cable_port_locks = {} |
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.
are those locks shared between CLI and applications?
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.
that's correct, moving to the abstract class model, there is a lock for each port. Each api to y_cable driver will lock it for that port and only release when the API is returned. Basically all y_cable api's will be called by xcvrd only. cli will call the y_cable api through redis and invoke it per port.
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.
This means that presence of cli activity such show, could potentially affect our switching time, right?
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.
For the same port, Yes it will. Cli activities such as show hwmode, download firmware etc would slow these, but these will not be used as is for our production. show hwmode etc will be used for debugging, download, activate etc will go through ASK mode.
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
This pull request introduces 1 alert when merging db13a08 into f63fc94 - view on LGTM.com new alerts:
|
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
This pull request introduces 1 alert when merging b1f916a into 57e3d78 - view on LGTM.com new alerts:
|
This commit could not be cleanly cherry-pick to 202012. Please submit another PR. |
…for calling Y-Cable API's inside xcvrd (sonic-net#197) Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com Description This PR integrates vendor specific class objects inside xcvrd for Y-Cable API's to be called. Detailed designed document can be found sonic-net/SONiC#757 Motivation and Context Basically xcvrd now has an interface for Y-Cable to interact with PMON docker and HOST which can be uniform across all vendors. As part of this refactor, we will be moving towards a model where only xcvrd interacts with the cables/transceivers, and host-side processes will communicate with xcvrd rather than with the devices directly with Y-Cable. How Has This Been Tested? Ran the changes on Arista7050cx3 switch, making changes inside the container. Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
…for calling Y-Cable API's inside xcvrd (#197) (#213) Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com Merging this in 202012 branch because there was a merge conflict in original PR #197 Description This PR integrates vendor specific class objects inside xcvrd for Y-Cable API's to be called. Detailed designed document can be found sonic-net/SONiC#757 Motivation and Context Basically xcvrd now has an interface for Y-Cable to interact with PMON docker and HOST which can be uniform across all vendors. As part of this refactor, we will be moving towards a model where only xcvrd interacts with the cables/transceivers, and host-side processes will communicate with xcvrd rather than with the devices directly with Y-Cable. How Has This Been Tested? Ran the changes on Arista7050cx3 switch, making changes inside the container. Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com
…-net#197) Unifying the platform api for get_pcie_aer_stats with PcieBase
Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com
Description
This PR integrates vendor specific class objects inside xcvrd for Y-Cable API's to be called.
Detailed designed document can be found sonic-net/SONiC#757
Motivation and Context
Basically xcvrd now has an interface for Y-Cable to interact with PMON docker and HOST
which can be uniform across all vendors. As part of this refactor, we will be moving towards a model where only xcvrd interacts with the cables/transceivers, and host-side processes will communicate with xcvrd rather than with the devices directly with Y-Cable.
How Has This Been Tested?
Ran the changes on Arista7050cx3 switch, making changes inside the container.
Additional Information (Optional)