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

T2-VOQ-VS: Fix iBGP bringup issue #3053

Merged
Changes from 1 commit
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
38 changes: 3 additions & 35 deletions orchagent/neighorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1444,42 +1444,10 @@ void NeighOrch::doVoqSystemNeighTask(Consumer &consumer)
//kernel programming.
if(ibif.m_type != Port::VLAN)
{
mac_address = gMacAddress;

// For VS platforms, the mac of the static neigh should not be same as asic's own mac.
// This is because host originated packets will have same mac for both src and dst which
// will result in host NOT sending packet out. To address this problem which is specific
// to port type inband interfaces, set the mac to the neighbor's owner asic's mac. Since
// the owner asic's mac is not readily avaiable here, the owner asic mac is derived from
// the switch id and lower 5 bytes of asic mac which is assumed to be same for all asics
// in the VS system.
// Therefore to make VOQ chassis systems work in VS platform based setups like the setups
// using KVMs, it is required that all asics have same base mac in the format given below
// <lower 5 bytes of mac same for all asics>:<6th byte = switch_id>

string platform = getenv("ASIC_VENDOR") ? getenv("ASIC_VENDOR") : "";

if (platform == VS_PLATFORM_SUBSTRING)
{
int8_t sw_id = -1;
uint8_t egress_asic_mac[ETHER_ADDR_LEN];

gMacAddress.getMac(egress_asic_mac);

if (p.m_type == Port::LAG)
{
sw_id = (int8_t) p.m_system_lag_info.switch_id;
}
else if (p.m_type == Port::PHY || p.m_type == Port::SYSTEM)
{
sw_id = (int8_t) p.m_system_port_info.switch_id;
}

if(sw_id != -1)
{
egress_asic_mac[5] = sw_id;
mac_address = MacAddress(egress_asic_mac);
}
// For VS platform, dont overwrite the MAC address
if (platform != VS_PLATFORM_SUBSTRING) {
deepak-singhal0408 marked this conversation as resolved.
Show resolved Hide resolved
mac_address = gMacAddress;
}
}
vector<FieldValueTuple> fvVector;
Expand Down
Loading