Skip to content

[action] [PR:3926] feat: support specific BP port information display for show interfaces#3930

Merged
mssonicbld merged 1 commit intosonic-net:202505from
mssonicbld:cherry/202505/3926
Jun 23, 2025
Merged

[action] [PR:3926] feat: support specific BP port information display for show interfaces#3930
mssonicbld merged 1 commit intosonic-net:202505from
mssonicbld:cherry/202505/3926

Conversation

@mssonicbld
Copy link
Copy Markdown
Collaborator

What I did

This PR resolves #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

<!--
    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
```
@mssonicbld
Copy link
Copy Markdown
Collaborator Author

Original PR: #3926

@mssonicbld
Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld mssonicbld merged commit 5312331 into sonic-net:202505 Jun 23, 2025
4 of 6 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