Skip to content

feat: support specific BP port information display for show interfaces#3926

Merged
cyw233 merged 1 commit intosonic-net:masterfrom
cyw233:support-bp-show-int-status
Jun 23, 2025
Merged

feat: support specific BP port information display for show interfaces#3926
cyw233 merged 1 commit intosonic-net:masterfrom
cyw233:support-bp-show-int-status

Conversation

@cyw233
Copy link
Copy Markdown
Contributor

@cyw233 cyw233 commented Jun 17, 2025

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

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@cyw233 cyw233 force-pushed the support-bp-show-int-status branch from ecf7b49 to 432c03e Compare June 17, 2025 13:31
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@cyw233 cyw233 force-pushed the support-bp-show-int-status branch from 432c03e to 417538f Compare June 17, 2025 14:14
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@cyw233 cyw233 force-pushed the support-bp-show-int-status branch from 417538f to 44b5cb8 Compare June 17, 2025 22:43
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@cyw233 cyw233 force-pushed the support-bp-show-int-status branch from 69a5cce to bdf42f5 Compare June 18, 2025 06:00
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

assert result == intf_description_asic0_all

def test_invalid_asic_name(self):
def test_invalid_asic_name_all(self):
Copy link
Copy Markdown
Contributor Author

@cyw233 cyw233 Jun 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicated method name with the one below

@cyw233 cyw233 marked this pull request as ready for review June 19, 2025 08:30
@cyw233 cyw233 requested a review from abdosi June 20, 2025 00:14
Copy link
Copy Markdown
Contributor

@yejianquan yejianquan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202505: #3930

@cyw233
Copy link
Copy Markdown
Contributor Author

cyw233 commented Jun 23, 2025

Cherry-pick PR to msft-202405: Azure/sonic-utilities.msft#191

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.

[Enhancement] Support specific BP port display for show interfaces command

3 participants