Support SAI_PORT_SERDES_ATTR_CUSTOM_COLLECTION#3764
Support SAI_PORT_SERDES_ATTR_CUSTOM_COLLECTION#3764prsunny merged 11 commits intosonic-net:masterfrom
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@prgeor @mihirpat1 could you please review, thanks |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
… for serdes attrs
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@prsunny can you merge? |
|
@longhuan-cisco , i see new boost library added, can you provide description of why its added? |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Looks like, Azure.sonic-swss failure was due to base line issue, which was hit on other PRs also |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
I saw cc @prsunny |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@prsunny kindly reminder for approval/merge. all pre-commit checks passed. |
|
@prsunny @prgeor @lguohan : Pls shared review comments. We made this PR to introduce boost:variant type but it changes keywords in a non-functional way. |
Hi @balanokia Please refer to below old code snapshot (before this PR merged): sonic-swss/orchagent/portsorch.cpp Lines 435 to 524 in 5671e08 sonic-swss/orchagent/port/portschema.h Lines 75 to 91 in 5671e08 sonic-swss/orchagent/portsorch.cpp Lines 4492 to 4493 in 5671e08 sonic-swss/orchagent/portsorch.cpp Line 5124 in 5671e08 |
sonic-platform-daemon side change: sonic-net/sonic-platform-daemons#643 What I did Support SAI_PORT_SERDES_ATTR_CUSTOM_COLLECTION (i.e. custom serdes attributes represented in JSON based string format) Use boost::variant for the serdes_attr map value to support both std::vector<uint32_t> and std::string in a type-safe way, with easy extensibility to add more types later. Signed-off-by: Kalash Nainwal <kalash@nexthop.ai>
Hi @longhuan-cisco Thanks |
Hi @balanokia, thanks for the context on PHY terminology. In general PHY literature, “pre‑emphasis” is indeed often used to refer to TX equalization and is sometimes implemented/expressed via TX‑FIR/FFE taps. However, in SONiC orchagent this saved/restored bucket has historically been a generic SERDES attribute bucket, not strictly “pre‑emphasis only”. It can include multiple SAI_PORT_SERDES_ATTR_* knobs depending on platform media_settings.json/config (e.g., PREEMPHASIS, IDRIVER/IPREDRIVER, TX_FIR_* taps, PAM4 ratio/common-mode controls, precoding, etc.). SAI itself defines these as distinct SERDES attributes, where PREEMPHASIS is just one item in the list. Because the bucket is not guaranteed to contain PREEMPHASIS on every platform/vendor/module, keeping “preemphasis” as the generic bucket/variable/log keyword is semantically misleading and can oversimplify what is actually being saved/restored. Renaming it to For debuggability, a more robust community-wide improvement would be to log which SERDES attributes are being set/saved/restored (e.g., list attr IDs/names at NOTICE, and optionally values at DEBUG), so anyone can grep for a stable tag and still see the exact contents. This makes the behavior transparent across all vendors/platforms/config combinations. Thanks, |
sonic-platform-daemon side change: sonic-net/sonic-platform-daemons#643 What I did Support SAI_PORT_SERDES_ATTR_CUSTOM_COLLECTION (i.e. custom serdes attributes represented in JSON based string format) Use boost::variant for the serdes_attr map value to support both std::vector<uint32_t> and std::string in a type-safe way, with easy extensibility to add more types later.
sonic-platform-daemon side change: sonic-net/sonic-platform-daemons#643 What I did Support SAI_PORT_SERDES_ATTR_CUSTOM_COLLECTION (i.e. custom serdes attributes represented in JSON based string format) Use boost::variant for the serdes_attr map value to support both std::vector<uint32_t> and std::string in a type-safe way, with easy extensibility to add more types later.
sonic-platform-daemon side change: sonic-net/sonic-platform-daemons#643 What I did Support SAI_PORT_SERDES_ATTR_CUSTOM_COLLECTION (i.e. custom serdes attributes represented in JSON based string format) Use boost::variant for the serdes_attr map value to support both std::vector<uint32_t> and std::string in a type-safe way, with easy extensibility to add more types later. Signed-off-by: Baorong Liu <96146196+baorliu@users.noreply.github.com>
|
@prgeor Could we cherry-pick this to 202511 |
|
@longhuan-cisco @prgeor Pls suggest if we plan to take this PR to 202511 branch. I already see @longhuan-cisco already raised it for merge to 202511. |
sonic-platform-daemon side change: sonic-net/sonic-platform-daemons#643
What I did
Support SAI_PORT_SERDES_ATTR_CUSTOM_COLLECTION (i.e. custom serdes attributes represented in JSON based string format)
Use boost::variant for the serdes_attr map value to support both std::vector<uint32_t> and std::string in a type-safe way, with easy extensibility to add more types later.
Why I did it
How I verified it
Tested end-to-end xcvrd->OA->SAI/SDK
Covered below 3 scenarios:
Details if related