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

Fix preallocated bridge_port_list size #256

Merged
merged 3 commits into from
Jul 18, 2017
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 0 additions & 1 deletion orchagent/copporch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ map<string, sai_hostif_trap_type_t> trap_id_map = {
{"igmp_v2_report", SAI_HOSTIF_TRAP_TYPE_IGMP_TYPE_V2_REPORT},
{"igmp_v3_report", SAI_HOSTIF_TRAP_TYPE_IGMP_TYPE_V3_REPORT},
{"sample_packet", SAI_HOSTIF_TRAP_TYPE_SAMPLEPACKET},
{"udld", SAI_HOSTIF_TRAP_TYPE_UDLD},
{"switch_cust_range", SAI_HOSTIF_TRAP_TYPE_SWITCH_CUSTOM_RANGE_BASE},
{"arp_req", SAI_HOSTIF_TRAP_TYPE_ARP_REQUEST},
{"arp_resp", SAI_HOSTIF_TRAP_TYPE_ARP_RESPONSE},
Expand Down
2 changes: 1 addition & 1 deletion orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ void PortsOrch::removeDefaultVlanMembers()
void PortsOrch::removeDefaultBridgePorts()
{
/* Get bridge ports in default 1Q bridge */
vector<sai_object_id_t> bridge_port_list(m_portCount);
vector<sai_object_id_t> bridge_port_list(m_portCount + 1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why there's an extra bridge port?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the CPU port

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CPU port is also in the list? Could you add one line comment about this?


sai_attribute_t attr;
attr.id = SAI_BRIDGE_ATTR_PORT_LIST;
Expand Down