Skip to content

Add CLI support for PRBS#4485

Open
marvellparthiv wants to merge 3 commits intosonic-net:masterfrom
marvellparthiv:prbs
Open

Add CLI support for PRBS#4485
marvellparthiv wants to merge 3 commits intosonic-net:masterfrom
marvellparthiv:prbs

Conversation

@marvellparthiv
Copy link
Copy Markdown
Contributor

What I did

Added PRBS (Pseudo-Random Bit Sequence) CLI support

How I did it

  • Created diag/ as a new top-level CLI group (diag/init.py, diag/main.py) registered in setup.py

  • Added show interfaces prbs status in show/interfaces/prbs.py with optional -i and --json flags; reads from STATE_DB

  • Added sonic-clear prbs results in clear/main.py; guards against clearing while a test is still running

How to verify it

  • Built a sonic-marvell-teralynx image and verified the CLI.

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

marvellparthiv and others added 2 commits April 23, 2026 17:40
Add config, show, and clear CLI commands for PRBS (Pseudo-Random Bit
Sequence) link diagnostics. Includes enabling and disabling prbs config,
'show interfaces prbs <>' for per-lane BER and lock status results
with JSON support, 'clear prbs results' for STATE_DB cleanup, shared
utility functions in prbs_util.py, and full Command-Reference documentation
with usage examples.

Signed-off-by: Parthiv Shah <parthiv@marvell.com>
Signed-off-by: Pavan Naregundi <pnaregundi@marvell.com>
Relocate PRBS enable/disable commands from 'config interface prbs' to
'diag interface prbs' to reflect their transient, diagnostic nature.
- Move config/interface_prbs.py to diag/main.py as standalone CLI group
- Write PRBS config to DIAG_PORT_TABLE in APPL_DB via ProducerStateTable
  instead of CONFIG_DB PORT table (transient, no config save/reboot)
- Update Command-Reference.md with new diag CLI examples

Signed-off-by: Pavan Naregundi <pnaregundi@marvell.com>
Signed-off-by: Parthiv Shah <parthiv@marvell.com>
@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).

Signed-off-by: Parthiv Shah <parthiv@marvell.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@marvellparthiv marvellparthiv marked this pull request as ready for review April 24, 2026 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants