Skip to content
Merged
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
20 changes: 19 additions & 1 deletion orchagent/muxorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -793,9 +793,9 @@ void MuxAclHandler::createMuxAclTable(sai_object_id_t port, string strTable)

acl_table.type = ACL_TABLE_DROP;
acl_table.id = strTable;
acl_table.link(port);
acl_table.stage = ACL_STAGE_INGRESS;
gAclOrch->addAclTable(acl_table);
bindAllPorts(acl_table);
}

void MuxAclHandler::createMuxAclRule(shared_ptr<AclRuleMux> rule, string strTable)
Expand All @@ -820,6 +820,24 @@ void MuxAclHandler::createMuxAclRule(shared_ptr<AclRuleMux> rule, string strTabl
gAclOrch->addAclRule(rule, strTable);
}

void MuxAclHandler::bindAllPorts(AclTable &acl_table)
{
SWSS_LOG_ENTER();

auto allPorts = gPortsOrch->getAllPorts();
for (auto &it: allPorts)
{
Port port = it.second;
if (port.m_type == Port::PHY)
{
SWSS_LOG_INFO("Binding port %" PRIx64 " to ACL table %s", port.m_port_id, acl_table.id.c_str());

acl_table.link(port.m_port_id);
acl_table.bind(port.m_port_id);
}
}
}

sai_object_id_t MuxOrch::createNextHopTunnel(std::string tunnelKey, swss::IpAddress& ipAddr)
{
auto it = mux_tunnel_nh_.find(ipAddr);
Expand Down
1 change: 1 addition & 0 deletions orchagent/muxorch.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class MuxAclHandler
private:
void createMuxAclTable(sai_object_id_t port, string strTable);
void createMuxAclRule(shared_ptr<AclRuleMux> rule, string strTable);
void bindAllPorts(AclTable &acl_table);

// class shared dict: ACL table name -> ACL table
static std::map<std::string, AclTable> acl_table_;
Expand Down