Skip to content

Commit

Permalink
VXLAN: Fix oper_status and tunnel encapsulation TTL
Browse files Browse the repository at this point in the history
This fixes 2 issues across a range of open tickets building upon patches
created by others with modifications as requested by @VladimirKuk.

The first issue this resolves is the status shown for remote vteps
which in the fact that it is wrong makes debugging nearly impossible:
```
+------------+------------+-------------------+--------------+
| SIP        | DIP        | Creation Source   | OperStatus   |
+============+============+===================+==============+
| 172.16.0.1 | 172.16.0.2 | EVPN              | oper_down    |
+------------+------------+-------------------+--------------+
Total count : 1
```

The VTEP is really up.

Original PR for that is sonic-net#2080.

Also fixes sonic-net/sonic-buildimage#10004
or at least the error message which hurts debugging.

The next issue is in reachabiity across VXLANs.  This fixes IP/MAC
learning via ARP.  The original PR for that is sonic-net#3216, however it
appears it has its origins in
sonic-net/sonic-buildimage#10050
which goes into greater detail about the issue itself.  Also there
is talk about it here kamelnetworks/sonic#9 as well as another
similar patch here: kamelnetworks@02ee3e3

Fixes sonic-net#3216
Fixes sonic-net#2080
Fixes sonic-net/sonic-buildimage#10050
Fixes sonic-net/sonic-buildimage#10004
Signed-off-by: Brad House (@bradh352)
  • Loading branch information
bradh352 committed Nov 20, 2024
1 parent 1843de4 commit 1cd531b
Show file tree
Hide file tree
Showing 4 changed files with 10,026 additions and 12 deletions.
8 changes: 6 additions & 2 deletions orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7277,7 +7277,9 @@ bool PortsOrch::addTunnel(string tunnel_alias, sai_object_id_t tunnel_id, bool h
{
tunnel.m_learn_mode = SAI_BRIDGE_PORT_FDB_LEARNING_MODE_DISABLE;
}
tunnel.m_oper_status = SAI_PORT_OPER_STATUS_DOWN;
m_portList[tunnel_alias] = tunnel;
saiOidToAlias[tunnel_id] = tunnel_alias;

SWSS_LOG_INFO("addTunnel:: %" PRIx64, tunnel_id);

Expand All @@ -7288,6 +7290,7 @@ bool PortsOrch::removeTunnel(Port tunnel)
{
SWSS_LOG_ENTER();

saiOidToAlias.erase(tunnel.m_tunnel_id);
m_portList.erase(tunnel.m_alias);

return true;
Expand Down Expand Up @@ -8215,9 +8218,10 @@ void PortsOrch::updatePortOperStatus(Port &port, sai_port_oper_status_t status)
return;
}

if (port.m_type == Port::PHY)
updateDbPortOperStatus(port, status);

if (port.m_type == Port::PHY || port.m_type == Port::TUNNEL)
{
updateDbPortOperStatus(port, status);
updateDbPortFlapCount(port, status);
updateGearboxPortOperStatus(port);

Expand Down
Loading

0 comments on commit 1cd531b

Please sign in to comment.