Skip to content

Fix for inband port #1788

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

Closed
wants to merge 1 commit into from
Closed
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
18 changes: 16 additions & 2 deletions orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5973,8 +5973,6 @@ bool PortsOrch::doProcessRecircPort(string alias, string role, set<int> lane_set
Port p(alias, Port::PHY);
p.m_port_id = port_id;
p.m_init = true;
m_recircPortRole[alias] = role;
setPort(alias, p);

string lane_str = "";
for (auto lane : lane_set)
Expand Down Expand Up @@ -6003,6 +6001,14 @@ bool PortsOrch::doProcessRecircPort(string alias, string role, set<int> lane_set
SWSS_LOG_ERROR("Failed to set host intf oper status for recirc port %s", p.m_alias.c_str());
}

// DNX SAI does not support setting admin and oper status of recirc ports today.
// Set status to up to allow programming remote neighbor with inband port.
p.m_admin_state_up = true;
p.m_oper_status = SAI_PORT_OPER_STATUS_UP;

setPort(alias, p);
m_recircPortRole[alias] = role;

PortUpdate update = { p, true };
notify(SUBJECT_TYPE_PORT_CHANGE, static_cast<void *>(&update));
return true;
Expand Down Expand Up @@ -6120,6 +6126,14 @@ bool PortsOrch::addSystemPorts()
//This is system port for non-front panel local port (CPU or OLP or RCY (Inband)). Not an error
SWSS_LOG_NOTICE("Add port for non-front panel local system port 0x%" PRIx64 "; core: %d, core port: %d",
system_port_oid, core_index, core_port_index);

// For recirc ports, SAI call get_system_port_attribute() returns a pid that's different from the pid
// returned from get_switch_attribute(SAI_SWITCH_ATTR_PORT_LIST). In order to set system_port_info of
// inband port correctly, retrieve port with its alias here.
if(getPort(alias, port))
{
SWSS_LOG_NOTICE("Found port %s in port list", alias.c_str());
}
}
port.m_system_port_info.local_port_oid = attr.value.oid;
}
Expand Down