[action] [PR:3926] feat: support specific BP port information display for show interfaces#3930
Merged
mssonicbld merged 1 commit intosonic-net:202505from Jun 23, 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
This PR resolves sonic-net#3925.
In this PR, I enhanced the `show interfaces` command to support specific BP port information display for multi-ASIC devices, for example, T2 Chassis. It means we can use commands like `show interfaces status Ethernet-BP128 -d all` to get the status of a backplane interface, e.g. Ethernet-BP128 itself, after this PR, just like what we used to do for a specific frontend interface (plus an extra `-d all` of course).
The commands I updated for getting specific BP interface information:
- `show interfaces description`
- `show interfaces status`
- `show interfaces tpid`
- `show interfaces counters`
- `show interfaces autoneg status`
- `show interfaces link-training status`
- `show interfaces fec status`
Please note that nothing has changed when running these commands on a single-ASIC device, and nothing has changed when running these commands on a multi-ASIC device without specifying an interface. The only behavior change is when we run the above commands for a specific interface on a multi-ASIC device.
#### How I did it
#### How to verify it
We can try the following commands after this PR to see the information of the backplane interface Ethernet-BP128 itself:
- `show interfaces description Ethernet-BP128 -d all`
- `show interfaces status Ethernet-BP128 -d all`
- `show interfaces tpid Ethernet-BP128 -d all`
- `show interfaces counters -i Ethernet-BP128 -d all`
- `show interfaces autoneg status Ethernet-BP128 -d all`
- `show interfaces link-training status Ethernet-BP128 -d all`
- `show interfaces fec status Ethernet-BP128 -d all`
#### Previous command output (if the output of a command-line utility has changed)
Before this PR, when we run `show interfaces status Ethernet-BP128 -d all`, the output will be empty:
```
admin@dut:~$ show int status Ethernet-BP128 -d all
Interface Lanes Speed MTU FEC Alias Vlan Oper Admin Type Asym PFC
-------------- ------------------- ------- ----- ----- ------------ ------------- ------ ------- ------ ----------
```
#### New command output (if the output of a command-line utility has changed)
After this PR, when we run `show interfaces status Ethernet-BP128 -d all`, the output will be something like the following:
```
admin@dut:~$ show int status Ethernet-BP128 -d all
Interface Lanes Speed MTU FEC Alias Vlan Oper Admin Type Asym PFC
-------------- ------------------- ------- ----- ----- ------------ ------------- ------ ------- ------ ----------
Ethernet-BP128 1700,1701,1702,1703 100G 9000 N/A Eth310-ASIC1 PortChannel38 up up N/A off
```
Collaborator
Author
|
Original PR: #3926 |
Collaborator
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
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
This PR resolves #3925.
In this PR, I enhanced the
show interfacescommand to support specific BP port information display for multi-ASIC devices, for example, T2 Chassis. It means we can use commands likeshow interfaces status Ethernet-BP128 -d allto get the status of a backplane interface, e.g. Ethernet-BP128 itself, after this PR, just like what we used to do for a specific frontend interface (plus an extra-d allof course).The commands I updated for getting specific BP interface information:
show interfaces descriptionshow interfaces statusshow interfaces tpidshow interfaces countersshow interfaces autoneg statusshow interfaces link-training statusshow interfaces fec statusPlease note that nothing has changed when running these commands on a single-ASIC device, and nothing has changed when running these commands on a multi-ASIC device without specifying an interface. The only behavior change is when we run the above commands for a specific interface on a multi-ASIC device.
How I did it
How to verify it
We can try the following commands after this PR to see the information of the backplane interface Ethernet-BP128 itself:
show interfaces description Ethernet-BP128 -d allshow interfaces status Ethernet-BP128 -d allshow interfaces tpid Ethernet-BP128 -d allshow interfaces counters -i Ethernet-BP128 -d allshow interfaces autoneg status Ethernet-BP128 -d allshow interfaces link-training status Ethernet-BP128 -d allshow interfaces fec status Ethernet-BP128 -d allPrevious command output (if the output of a command-line utility has changed)
Before this PR, when we run
show interfaces status Ethernet-BP128 -d all, the output will be empty:New command output (if the output of a command-line utility has changed)
After this PR, when we run
show interfaces status Ethernet-BP128 -d all, the output will be something like the following: