Skip to content

Commit

Permalink
Revert "Skip create port if the lane set isn't available in ASIC"
Browse files Browse the repository at this point in the history
This reverts commit f521da3.
  • Loading branch information
Pterosaur committed Sep 29, 2021
1 parent d105639 commit f7df9a1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
15 changes: 0 additions & 15 deletions orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,6 @@ PortsOrch::PortsOrch(DBConnector *db, DBConnector *stateDb, vector<table_name_wi

SWSS_LOG_NOTICE("Get port with lanes pid:%" PRIx64 " lanes:%s", port_list[i], tmp_lane_str.c_str());
m_portListLaneMap[tmp_lane_set] = port_list[i];
m_availablePortSet.insert(tmp_lane_set);
}

/* Get default 1Q bridge and default VLAN */
Expand Down Expand Up @@ -2738,20 +2737,6 @@ void PortsOrch::doPortTask(Consumer &consumer)

for (auto it = m_lanesAliasSpeedMap.begin(); it != m_lanesAliasSpeedMap.end();)
{
if (m_availablePortSet.find(it->first) == m_availablePortSet.end())
{
string tmp_lane_str = "";
for (auto s : it->first)
{
tmp_lane_str += to_string(s) + " ";
}
tmp_lane_str = tmp_lane_str.substr(0, tmp_lane_str.size() - 1);

SWSS_LOG_WARN("The lane set %s isn't available in ASIC", tmp_lane_str.c_str());
it++;
continue;
}

if (m_portListLaneMap.find(it->first) == m_portListLaneMap.end())
{
if (!addPort(it->first, get<1>(it->second), get<2>(it->second), get<3>(it->second)))
Expand Down
3 changes: 0 additions & 3 deletions orchagent/portsorch.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,8 @@ class PortsOrch : public Orch, public Subject

port_config_state_t m_portConfigState = PORT_CONFIG_MISSING;
sai_uint32_t m_portCount;
// m_portListLaneMap is the current enabled port list
map<set<int>, sai_object_id_t> m_portListLaneMap;
map<set<int>, tuple<string, uint32_t, int, string, int, string>> m_lanesAliasSpeedMap;
// m_availablePortSet is the available port list read from ASIC by SAI
set<set<int>> m_availablePortSet;
map<string, Port> m_portList;
unordered_map<sai_object_id_t, int> m_portOidToIndex;
map<string, uint32_t> m_port_ref_count;
Expand Down

0 comments on commit f7df9a1

Please sign in to comment.