-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
DellEMC S6000 xcvrd support #2560
Conversation
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.
where is the sleep?
code is still buggy. |
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.
Please note that the function signature for get_transceiver_change_event()
should be as follows:
def get_transceiver_change_event(self, timeout=0):
It should accept an optional timeout value. If the value is 0, it should block indefinitely until an event is received, otherwise, it should block until the timeout expires. Please see the comments in the API definition; https://github.com/Azure/sonic-platform-common/blob/92b54b1984db0b71196e4fe68cc5a09796fd185c/sonic_sfp/sfputilbase.py#L1097
Joe, I agree with the standards, but in S6000 we are using polling method so we used a 1 second delay in while loop if no change in transceiver status. Instead, if an OIR change is detected we return updated port_dict to xcvrd. So, the core need for timeout variable is achieved without using that in the code. The code block indefinitely until an OIR change is detected without timeout variable. I modified the function definition as per the API standard. |
Joe, added timeout support in xcvrd. Here we used time.time() library which is which is subject to variance as per system clock adjustments. This helps us to detect modified time variations. We handle timeout value and update port_dict within the given timeout value. Only incremental updates are sent to xcvrd. We sleep if there is no change with 1 second granularity.. |
@lguohan: Please review again. |
* DellEMC S6000, xcvrd support * sleep 1 second to avoid busy looping * removal of dead code * Correct typo error to 1 second * Introduced 1 second sleep * Revamped script with blocking call support * get_transceiver_change_event api definition update * adding timeout support for get_transceiver_change_event
* DellEMC S6000, xcvrd support * sleep 1 second to avoid busy looping * removal of dead code * Correct typo error to 1 second * Introduced 1 second sleep * Revamped script with blocking call support * get_transceiver_change_event api definition update * adding timeout support for get_transceiver_change_event
…ule head utilities: * f40d82f 2022-12-15 | [db_migrator] Fix migration of Loopback data: handle all Loopback interfaces (sonic-net#2560) (HEAD -> 202205) [Vaibhav Hemant Dixit] * efd2ab8 2022-12-14 | [muxcable][show] update `show mux tunnel-route` to separate ASIC and kernel into two columns (sonic-net#2553) (HEAD -> 202205) [Jing Zhang] kernel: * 085d8cb 2022-12-14 | Merge pull request sonic-net#303 from madhava28/cisco/kernel_config (HEAD -> 202205) [Saikrishna Arcot] swss: * d8e46b9 2022-12-16 | [muxorch] Skip programming ACL for standby `active-active` ports (sonic-net#2569) (HEAD -> 202205) [Longxiang Lyu] dhcprelay: * 9b30690 2022-12-17 | fix handleSwssNotification crash in dhcp6relay (sonic-net#28) (HEAD, github/master) [jcaiMR] sairedis: * abe242a 2022-12-16 | Manage LANES mapping on VOQ system (sonic-net#1127) (HEAD -> 202205) [Bohan Yang] Signed-off-by: Ying Xie <ying.xie@microsoft.com>
utilities: * f0fc333e 2022-12-15 | [db_migrator] Fix migration of Loopback data: handle all Loopback interfaces (sonic-net#2560) (HEAD -> 202012, github/202012) [Vaibhav Hemant Dixit] * ad7a4d42 2022-11-30 | Support for platforms based on Clounix Networks' device (sonic-net#2108) [songqh2022] Signed-off-by: Ying Xie <ying.xie@microsoft.com>
utilities: * f0fc333e 2022-12-15 | [db_migrator] Fix migration of Loopback data: handle all Loopback interfaces (#2560) (HEAD -> 202012, github/202012) [Vaibhav Hemant Dixit] * ad7a4d42 2022-11-30 | Support for platforms based on Clounix Networks' device (#2108) [songqh2022] Signed-off-by: Ying Xie <ying.xie@microsoft.com> Signed-off-by: Ying Xie <ying.xie@microsoft.com>
#13202 advance sonic-utilities submodule for 202211 branch 34428157 - (HEAD, origin/202211) Revert "Optimize the execution time of the 'show techsupport' script to 5-10%, (Qos config change #2504)" (6 days ago) [stormliang] c3bd01f6 - Revert "[generate_dump] Optimize the execution time of 'show techsupport' CLI by parallel function execution ([201811][Devices] Add new device CIG CS6436-56P #2512)" (6 days ago) [stormliang] 5a326d8b - [Mellanox] Change severity to NOTICE in Mellanox buffer migrator when unable to fetch DEVICE_METADATA due to empty CONFIG_DB during initialization ([warm boot] cherry-pick PR #2538 and advance related sub-modules in 201811 branch #2569) (2 weeks ago) [Stephen Sun] 50b36ef3 - Fix issue: unconfigured PGs are displayed in watermarkstat ([docker-lldp]: fix several issues in lldpd docker #2556) (2 weeks ago) [Stephen Sun] a9fd2a79 - [Command Ref] Add doc for syslog rate limit ([sub module] move sairedis and swss to 201811 branch #2508) (2 weeks ago) [Junchao-Mellanox] 80546ff3 - [generate_dump] Optimize the execution time of 'show techsupport' CLI by parallel function execution ([201811][Devices] Add new device CIG CS6436-56P #2512) (2 weeks ago) [Vadym Hlushko] 6649ca8a - [timer.unit.j2] use wanted-by in timer unit ([201803] [services] Restart SwSS service upon unexpected critical process exit #2546) (2 weeks ago) [Stepan Blyshchak] dd23d0ef - Fixes [Sub-If|VRF] Unbind sub-interface from VRF is failed #12170: Delete subinterface and recreate the subinterface in ([VLAN] "show mac" doesn't work when interface added to vlan as tagged member #2513) (2 weeks ago) [Preetham] 236749d3 - [db_migrator] Fix migration of Loopback data: handle all Loopback interfaces (DellEMC S6000 xcvrd support #2560) (2 weeks ago) [Vaibhav Hemant Dixit] 5762d814 - Optimize the execution time of the 'show techsupport' script to 5-10%, (Qos config change #2504) (2 weeks ago) [Vadym Hlushko] d3c3e368 - [muxcable][show] update show mux tunnel-route to separate ASIC and kernel into two columns (build errors on branch 201811 for centec platform #2553) (2 weeks ago) [Jing Zhang] c98648a1 - [show]Fix show route return code on error (Dell SMF driver hwmon number reorder fix for Dell S6100/Z9100 #2542) (2 weeks ago) [Sudharsan Dhamal Gopalarathnam] 01374673 - [route_check]: Ignore ASIC only SOC IPs (Added new SN3700/SN3700C Mellanox platforms #2548) (2 weeks ago) [Lawrence Lee] d2967805 - YANG Validation for ConfigDB Updates: WARM_RESTART, SFLOW_SESSION, SFLOW, VXLAN_TUNNEL, VXLAN_EVPN_NVO, VXLAN_TUNNEL_MAP, MGMT_VRF_CONFIG, CABLE_LENGTH, VRF tables ([submodule 201811] advance sairedis and swss submodule for 201811 branch #2526) (2 weeks ago) [isabelmsft] 88b01ffd - [db_migrator] Remove import of swsssdk as it is not supported in master ([build]: apply proxy setting to curl. #2544) (2 weeks ago) [Vaibhav Hemant Dixit] 4ae970c6 - Support syslog rate limit configuration for containers and host (Move FRR from 4.0 to 6.0.2 and make new frr version and pkg compile #2454) (2 weeks ago) [Junchao-Mellanox] 608ed147 - [generate_dump] [Mellanox] Fix the duplicate dfw dump collection problem by adding symlinks ('show vlan config' is not displaying the VLAN members, after the clear config and reload with default l2 configuration. #2536) (2 weeks ago) [Vivek] bdc2599f - [config] Add check in config interface ip command to block if the interface is portchannel member ([sub module] advance sonic-swss sub module #2539) (2 weeks ago) [Sudharsan Dhamal Gopalarathnam] cff4fed5 - [system-health] Improve code structure of system health CLIs ([sub-module] advance sonic-swss sub-module #2453) (2 weeks ago) [Junchao-Mellanox] 488e5714 - Transceiver eeprom dom CLI modification to show output from TRANSCEIVER_DOM_THRESHOLD table (Fix for KeyError: 'DEVICE_NEIGHBOR' when executing 'show interfaces neighbor expected' command #2535) (2 weeks ago) [mihirpat1] 07ca5def - sonic-utilities: Update config reload() to verify formatting of an input file ([ntp]: Do not disable reader for error ENOBUFS #2529) (2 weeks ago) [Caitlin Choate] f0f083a2 - [GCU] Add RemoveCreateOnlyDependency Validator/Generator (Enabling Fast-reboot command in s6100 loaded with T0 topo getting Failed unmounting /host error #2500) (2 weeks ago) [jingwenxie] eca0253c - [QoS] Introduce delay to the qos reload flow (Config reload/load_minigraph not clearing State DB #2503) (2 weeks ago) [DavidZagury] 35158ee0 - Use github code scanning instead of LGTM ([sub module] sub module sonic-swss-common tracking 201811 branch #2530) (2 weeks ago) [Liu Shilong] 682b5cee - Change show kube command default value of insecure key to True ([submodule] update sonic-snmpagent #2517) (2 weeks ago) [lixiaoyuner] ce19e631 - Add db_migrator_constants.py script to setup.py (Add device data for Arista 7060PX/DX4-32 #2534) (2 weeks ago) [Vaibhav Hemant Dixit] 0d0c2693 - [drop counters] Fix CLI script for unconfigured PGs ([config] Do not fail for minigraphs which do not have neighbors listed in <Devices> section #2518) (2 weeks ago) [Lior Avramov] 2c69d0fd - Update vrf add, del commands for duplicate/non-existing VRFs (solve package build dependency issue #2467) (2 weeks ago) [Muhammad Danish] efc09280 - Port 202012 DB migration changes to newer branches ([vs]: Force10-S6000 buffer settings for virtual switch #2515) (2 weeks ago) [Vaibhav Hemant Dixit] 70a15aaa - [VXLAN]Fixing traceback in show remotemac when mac moves during command execution ([build] When generating image version, handle case where current commit has no reachable tags #2506) (2 weeks ago) [Sudharsan Dhamal Gopalarathnam]
…rnal-202012 branch Related work items: sonic-net#2108, sonic-net#2560, sonic-net#9486, sonic-net#12325, sonic-net#12626, sonic-net#12739, sonic-net#12835, sonic-net#12836, sonic-net#12865, sonic-net#12880, sonic-net#12903, sonic-net#12914, sonic-net#12922, sonic-net#12925, sonic-net#12930, sonic-net#12989, sonic-net#12990, sonic-net#13006, sonic-net#13014, sonic-net#13040, sonic-net#13092, sonic-net#13124, sonic-net#13132, sonic-net#13146, sonic-net#13157, sonic-net#13168, sonic-net#13175, sonic-net#13177, sonic-net#13182, sonic-net#13188, sonic-net#13226, sonic-net#13233, sonic-net#13244, sonic-net#13249
- What I did
- How I did it
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)