[action] [PR:3911] [sfputil] Use host lane mask as part of rx-output enable/disable#185
Merged
mssonicbld merged 1 commit intoAzure:202412from Jun 13, 2025
Merged
Conversation
<!--
Please make sure you've read and understood our contributing guidelines:
https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md
** Make sure all your commits include a signature generated with `git commit -s` **
If this is a bug fix, make sure your description includes "closes #xxxx",
"fixes #xxxx" or "resolves #xxxx" so that GitHub automatically closes the related
issue when the PR is merged.
If you are adding/modifying/removing any command or utility script, please also
make sure to add/modify/remove any unit tests from the tests
directory as appropriate.
If you are modifying or removing an existing 'show', 'config' or 'sonic-clear'
subcommand, or you are adding a new subcommand, please make sure you also
update the Command Line Reference Guide (doc/Command-Reference.md) to reflect
your changes.
Please provide the following information:
-->
#### What I did
We need to use host lane mask instead of media lane mask as part of sfputil debug rx-output EthernetXX enable/disable CLI.
In addition to the above, following needs to be enhanced
1. Need to fail CLI if the tx_disable_channel or rx_disable_channel fails
2. Verify the Rx and Tx output status after enabling/disabling Rx/Tx
3. Modify get_subport function to return subport as 1 if the subport field is not found in PORT table of CONFIG_DB
#### How I did it
Addressed the above issues in `What I did` section
#### How to verify it
1. Verified rx-output disable and enable
2. Verified tx-output disable and enable
3. Verified rx-output disable and enable CLI on a device which did not have subport as part of the `PORT` table in `CONFIG_DB`
#### Previous command output (if the output of a command-line utility has changed)
The CLI used to fail if subport field is not defined in the PORT table of CONFIG_DB
```
root@sonic:/home/admin# sfputil debug rx-output Ethernet144 enable
Ethernet144: subport is not present in CONFIG_DB
root@sonic:/home/admin# redis-cli -n 4 hgetall "PORT|Ethernet144"
1) "admin_status"
2) "up"
3) "alias"
4) "Ethernet19/1"
5) "index"
6) "19"
7) "lanes"
8) "145,146,147,148,149,150,151,152"
9) "mtu"
10) "9100"
11) "speed"
12) "400000"
root@sonic:/home/admin#
```
#### New command output (if the output of a command-line utility has changed)
With the new changes, the CLI is now supported
```
root@sonic:/home/admin# sfputil debug rx-output Ethernet144 enable
Field 'subport' not found in table 'PORT' for key 'Ethernet144' in CONFIG_DB.
Ethernet144: RX output enabled on subport 1
root@sonic:/home/admin#
```
Collaborator
Author
|
Original PR: sonic-net/sonic-utilities#3911 |
Collaborator
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
mssonicbld
added a commit
that referenced
this pull request
Jun 14, 2025
```<br>* 7253618 - (HEAD -> 202503) Merge branch '202412' of https://github.com/Azure/sonic-utilities.msft into 202503 (2025-06-14) [Sonic Automation] * 09597f2 - (base/202412) [sfputil] Use host lane mask as part of rx-output enable/disable (#185) (2025-06-14) [mssonicbld]<br>```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
We need to use host lane mask instead of media lane mask as part of sfputil debug rx-output EthernetXX enable/disable CLI.
In addition to the above, following needs to be enhanced
How I did it
Addressed the above issues in
What I didsectionHow to verify it
PORTtable inCONFIG_DBPrevious command output (if the output of a command-line utility has changed)
The CLI used to fail if subport field is not defined in the PORT table of CONFIG_DB
New command output (if the output of a command-line utility has changed)
With the new changes, the CLI is now supported