Comments (10)
One more question - shouldn't the reset/set_xxx() functions be performed via xcvrd since that is the driver which does port initializations, transceiver status change event handlings ? There could be potential contention issues if they are done by 2 separate contexts (depending on the underlying device access).
from sonic-platform-common.
Hi @wjaco. Thanks for opening this issue.
To complete the below get/set function, it is found those information are not parsed from EEPROM though there are parser handlers found.
When you refer to "parser handlers," are you referring to these methods in the SfpBase API class?
get_rx_los
get_tx_fault
get_tx_disable
get_tx_disable_channel
get_lpmode
get_power_override
tx_disable
tx_disable_channel
set_lpmode
set_power_override
If so, I do agree that all of the above should be implemented in what is currently sfputilbase.py (however, low-power mode ('get_lpmode(),
set_lpmode()`) uses a dedicated pin, and is not part of the EEPROM).
Not found in the DB too - which I think is brought into by the sfputil base class only via xcvrd right ? Are these going to be available ?
True. This data should ultimately get polled by xcvrd and stored in the State DB.
One more question - shouldn't the reset/set_xxx() functions be performed via xcvrd since that is the driver which does port initializations, transceiver status change event handlings ? There could be potential contention issues if they are done by 2 separate contexts (depending on the underlying device access).
Optimally, yes, xcvrd should be the arbiter of the transceivers, which will prevent any contention.
We are currently designing a refactor of the sonic_sfp package in sonic-platform-common, which will ultimately replace sfputilbase.py and create a more complete and well-structured API for handling common SFP transceiver interactions, thus eliminating the need for platform vendors to basically re-invent the wheel by writing similar EEPROM parsing code.
Separate from the sonic_sfp refactor, we also intend to update xcvrd such that it instantiates objects to interact with the transceivers, and all interaction goes through xcvrd, thus eliminating an potential contention. Therefore, the CLI for resetting a transceiver will need to be changed to send a message to xcvrd asking it to reset a transceiver.
I am moving this issue to the sonic-platfrom-common repo for the time being until the sonic_sfp refactor is complete.
from sonic-platform-common.
Thanks @jleveque .
Yes, this sounds perfect. We will watch for the enhancement. And yes, I was referring to the SfpBase and DeviceBase classes only - sorry for not being specific.
Thanks and regards,
Wilson Jacob
[email protected]
from sonic-platform-common.
Thanks @jleveque for the detail update.
Making xcrvd as the owner (central entity) for all sfp/optics related operations would provide a common base for all underlying platforms.
Just trying to see, tentatively how long these enhancements/refactoring would take?
That would help us determine as to what alternative we can have think/plan at platform's infra layer until this change from xcrvd is in place.
from sonic-platform-common.
Just trying to see, tentatively how long these enhancements/refactoring would take?
That would help us determine as to what alternative we can have think/plan at platform's infra layer until this change from xcrvd is in place.
We are still in the early stages of the design for the refactor of sonic_sfp. I don't expect it to be done for a few months. After that we will work on refactoring xcvrd. I don't have any ETAs at the moment.
from sonic-platform-common.
@jleveque following up on this, any updates or ETA that you could share with us?
from sonic-platform-common.
@sachinv-msft can you please check the latest SFP-refactor code. HLD for the same.
from sonic-platform-common.
@prgeor has there been a refactored code to address this issue? how is it that i can verify we are not failing on test cases because of this?
from sonic-platform-common.
@sachinv-msft yes this has been addressed in SFP-refactor in latest master. Ref. SFP-refactor HLD. Dell platform (use as an example) changes to use SFP-refactor: sonic-net/sonic-buildimage#9016
from sonic-platform-common.
@wjaco @sachinv-msft can this be closed?
from sonic-platform-common.
Related Issues (20)
- [sonic_eeprom] Class methods shouldn't take the EEPROM data as a parameter HOT 11
- Enhance pcieutil to check actual presence of pcie device HOT 1
- xcvrd crashes while parsing QSFP-DD fields HOT 1
- Pytest: test_crm failed on loganalyzer error
- SFP-Refactor: Could not able to fetch get_transceiver_info() HOT 3
- [SFP-refactor] xcvrd crashes while trying to read CMIS passive cables HOT 2
- test-xcrvd unit test unstable HOT 1
- [SFP-Refactor] Modify transceiver dict vendor key name
- xcvrd crashes in SFP refactored code. HOT 5
- QSFP-DD FW upgrade doesn't work
- [syseeprom] Vendor extension TLV content is not displayed HOT 1
- [sonic_ssd] Nokia-7215: "show platform ssdhealth" not showing health percent HOT 1
- This repo is missing important files
- [sonic_xcvr]create_xcvr_api don't support port_id=0x0c
- xcvrd crash: Exception occured at CmisManagerTask thread due to TypeError HOT 2
- Question about cdb get_fw_info using cmis 4.0
- Incorrect vdm freeze and unfreeze is followed on collecting PM stats
- Unable to parse `Extended Specification Compliance` and `10/40G Ethernet Compliance Code` for `QSFP+ or later with SFF-8636 or SFF-8436` whose ID is 0x0D and `revision compliance` is greater than 2
- The order of the `SfpUtilHelper.logical` ports list is broken
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sonic-platform-common.