Skip to content

Added CoPP show configuration command#3955

Merged
yejianquan merged 1 commit intosonic-net:202505from
rminnikanti:neighbor_miss_202505
Jul 9, 2025
Merged

Added CoPP show configuration command#3955
yejianquan merged 1 commit intosonic-net:202505from
rminnikanti:neighbor_miss_202505

Conversation

@rminnikanti
Copy link
Copy Markdown
Contributor

Port from master branch PR #3863

What I did

CoPP show commands:

  • show copp configuration
  • show copp configuration detailed --trapid <trap_id>
  • show copp configuration detailed --group

Added UT for the CLI commands.

Why I did it

Details in HLD: sonic-net/SONiC#1943

How to verify it

Verified with UT

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)

admin@sonic:~$ show copp configuration
TrapId           Trap Group     Action      CBS    CIR  Meter Type    Mode    HW Status
---------------  -------------  --------  -----  -----  ------------  ------  -------------
arp_req          queue4_group2  copy        600    600  packets       sr_tcm  installed
arp_resp         queue4_group2  copy        600    600  packets       sr_tcm  installed
bgp              queue4_group1  trap       6000   6000  packets       sr_tcm  not-installed
bgpv6            queue4_group1  trap       6000   6000  packets       sr_tcm  not-installed
dest_nat_miss    queue1_group2  trap        600    600  packets       sr_tcm  installed
dhcp             queue4_group3  trap        100    100  packets       sr_tcm  installed
dhcpv6           queue4_group3  trap        100    100  packets       sr_tcm  installed
eapol            queue4_group1  trap       6000   6000  packets       sr_tcm  installed
ip2me            queue1_group1  trap       6000   6000  packets       sr_tcm  installed
lacp             queue4_group1  trap       6000   6000  packets       sr_tcm  installed
lldp             queue4_group3  trap        100    100  packets       sr_tcm  installed
neigh_discovery  queue4_group2  copy        600    600  packets       sr_tcm  installed
neighbor_miss    queue1_group3  trap        200    200  packets       sr_tcm  installed
sample_packet    queue2_group1  trap       1000   1000  packets       sr_tcm  not-installed
src_nat_miss     queue1_group2  trap        600    600  packets       sr_tcm  installed
udld             queue4_group3  trap        100    100  packets       sr_tcm  installed
admin@sonic:~$ show copp configuration detailed --trapid neighbor_miss
Trap Group.................. queue1_group3
Trap Action................. trap
Trap Priority............... 1
Queue....................... 1
CBS......................... 200
CIR......................... 200
Meter Type.................. packets
Mode........................ sr_tcm
Yellow Action............... forward
Green Action................ forward
Red Action.................. drop
HW Status................... installed
admin@sonic:~$ show copp configuration detailed --group queue1_group3
Trap Id(s).................. neighbor_miss
Queue....................... 1
Trap Priority............... 1
Trap Action................. trap
Meter Type.................. packets
Mode........................ sr_tcm
CBS......................... 200
CIR......................... 200
Yellow Action............... forward
Green Action................ forward
Red Action.................. drop

Signed-off-by: Ravi Minnikanti [email protected]

What I did:
CoPP show commands:
* show copp configuration
* show copp configuration detailed --trapid <trap_id>
* show copp configuration detailed --group <group>

Added UT for the CLI commands.

HLD: sonic-net/SONiC#1943

Signed-off-by: Ravi Minnikanti <[email protected]>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

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

@yejianquan yejianquan merged commit a2e1250 into sonic-net:202505 Jul 9, 2025
7 checks passed
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