diff --git a/orchagent/switchorch.cpp b/orchagent/switchorch.cpp index bbe37b3f576..a125e8db40c 100644 --- a/orchagent/switchorch.cpp +++ b/orchagent/switchorch.cpp @@ -67,7 +67,7 @@ SwitchOrch::SwitchOrch(DBConnector *db, vector& connectors, Tabl attr.value.s32 = SAI_TUNNEL_VXLAN_UDP_SPORT_MODE_EPHEMERAL; attrs.push_back(attr); - status = sai_switch_api->create_switch_tunnel(&switch_tunnel_id, gSwitchId, static_cast(attrs.size()), attrs.data()); + status = sai_switch_api->create_switch_tunnel(&m_switchTunnelId, gSwitchId, static_cast(attrs.size()), attrs.data()); if (status != SAI_STATUS_SUCCESS) { @@ -169,7 +169,7 @@ sai_status_t SwitchOrch::setSwitchTunnelVxlanParams(swss::FieldValueTuple &val) // Enable Vxlan src port range feauture attr.id = SAI_SWITCH_TUNNEL_ATTR_TUNNEL_VXLAN_UDP_SPORT_MODE; attr.value.s32 = SAI_TUNNEL_VXLAN_UDP_SPORT_MODE_USER_DEFINED; - status = sai_switch_api->set_switch_tunnel_attribute(switch_tunnel_id, &attr); + status = sai_switch_api->set_switch_tunnel_attribute(m_switchTunnelId, &attr); if (status != SAI_STATUS_SUCCESS) { @@ -194,7 +194,7 @@ sai_status_t SwitchOrch::setSwitchTunnelVxlanParams(swss::FieldValueTuple &val) return SAI_STATUS_SUCCESS; } - status = sai_switch_api->set_switch_tunnel_attribute(switch_tunnel_id, &attr); + status = sai_switch_api->set_switch_tunnel_attribute(m_switchTunnelId, &attr); if (status != SAI_STATUS_SUCCESS) { SWSS_LOG_ERROR("Failed to set tunnnel switch attribute %s to %s, rv:%d", attribute.c_str(), value.c_str(), status); diff --git a/orchagent/switchorch.h b/orchagent/switchorch.h index 23938905563..86181e19df7 100644 --- a/orchagent/switchorch.h +++ b/orchagent/switchorch.h @@ -41,7 +41,7 @@ class SwitchOrch : public Orch void doTask(swss::NotificationConsumer& consumer); swss::DBConnector *m_db; swss::Table m_switchTable; - sai_object_id_t switch_tunnel_id; + sai_object_id_t m_switchTunnelId; // ASIC temperature sensors std::shared_ptr m_stateDb = nullptr;