forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Copp Manager Changes (sonic-net#4861)
*Introduce CoPP Manager infrastructure Copp service to generate initial copp config template file Co-authored-by: dgsudharsan <sudharsan_gopalarat@dell.com>
- Loading branch information
1 parent
108cfd4
commit 12d4ebd
Showing
17 changed files
with
164 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ program:buffermgrd | |
program:vrfmgrd | ||
program:nbrmgrd | ||
program:vxlanmgrd | ||
program:coppmgrd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[Unit] | ||
Description=Update CoPP configuration | ||
Requires=updategraph.service | ||
After=updategraph.service | ||
|
||
[Service] | ||
Type=oneshot | ||
ExecStart=/usr/bin/copp-config.sh | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
sonic-cfggen -d -t /usr/share/sonic/templates/copp_cfg.j2 > /etc/sonic/copp_cfg.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
{ | ||
"COPP_GROUP": { | ||
"default": { | ||
"queue": "0", | ||
"meter_type":"packets", | ||
"mode":"sr_tcm", | ||
"cir":"600", | ||
"cbs":"600", | ||
"red_action":"drop" | ||
}, | ||
"queue4_group1": { | ||
"trap_action":"trap", | ||
"trap_priority":"4", | ||
"queue": "4" | ||
}, | ||
"queue4_group2": { | ||
"trap_action":"copy", | ||
"trap_priority":"4", | ||
"queue": "4", | ||
"meter_type":"packets", | ||
"mode":"sr_tcm", | ||
"cir":"600", | ||
"cbs":"600", | ||
"red_action":"drop" | ||
}, | ||
"queue4_group3": { | ||
"trap_action":"trap", | ||
"trap_priority":"4", | ||
"queue": "4" | ||
}, | ||
"queue1_group1": { | ||
"trap_action":"trap", | ||
"trap_priority":"1", | ||
"queue": "1", | ||
"meter_type":"packets", | ||
"mode":"sr_tcm", | ||
"cir":"6000", | ||
"cbs":"6000", | ||
"red_action":"drop" | ||
}, | ||
"queue1_group2": { | ||
"trap_action":"trap", | ||
"trap_priority":"1", | ||
"queue": "1", | ||
"meter_type":"packets", | ||
"mode":"sr_tcm", | ||
"cir":"600", | ||
"cbs":"600", | ||
"red_action":"drop" | ||
}, | ||
"queue2_group1": { | ||
"cbs": "1000", | ||
"cir": "1000", | ||
"genetlink_mcgrp_name": "packets", | ||
"genetlink_name": "psample", | ||
"meter_type": "packets", | ||
"mode": "sr_tcm", | ||
"queue": "2", | ||
"red_action": "drop", | ||
"trap_action": "trap", | ||
"trap_priority": "1" | ||
|
||
} | ||
}, | ||
"COPP_TRAP": { | ||
"bgp": { | ||
"trap_ids": "bgp,bgpv6", | ||
"trap_group": "queue4_group1" | ||
}, | ||
"lacp": { | ||
"trap_ids": "lacp", | ||
"trap_group": "queue4_group1" | ||
}, | ||
"arp": { | ||
"trap_ids": "arp_req,arp_resp,neigh_discovery", | ||
"trap_group": "queue4_group2" | ||
}, | ||
"lldp": { | ||
"trap_ids": "lldp", | ||
"trap_group": "queue4_group3" | ||
}, | ||
{% if not (DEVICE_METADATA is defined and DEVICE_METADATA['localhost'] is defined and DEVICE_METADATA['localhost']['type'] is defined and DEVICE_METADATA['localhost']['type'] != "ToRRouter") %} | ||
"dhcp": { | ||
"trap_ids": "dhcp,dhcpv6", | ||
"trap_group": "queue4_group3" | ||
}, | ||
{% endif %} | ||
"udld": { | ||
"trap_ids": "udld", | ||
"trap_group": "queue4_group3" | ||
}, | ||
"ip2me": { | ||
"trap_ids": "ip2me", | ||
"trap_group": "queue1_group1" | ||
}, | ||
"nat": { | ||
"trap_ids": "src_nat_miss,dest_nat_miss", | ||
"trap_group": "queue1_group2" | ||
}, | ||
"sflow": { | ||
"trap_group": "queue2_group1", | ||
"trap_ids": "sample_packet" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters