Skip to content

Add SAI_ATTR_PORT_FW_REVISION to saiport#2197

Merged
tjchadaga merged 1 commit into
opencomputeproject:masterfrom
pandeytejas:master
Oct 7, 2025
Merged

Add SAI_ATTR_PORT_FW_REVISION to saiport#2197
tjchadaga merged 1 commit into
opencomputeproject:masterfrom
pandeytejas:master

Conversation

@pandeytejas

@pandeytejas pandeytejas commented Aug 28, 2025

Copy link
Copy Markdown
Contributor

This proposal outlines the addition of a new port attribute designed to provide a standardized method for querying the active SerDes firmware revision of a port.

Proposal -

Add label SAI_ATTR_PORT_FW_REVISION under sai_port_attr_h in saiport.h to store firmware related information. This attribute will store a string denoting the current SerDes firmware version running on the port.

@pandeytejas
pandeytejas force-pushed the master branch 5 times, most recently from 5d32716 to a87c2bf Compare August 28, 2025 16:49
@rlhui

rlhui commented Sep 3, 2025

Copy link
Copy Markdown
Collaborator

@pandeytejas , is this presented in SAI meeting?

@pandeytejas

pandeytejas commented Sep 4, 2025

Copy link
Copy Markdown
Contributor Author

No, this is not presented yet.

Please let me know when is the earliest we can do that if that is necessary.

@pandeytejas

Copy link
Copy Markdown
Contributor Author

@rlhui , any updates on the above?

@tjchadaga

Copy link
Copy Markdown
Collaborator

@pandeytejas - are you able to discuss this PR in this week's community meeting (on 9/18)?

@tjchadaga

Copy link
Copy Markdown
Collaborator

@pandeytejas - also, please resolve the DCO error by updating the signature

@pandeytejas

pandeytejas commented Sep 16, 2025

Copy link
Copy Markdown
Contributor Author

@tjchadaga sure, I can discuss this PR on 9/18. Please send me an invite for the same.

@pandeytejas
pandeytejas force-pushed the master branch 2 times, most recently from 15c3a1e to 35eaef6 Compare September 16, 2025 20:57
@tjchadaga

Copy link
Copy Markdown
Collaborator

@pandeytejas - we have a couple of other PRs scheduled for 9/18. We can discuss this as well if time permits. Otherwise, I will add it to next week's agenda

Comment thread inc/saiport.h Outdated
@JaiOCP

JaiOCP commented Sep 17, 2025 via email

Copy link
Copy Markdown
Contributor

@pandeytejas

Copy link
Copy Markdown
Contributor Author

@JaiOCP I think the last comment came out wrong - I do not have explicit example to support the string vs uint argument.

I can present a sample usecase and workflow for these attributes -

The usecase for this today is that based on the optic type and speed + modulation being used we have seen that certain serdes firmware would be more suitable over others which means we would have cases wherein we need to dynamically load the firmware. We currently do not have a way to query and cross check if the loaded firmware is what we expect and this attribute is to address that gap.

For a sample workflow -

  1. The NOS will query for SAI_PORT_ATTR_FW_REVISION_SIZE (READ_ONLY) and SAI_PORT_ATTR_FW_REVISION (READ_ONLY)
  2. The NOS allocates appropriate space for reading the fw revision based on the retrieved size. If it cannot - it will error out.
  3. The NOS reads SAI_PORT_FW_REVISION
  4. The NOS will read other relevant attributes and determine if SAI_PORT_ATTR_FW_REVISION is the expected one.

We do not have enums to support dynamically loading the firmware but that seems a good to have and could be added at a later stage. We will setup internal mechanism to address the mismatch issue such as triggering dynamic reload or alert pipelines whichever is more suitable for the vendor.

@pandeytejas

Copy link
Copy Markdown
Contributor Author

@JaiOCP @tjchadaga based on the community sync, made following changes -

  1. Removed Size Attribute
  2. Made naming more specific to indicate that this is serdes firmware

Denoting a usecase as to how the values would be received by the NOS, we can use the following workflow to understand -

  1. The NOS will query for SAI_PORT_ATTR_SERDES_FW_REVISION (READ_ONLY)
  2. The NOS will receive a reply containing the count and start address to the memory containig the string denoting the serdes firmware revision (lets say for example the serdes fw revision here is Zr190). This will look like -
{
count: 6
list: 0x0b3625210
}

Now the memory address will contain Zr160\0 as the next 6 characters as indicated by the count field.
3. The NOS can allocate memory based on the count field and read the characters starting at the given address.

Please let me know if this is what you were looking for. Thanks for reviewing!

@JaiOCP

JaiOCP commented Sep 22, 2025

Copy link
Copy Markdown
Contributor

@JaiOCP @tjchadaga based on the community sync, made following changes -

  1. Removed Size Attribute
  2. Made naming more specific to indicate that this is serdes firmware

Denoting a usecase as to how the values would be received by the NOS, we can use the following workflow to understand -

  1. The NOS will query for SAI_PORT_ATTR_SERDES_FW_REVISION (READ_ONLY)
  2. The NOS will receive a reply containing the count and start address to the memory containig the string denoting the serdes firmware revision (lets say for example the serdes fw revision here is Zr190). This will look like -
{
count: 6
list: 0x0b3625210
}

Now the memory address will contain Zr160\0 as the next 6 characters as indicated by the count field. 3. The NOS can allocate memory based on the count field and read the characters starting at the given address.

Please let me know if this is what you were looking for. Thanks for reviewing!

Yes, thats what I was looking. Thanks

@JaiOCP

JaiOCP commented Sep 22, 2025

Copy link
Copy Markdown
Contributor

This proposal outlines the addition of a new port attribute designed to provide a standardized method for querying the active firmware revision of a port.

Proposal -

Add label SAI_ATTR_PORT_FW_REVISION under sai_port_attr_h in saiport.h to store firmware related information. This attribute will store a string denoting the current firmware version running on the port. This can denote either the SerDes firmware version or any other vendor specific firmware version that needs to be exported.

Please fix this statement now that attribute is specific to SERDES.

"This can denote either the SerDes firmware version

- [ ] or any other vendor specific firmware version

that needs to be exported."

@pandeytejas

Copy link
Copy Markdown
Contributor Author

This proposal outlines the addition of a new port attribute designed to provide a standardized method for querying the active firmware revision of a port.
Proposal -
Add label SAI_ATTR_PORT_FW_REVISION under sai_port_attr_h in saiport.h to store firmware related information. This attribute will store a string denoting the current firmware version running on the port. This can denote either the SerDes firmware version or any other vendor specific firmware version that needs to be exported.

Please fix this statement now that attribute is specific to SERDES.

"This can denote either the SerDes firmware version

- [ ] or any other vendor specific firmware version

that needs to be exported."

Edited - commit message, original message and code comment. PTAL.

@tjchadaga tjchadaga added the reviewed PR is discussed in SAI Meeting label Sep 22, 2025
@pandeytejas

Copy link
Copy Markdown
Contributor Author

Hi folks,

Is there something pending on this from my end? Can we get this merged into the mainline?

@tjchadaga

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@pandeytejas

Copy link
Copy Markdown
Contributor Author

@tjchadaga do I need to resolve these conflicts or would they be taken care of?

@tjchadaga

Copy link
Copy Markdown
Collaborator

@pandeytejas - please resolve branch conflicts and do a squash commit

@pandeytejas
pandeytejas force-pushed the master branch 2 times, most recently from 7f31b11 to 6df184c Compare October 6, 2025 19:01
@pandeytejas

Copy link
Copy Markdown
Contributor Author

@tjchadaga - I resolved the merge conflict but I mistakenly squashed all commits, do I need to create a new commit now? is there any other way to resolve?

@pandeytejas
pandeytejas force-pushed the master branch 2 times, most recently from 3a7c96e to 8129107 Compare October 7, 2025 10:49
@pandeytejas

Copy link
Copy Markdown
Contributor Author

@tjchadaga - fixed the issue, no conflicts now and a single commit. Please let me know if it can be merged now. Thank you!

@tjchadaga

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@tjchadaga

Copy link
Copy Markdown
Collaborator

@pandeytejas - could you please fix the errors reported by meta checker?

WARNING: not expected number of spaces after * (1,4,8) saiport.h 2726: *
WARNING: line ends in whitespace saiport.h 2726: *
WARNING: Header doesn't meet style requirements (most likely ident is not 4 or 8 spaces) saiport.h 2731: */

This proposal outlines the addition of a new port attribute designed to provide a standardized method for querying the active firmware revision of a port.

Proposal -

Add label SAI_ATTR_PORT_FW_REVISION under sai_port_attr_h in saiport.h to store firmware related information. This attribute will store a string denoting the current firmware version running on the port. This can denote either the SerDes firmware version or any other vendor specific firmware version that needs to be exported.

Signed-off-by: Tejas Pandey <pandeytejas@google.com>
@pandeytejas

Copy link
Copy Markdown
Contributor Author

Done, please re run the pipelines. Thanks!

@tjchadaga

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@tjchadaga
tjchadaga merged commit 2077bfe into opencomputeproject:master Oct 7, 2025
3 checks passed
tjchadaga pushed a commit that referenced this pull request Oct 10, 2025
This proposal outlines the addition of a new port attribute designed to provide a standardized method for querying the active firmware revision of a port.

Proposal -

Add label SAI_ATTR_PORT_FW_REVISION under sai_port_attr_h in saiport.h to store firmware related information. This attribute will store a string denoting the current firmware version running on the port. This can denote either the SerDes firmware version or any other vendor specific firmware version that needs to be exported.

Signed-off-by: Tejas Pandey <pandeytejas@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reviewed PR is discussed in SAI Meeting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants