Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
9 changes: 8 additions & 1 deletion vslib/vpp/SaiObjectDB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ SaiObjectDB::get(
// check if the object exists
status = m_switch_db->get(object_type, id, 0, &attr);
if (status != SAI_STATUS_SUCCESS) {
SWSS_LOG_WARN("Object is not found in SwitchVpp %s:%s", sai_serialize_object_type(object_type).c_str(), id.c_str());
SWSS_LOG_NOTICE("Object is not found in SwitchVpp %s:%s", sai_serialize_object_type(object_type).c_str(), id.c_str());
return std::shared_ptr<SaiDBObject>();
}
/*
Expand All @@ -309,6 +309,13 @@ SaiObject::get_linked_object(
SWSS_LOG_ERROR("Failed to get attribute %d from object %s", link_attr_id, m_id.c_str());
return std::shared_ptr<SaiDBObject>();
}

if (RealObjectIdManager::objectTypeQuery(attr.value.oid) != linked_object_type) {
SWSS_LOG_INFO("Linked object type mismatch: expected %d, got %d. Will return empty object.",
linked_object_type, RealObjectIdManager::objectTypeQuery(attr.value.oid));
return std::shared_ptr<SaiDBObject>();
}

linked_obj_id = sai_serialize_object_id(attr.value.oid);

return m_switch_db->get_sai_object(linked_object_type, linked_obj_id);
Expand Down
2 changes: 1 addition & 1 deletion vslib/vpp/SwitchVpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1341,7 +1341,7 @@ sai_status_t SwitchVpp::get(

if (it == objectHash.end())
{
SWSS_LOG_ERROR("not found %s:%s",
SWSS_LOG_INFO("not found %s:%s",
sai_serialize_object_type(objectType).c_str(),
serializedObjectId.c_str());

Expand Down
8 changes: 4 additions & 4 deletions vslib/vpp/SwitchVppRif.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,11 @@ std::string get_intf_name_for_prefix (
is_v6 = (route_entry.destination.addr_family == SAI_IP_ADDR_FAMILY_IPV6) ? true : false;

std::string full_if_name = "";
bool found = vpp_get_intf_name_for_prefix(route_entry.destination, is_v6, full_if_name);
if (found == false)
{
bool found = vpp_get_intf_name_for_prefix(route_entry.destination, is_v6, full_if_name);
if (found == false)
{
auto prefix_str = sai_serialize_ip_prefix(route_entry.destination);
SWSS_LOG_ERROR("host interface for prefix not found: %s", prefix_str.c_str());
SWSS_LOG_INFO("host interface for prefix not found: %s", prefix_str.c_str());
}
return full_if_name;

Expand Down
Loading