Skip to content
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

[sfputil]Refactoring read_porttab_mappings #264

Merged
merged 2 commits into from
Mar 10, 2022

Conversation

dgsudharsan
Copy link
Collaborator

@dgsudharsan dgsudharsan commented Feb 24, 2022

Description

Motivation and Context

Refactored sfputilhelper API read_porttab_mappings. This API has duplicate logic as done inside get_port_config.
The get_port_config has logic to first look into config_db, fallback to hwsku/platform.json, fallback to port_config.ini. Additionally added another fallback to look into the porttabfile to allow custom porttabfile to be used.

How Has This Been Tested?

Ran some basic platform tests. Existing UT should also cover these changes

Additional Information (Optional)

This is to address review comment in #258 (comment)

Signed-off-by: Sudharsan Dhamal Gopalarathnam <sudharsand@nvidia.com>
@dgsudharsan
Copy link
Collaborator Author

@prgeor Can you please review?

@prgeor prgeor merged commit 35bad16 into sonic-net:master Mar 10, 2022
liat-grozovik pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Apr 7, 2022
Update sonic-platform-common submodule to pickup new commits:
01512ec [SSD]Enhance ssd_generic with more error handling to avoid python crash sonic-net/sonic-platform-common#271
ac3e7f1 [y_cable][Broadcom] update the BRCM y_cable driver to release 2.0 sonic-net/sonic-platform-common#263
573717a [Credo][Ycable] Fix Credo firmware download API download_firmware flag sonic-net/sonic-platform-common#269
a844f18 [xcvr] Add get_module_fw_info method to XcvrApi class. sonic-net/sonic-platform-common#267
35bad16 [sfputil]Refactoring read_porttab_mappings sonic-net/sonic-platform-common#264
83c4345 [SSD Generic] Add support for parsing nvme ssd model, health and temperature sonic-net/sonic-platform-common#265
5da31e1 [ycable][credo] Fix the is_link_active API for Credo Ycable sonic-net/sonic-platform-common#260
931c6ea [Y-Cable][Credo] add theading locker to support thread-safe calling, add SKU check for download_firmware API. sonic-net/sonic-platform-common#222
ff3aa75 Fix SFF8472 Enhanced Options sonic-net/sonic-platform-common#259
a8a83e9 [ssd] Allow individual vendor parsers to handle errors sonic-net/sonic-platform-common#252

Signed-off-by: Kebo Liu <kebol@nvidia.com>
@mlok-nokia
Copy link
Contributor

mlok-nokia commented Apr 8, 2022

Based on the current multiasic platform behaviours, It looks like this PR breaks the "sudo sfputil show eeprom" and "sudo sfputil show presence" on multiasic platform. On the multiasic platform, the minigraph also generate the port info in the global config_db.json with partial data. The Function get_port_config(hwsku, platform) gets "PORT|*" with partial info from the host database. That info doesn't contain physical info which is required for the sfputilhelper.

@prgeor
Copy link
Collaborator

prgeor commented Apr 8, 2022

Based on the current multiasic platform behaviours, It looks like this PR breaks the "sudo sfputil show eeprom" and "sudo sfputil show presence" on multiasic platform. On the multiasic platform, it looks like a partial port info is inserted to a "PORT" table in CONFIG_DB in the host database if a port has a SFP and link up. The Function get_port_config(hwsku, platform) gets "PORT|*" with partial info from the host database. That info doesn't contain physical info which is required for the sfputilhelper.

@mlok-nokia please raise a Git issue?

oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-platform-common that referenced this pull request Oct 25, 2024
…l logic for active-active cable (sonic-net#264)

Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com
This PR adds some improvement logic to ycabled daemon

correct the loopback IP's for active-active cable type for libra gRPC read_side establishment
improves the code for timeout value injection for different RPC's for gRPC
for cli HW_STATUS the daemon tries to use cached old value, if not present try to do RPC for getting ForwardingState with timeout of 0.1 ms
Description
Motivation and Context
Required for gRPC logic improvement in few active-active scenario's

How Has This Been Tested?
UT and deploying the changes in actual testbed


Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants