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

portsorch: initial support for link-training #2359

Merged
merged 8 commits into from
Jul 28, 2022
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
6 changes: 5 additions & 1 deletion orchagent/p4orch/tests/fake_portorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -689,4 +689,8 @@ void PortsOrch::voqSyncDelLagMember(Port &lag, Port &port)
std::unordered_set<std::string> PortsOrch::generateCounterStats(const string &type, bool gearbox)
{
return {};
}
}

void PortsOrch::doTask(swss::SelectableTimer &timer)
{
}
7 changes: 7 additions & 0 deletions orchagent/port.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ class Port
uint32_t m_speed = 0; // Mbps
std::string m_learn_mode = "hardware";
AutoNegMode m_autoneg = Port::AutoNegMode::AUTONEG_NOT_SET;
int m_link_training = -1; // -1 means not set, 0 = disabled, 1 = enabled
bool m_admin_state_up = false;
bool m_init = false;
bool m_l3_vni = false;
Expand Down Expand Up @@ -177,8 +178,14 @@ class Port
sai_object_id_t m_system_side_id = 0;
sai_object_id_t m_line_side_id = 0;

/* pre-emphasis */
std::map<sai_port_serdes_attr_t, std::vector<uint32_t>> m_preemphasis;

bool m_fec_cfg = false;
bool m_an_cfg = false;

int m_cap_an = -1; /* Capability - AutoNeg, -1 means not set */
int m_cap_lt = -1; /* Capability - LinkTraining, -1 means not set */
};

}
Expand Down
Loading