Skip to content

Commit f8be269

Browse files
committed
[CoPP] Add always_enabled field
1 parent 5f235a9 commit f8be269

File tree

3 files changed

+21
-12
lines changed

3 files changed

+21
-12
lines changed

files/image_config/copp/copp_cfg.j2

+9-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"trap_priority":"4",
1414
"queue": "4"
1515
},
16-
"queue4_group2": {
16+
"queue4_group2": {
1717
"trap_action":"copy",
1818
"trap_priority":"4",
1919
"queue": "4",
@@ -69,11 +69,13 @@
6969
},
7070
"lacp": {
7171
"trap_ids": "lacp",
72-
"trap_group": "queue4_group1"
72+
"trap_group": "queue4_group1",
73+
"always_enabled": "true"
7374
},
7475
"arp": {
7576
"trap_ids": "arp_req,arp_resp,neigh_discovery",
76-
"trap_group": "queue4_group2"
77+
"trap_group": "queue4_group2",
78+
"always_enabled": "true"
7779
},
7880
"lldp": {
7981
"trap_ids": "lldp",
@@ -85,11 +87,13 @@
8587
},
8688
"udld": {
8789
"trap_ids": "udld",
88-
"trap_group": "queue4_group3"
90+
"trap_group": "queue4_group3",
91+
"always_enabled": "true"
8992
},
9093
"ip2me": {
9194
"trap_ids": "ip2me",
92-
"trap_group": "queue1_group1"
95+
"trap_group": "queue1_group1",
96+
"always_enabled": "true"
9397
},
9498
"macsec": {
9599
"trap_ids": "eapol",

platform/vs/docker-sonic-vs/init_cfg.json.j2

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"buffer_model": "traditional"
66
}
77
},
8-
{% set features = ["swss", "bgp", "teamd", "nat", "database"] %}
8+
{% set features = ["swss", "bgp", "teamd", "nat", "database", "lldp", "dhcp_relay", "macsec"] %}
99
"FEATURE": {
1010
{% for feature in features %}
1111
"{{ feature }}": {

src/sonic-yang-models/yang-models/sonic-copp.yang

+11-6
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ module sonic-copp {
4343
type stypes:copp_packet_action;
4444
description "Trap action";
4545
}
46-
46+
4747
leaf meter_type {
4848
mandatory true;
4949
type stypes:meter_type;
5050
description "Policer meter type";
5151
}
52-
52+
5353
leaf mode {
5454
mandatory true;
5555
type enumeration {
@@ -59,7 +59,7 @@ module sonic-copp {
5959
}
6060
description "Policer mode";
6161
}
62-
62+
6363
leaf color {
6464
type enumeration {
6565
enum blind;
@@ -74,7 +74,7 @@ module sonic-copp {
7474
default 0;
7575
description
7676
"Committed information rate for the dual-rate token
77-
bucket policer. This value represents the rate at which
77+
bucket policer. This value represents the rate at which
7878
tokens are added to the primary bucket.";
7979
}
8080

@@ -118,13 +118,13 @@ module sonic-copp {
118118
"Excess burst size for the dual-rate token bucket policer.
119119
This value represents the depth of the secondary bucket.";
120120
}
121-
121+
122122
leaf green_action {
123123
type stypes:copp_packet_action;
124124
default "forward";
125125
description "Green action";
126126
}
127-
127+
128128
leaf yellow_action {
129129
when "((current()/../mode = 'sr_tcm') or (current()/../mode = 'tr_tcm'))";
130130
type stypes:copp_packet_action;
@@ -163,6 +163,11 @@ module sonic-copp {
163163
}
164164
description "reference to CoPP group";
165165
}
166+
167+
leaf always_enabled {
168+
type boolean;
169+
description "field that indicates whether the trap should be always installed";
170+
}
166171
}
167172
/* end of list COPP_TRAP_LIST */
168173
}

0 commit comments

Comments
 (0)