Skip to content

[code sync] Merge code from sonic-net/sonic-utilities:202412 to 202503#186

Merged
mssonicbld merged 2 commits intoAzure:202503from
mssonicbld:sonicbld/202503-merge
Jun 14, 2025
Merged

[code sync] Merge code from sonic-net/sonic-utilities:202412 to 202503#186
mssonicbld merged 2 commits intoAzure:202503from
mssonicbld:sonicbld/202503-merge

Conversation

@mssonicbld
Copy link
Copy Markdown
Collaborator

* 09597f23 - (base/202412) [sfputil] Use host lane mask as part of rx-output enable/disable (#185) (2025-06-14) [mssonicbld]<br>```

mssonicbld and others added 2 commits June 14, 2025 01:03
…re#185)

<!--
 Please make sure you've read and understood our contributing guidelines:
 https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md

 failure_prs.log 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#
```
@mssonicbld mssonicbld merged commit 65162ab into Azure:202503 Jun 14, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant