Skip to content

Commit e3ce7ca

Browse files
authored
Merge branch 'master' into fix_mtu_macsec
2 parents e55a065 + 3161eaa commit e3ce7ca

11 files changed

+589
-10
lines changed

orchagent/intfsorch.cpp

+17-1
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ void IntfsOrch::doTask(Consumer &consumer)
678678

679679
if(table_name == CHASSIS_APP_SYSTEM_INTERFACE_TABLE_NAME)
680680
{
681-
if(!isRemoteSystemPortIntf(alias))
681+
if(isLocalSystemPortIntf(alias))
682682
{
683683
//Synced local interface. Skip
684684
it = consumer.m_toSync.erase(it);
@@ -1623,6 +1623,22 @@ bool IntfsOrch::isRemoteSystemPortIntf(string alias)
16231623
return false;
16241624
}
16251625

1626+
bool IntfsOrch::isLocalSystemPortIntf(string alias)
1627+
{
1628+
Port port;
1629+
if(gPortsOrch->getPort(alias, port))
1630+
{
1631+
if (port.m_type == Port::LAG)
1632+
{
1633+
return(port.m_system_lag_info.switch_id == gVoqMySwitchId);
1634+
}
1635+
1636+
return(port.m_system_port_info.type != SAI_SYSTEM_PORT_TYPE_REMOTE);
1637+
}
1638+
//Given alias is system port alias of the local port/LAG
1639+
return false;
1640+
}
1641+
16261642
void IntfsOrch::voqSyncAddIntf(string &alias)
16271643
{
16281644
//Sync only local interface. Confirm for the local interface and

orchagent/intfsorch.h

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ class IntfsOrch : public Orch
7070
bool updateSyncdIntfPfx(const string &alias, const IpPrefix &ip_prefix, bool add = true);
7171

7272
bool isRemoteSystemPortIntf(string alias);
73+
bool isLocalSystemPortIntf(string alias);
7374

7475
private:
7576

orchagent/muxorch.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -1280,8 +1280,6 @@ bool MuxOrch::handlePeerSwitch(const Request& request)
12801280

12811281
if (op == SET_COMMAND)
12821282
{
1283-
mux_peer_switch_ = peer_ip;
1284-
12851283
// Create P2P tunnel when peer_ip is available.
12861284
IpAddresses dst_ips = decap_orch_->getDstIpAddresses(MUX_TUNNEL);
12871285
if (!dst_ips.getSize())
@@ -1316,6 +1314,7 @@ bool MuxOrch::handlePeerSwitch(const Request& request)
13161314
}
13171315

13181316
mux_tunnel_id_ = create_tunnel(&peer_ip, &dst_ip, tc_to_dscp_map_id, tc_to_queue_map_id, dscp_mode_name);
1317+
mux_peer_switch_ = peer_ip;
13191318
SWSS_LOG_NOTICE("Mux peer ip '%s' was added, peer name '%s'",
13201319
peer_ip.to_string().c_str(), peer_name.c_str());
13211320
}

orchagent/neighorch.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1203,7 +1203,7 @@ void NeighOrch::doVoqSystemNeighTask(Consumer &consumer)
12031203

12041204
string alias = key.substr(0, found);
12051205

1206-
if(!gIntfsOrch->isRemoteSystemPortIntf(alias))
1206+
if(gIntfsOrch->isLocalSystemPortIntf(alias))
12071207
{
12081208
//Synced local neighbor. Skip
12091209
it = consumer.m_toSync.erase(it);

orchagent/orchdaemon.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ bool OrchDaemon::init()
346346
* when iterating ConsumerMap. This is ensured implicitly by the order of keys in ordered map.
347347
* For cases when Orch has to process tables in specific order, like PortsOrch during warm start, it has to override Orch::doTask()
348348
*/
349-
m_orchList = { gSwitchOrch, gCrmOrch, gPortsOrch, gBufferOrch, gFlowCounterRouteOrch, mux_orch, mux_cb_orch, gIntfsOrch, gNeighOrch, gNhgMapOrch, gNhgOrch, gCbfNhgOrch, gRouteOrch, gCoppOrch, gQosOrch, wm_orch, gPolicerOrch, tunnel_decap_orch, sflow_orch, gDebugCounterOrch, gMacsecOrch, gBfdOrch, gSrv6Orch};
349+
m_orchList = { gSwitchOrch, gCrmOrch, gPortsOrch, gBufferOrch, gFlowCounterRouteOrch, gIntfsOrch, gNeighOrch, gNhgMapOrch, gNhgOrch, gCbfNhgOrch, gRouteOrch, gCoppOrch, gQosOrch, wm_orch, gPolicerOrch, tunnel_decap_orch, sflow_orch, gDebugCounterOrch, gMacsecOrch, gBfdOrch, gSrv6Orch, mux_orch, mux_cb_orch};
350350

351351
bool initialize_dtel = false;
352352
if (platform == BFN_PLATFORM_SUBSTRING || platform == VS_PLATFORM_SUBSTRING)

orchagent/p4orch/tests/fake_portorch.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -690,3 +690,7 @@ std::unordered_set<std::string> PortsOrch::generateCounterStats(const string &ty
690690
{
691691
return {};
692692
}
693+
694+
void PortsOrch::doTask(swss::SelectableTimer &timer)
695+
{
696+
}

orchagent/port.h

+7
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ class Port
119119
uint32_t m_speed = 0; // Mbps
120120
std::string m_learn_mode = "hardware";
121121
AutoNegMode m_autoneg = Port::AutoNegMode::AUTONEG_NOT_SET;
122+
int m_link_training = -1; // -1 means not set, 0 = disabled, 1 = enabled
122123
bool m_admin_state_up = false;
123124
bool m_init = false;
124125
bool m_l3_vni = false;
@@ -177,8 +178,14 @@ class Port
177178
sai_object_id_t m_system_side_id = 0;
178179
sai_object_id_t m_line_side_id = 0;
179180

181+
/* pre-emphasis */
182+
std::map<sai_port_serdes_attr_t, std::vector<uint32_t>> m_preemphasis;
183+
180184
bool m_fec_cfg = false;
181185
bool m_an_cfg = false;
186+
187+
int m_cap_an = -1; /* Capability - AutoNeg, -1 means not set */
188+
int m_cap_lt = -1; /* Capability - LinkTraining, -1 means not set */
182189
};
183190

184191
}

0 commit comments

Comments
 (0)