Skip to content
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/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7305,7 +7305,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 @@ -7316,6 +7318,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 @@ -8265,9 +8268,10 @@ void PortsOrch::updatePortOperStatus(Port &port, sai_port_oper_status_t status)
return;
}

updateDbPortOperStatus(port, status);

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

Expand Down
5 changes: 3 additions & 2 deletions orchagent/vxlanorch.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ typedef enum
#define MAX_VLAN_ID 4095

#define MAX_VNI_ID 16777215
#define DEFAULT_TUNNEL_ENCAP_TTL 255

typedef enum
{
Expand Down Expand Up @@ -196,7 +197,7 @@ class VxlanTunnel

bool deleteMapperHw(uint8_t mapper_list, tunnel_map_use_t map_src);
bool createMapperHw(uint8_t mapper_list, tunnel_map_use_t map_src);
bool createTunnelHw(uint8_t mapper_list, tunnel_map_use_t map_src, bool with_term = true, sai_uint8_t encap_ttl=0);
bool createTunnelHw(uint8_t mapper_list, tunnel_map_use_t map_src, bool with_term = true, sai_uint8_t encap_ttl=DEFAULT_TUNNEL_ENCAP_TTL);
bool deleteTunnelHw(uint8_t mapper_list, tunnel_map_use_t map_src, bool with_term = true);
void deletePendingSIPTunnel();
void increment_spurious_imr_add(const std::string remote_vtep);
Expand Down Expand Up @@ -299,7 +300,7 @@ class VxlanTunnelOrch : public Orch2


bool createVxlanTunnelMap(string tunnelName, tunnel_map_type_t mapType, uint32_t vni,
sai_object_id_t encap, sai_object_id_t decap, uint8_t encap_ttl=0);
sai_object_id_t encap, sai_object_id_t decap, uint8_t encap_ttl=DEFAULT_TUNNEL_ENCAP_TTL);

bool removeVxlanTunnelMap(string tunnelName, uint32_t vni);

Expand Down
4 changes: 4 additions & 0 deletions tests/evpn_tunnel.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,8 @@ def check_vxlan_sip_tunnel(self, dvs, tunnel_name, src_ip, vidlist, vnidlist,
'SAI_TUNNEL_ATTR_ENCAP_MAPPERS': encapstr,
'SAI_TUNNEL_ATTR_PEER_MODE': 'SAI_TUNNEL_PEER_MODE_P2MP',
'SAI_TUNNEL_ATTR_ENCAP_SRC_IP': src_ip,
'SAI_TUNNEL_ATTR_ENCAP_TTL_MODE': 'SAI_TUNNEL_TTL_MODE_PIPE_MODEL',
'SAI_TUNNEL_ATTR_ENCAP_TTL_VAL': '255',
}
)

Expand Down Expand Up @@ -675,6 +677,8 @@ def check_vxlan_dip_tunnel(self, dvs, vtep_name, src_ip, dip):
'SAI_TUNNEL_ATTR_ENCAP_MAPPERS': encapstr,
'SAI_TUNNEL_ATTR_ENCAP_SRC_IP': src_ip,
'SAI_TUNNEL_ATTR_ENCAP_DST_IP': dip,
'SAI_TUNNEL_ATTR_ENCAP_TTL_MODE': 'SAI_TUNNEL_TTL_MODE_PIPE_MODEL',
'SAI_TUNNEL_ATTR_ENCAP_TTL_VAL': '255',
}

ret = self.helper.get_key_with_attr(asic_db, self.ASIC_TUNNEL_TABLE, expected_tun_attributes)
Expand Down
4 changes: 3 additions & 1 deletion tests/test_vxlan_tunnel.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ def check_vxlan_tunnel(dvs, src_ip, dst_ip, tunnel_map_ids, tunnel_map_entry_ids
'SAI_TUNNEL_ATTR_DECAP_MAPPERS': decapstr,
'SAI_TUNNEL_ATTR_ENCAP_MAPPERS': encapstr,
'SAI_TUNNEL_ATTR_PEER_MODE': 'SAI_TUNNEL_PEER_MODE_P2MP',
'SAI_TUNNEL_ATTR_ENCAP_SRC_IP': src_ip
'SAI_TUNNEL_ATTR_ENCAP_SRC_IP': src_ip,
'SAI_TUNNEL_ATTR_ENCAP_TTL_MODE': 'SAI_TUNNEL_TTL_MODE_PIPE_MODEL',
'SAI_TUNNEL_ATTR_ENCAP_TTL_VAL': '255'
}
)

Expand Down