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

[copp] Add CoPP trap for DHCP L2 broadcasts #2987

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions orchagent/copporch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,13 @@ static map<string, sai_hostif_trap_type_t> trap_id_map = {
{"arp_req", SAI_HOSTIF_TRAP_TYPE_ARP_REQUEST},
{"arp_resp", SAI_HOSTIF_TRAP_TYPE_ARP_RESPONSE},
{"dhcp", SAI_HOSTIF_TRAP_TYPE_DHCP},
{"dhcp_l2", SAI_HOSTIF_TRAP_TYPE_DHCP_L2},
{"ospf", SAI_HOSTIF_TRAP_TYPE_OSPF},
{"pim", SAI_HOSTIF_TRAP_TYPE_PIM},
{"vrrp", SAI_HOSTIF_TRAP_TYPE_VRRP},
{"bgp", SAI_HOSTIF_TRAP_TYPE_BGP},
{"dhcpv6", SAI_HOSTIF_TRAP_TYPE_DHCPV6},
{"dhcpv6_l2", SAI_HOSTIF_TRAP_TYPE_DHCPV6_L2},
{"ospfv6", SAI_HOSTIF_TRAP_TYPE_OSPFV6},
{"isis", SAI_HOSTIF_TRAP_TYPE_ISIS},
{"vrrpv6", SAI_HOSTIF_TRAP_TYPE_VRRPV6},
Expand Down
2 changes: 1 addition & 1 deletion tests/mock_tests/copp_cfg.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"trap_group": "queue4_group3"
},
"dhcp_relay": {
"trap_ids": "dhcp,dhcpv6",
"trap_ids": "dhcp,dhcp_l2,dhcpv6,dhcpv6_l2",
"trap_group": "queue4_group3"
},
"udld": {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_copp.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
"lacp": ["lacp", copp_group_queue4_group1, "always_enabled"],
"arp": ["arp_req;arp_resp;neigh_discovery", copp_group_queue4_group2, "always_enabled"],
"lldp": ["lldp", copp_group_queue4_group3],
"dhcp": ["dhcp;dhcpv6", copp_group_queue4_group3],
"dhcp": ["dhcp;dhcp_l2;dhcpv6;dhcpv6_l2", copp_group_queue4_group3],
"udld": ["udld", copp_group_queue4_group3, "always_enabled"],
"ip2me": ["ip2me", copp_group_queue1_group1, "always_enabled"],
"nat": ["src_nat_miss;dest_nat_miss", copp_group_queue1_group2],
Expand Down
Loading