Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show copp config - command #1342

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

vishnushetty
Copy link

- What I did
Command to display CoPP configuration

- How I did it
Update the show utility to fetch from APP_DB

- How to verify it
show copp config

- Previous command output (if the output of a command-line utility has changed)
NA
- New command output (if the output of a command-line utility has changed)
oot@sonic:/usr/local# show copp config
{
"COPP_TABLE:default": {
"value": {
"cbs": "600",
"cir": "600",
"meter_type": "packets",
"mode": "sr_tcm",
"queue": "0",
"red_action": "drop"
}
},
"COPP_TABLE:trap.group.arp": {
"value": {
"cbs": "600",
"cir": "600",
"meter_type": "packets",
"mode": "sr_tcm",
"queue": "4",
"red_action": "drop",
"trap_action": "copy",
"trap_ids": "arp_req,arp_resp,neigh_discovery",
"trap_priority": "4"
}
},
"COPP_TABLE:trap.group.bgp.lacp": {
"value": {
"queue": "4",
"trap_action": "trap",
"trap_ids": "bgp,bgpv6,lacp",
"trap_priority": "4"
}
},
"COPP_TABLE:trap.group.ip2me": {
"value": {
"cbs": "6000",
"cir": "6000",
"meter_type": "packets",
"mode": "sr_tcm",
"queue": "1",
"red_action": "drop",
"trap_action": "trap",
"trap_ids": "ip2me",
"trap_priority": "1"
}
},
"COPP_TABLE:trap.group.lldp.udld": {
"value": {
"queue": "4",
"trap_action": "trap",
"trap_ids": "lldp,udld",
"trap_priority": "4"
}
},
"COPP_TABLE:trap.group.nat": {
"value": {
"cbs": "600",
"cir": "600",
"meter_type": "packets",
"mode": "sr_tcm",
"queue": "1",
"red_action": "drop",
"trap_action": "trap",
"trap_ids": "src_nat_miss,dest_nat_miss",
"trap_priority": "1"
}
},
"COPP_TABLE:trap.group.sflow": {
"value": {
"cbs": "8000",
"cir": "8000",
"genetlink_mcgrp_name": "packets",
"genetlink_name": "psample",
"meter_type": "packets",
"mode": "sr_tcm",
"queue": "3",
"red_action": "drop",
"trap_action": "trap",
"trap_ids": "sample_packet",
"trap_priority": "3"
}
}
}

@prsunny
Copy link
Contributor

prsunny commented Dec 29, 2020

@dgsudharsan , could you please review?

@prsunny
Copy link
Contributor

prsunny commented Dec 29, 2020

IMO, show copp config should be from config_db but say something like show copp status should be from app_db. The app_db reflects the running state of copp entries.

@vishnushetty
Copy link
Author

IMO, show copp config should be from config_db but say something like show copp status should be from app_db. The app_db reflects the running state of copp entries.

Ok. Will push the changes with "show copp status"

@prsunny
Copy link
Contributor

prsunny commented Dec 30, 2020

Thanks @vishnushetty. Could you also add some unit tests?

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.

2 participants