Skip to content
Open
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
2 changes: 1 addition & 1 deletion orchagent/mirrororch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ bool MirrorOrch::setUnsetPortMirror(Port port,
if (set)
{
port_attr.value.objlist.count = 1;
port_attr.value.objlist.list = (long unsigned int *)calloc(port_attr.value.objlist.count, sizeof(sai_object_id_t));
port_attr.value.objlist.list = reinterpret_cast<sai_object_id_t *>((void *)calloc(port_attr.value.objlist.count, sizeof(sai_object_id_t)));
port_attr.value.objlist.list[0] = sessionId;
}
else
Expand Down
14 changes: 7 additions & 7 deletions orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4317,7 +4317,7 @@ bool PortsOrch::initGearboxPort(Port &port)
{
if (m_gearboxInterfaceMap.find(port.m_index) != m_gearboxInterfaceMap.end())
{
SWSS_LOG_NOTICE("BOX: port_id:0x%lx index:%d alias:%s", port.m_port_id, port.m_index, port.m_alias.c_str());
SWSS_LOG_NOTICE("BOX: port_id:0x%" PRIx64 " index:%d alias:%s", port.m_port_id, port.m_index, port.m_alias.c_str());

phy_id = m_gearboxInterfaceMap[port.m_index].phy_id;
phyOidStr = m_gearboxPhyMap[phy_id].phy_oid;
Expand Down Expand Up @@ -4374,11 +4374,11 @@ bool PortsOrch::initGearboxPort(Port &port)
status = sai_port_api->create_port(&systemPort, phyOid, static_cast<uint32_t>(attrs.size()), attrs.data());
if (status != SAI_STATUS_SUCCESS)
{
SWSS_LOG_ERROR("BOX: Failed to create Gearbox system-side port for alias:%s port_id:0x%lx index:%d status:%d",
SWSS_LOG_ERROR("BOX: Failed to create Gearbox system-side port for alias:%s port_id:0x%" PRIx64 " index:%d status:%d",
port.m_alias.c_str(), port.m_port_id, port.m_index, status);
return false;
}
SWSS_LOG_NOTICE("BOX: Created Gearbox system-side port 0x%lx for alias:%s index:%d",
SWSS_LOG_NOTICE("BOX: Created Gearbox system-side port 0x%" PRIx64 " for alias:%s index:%d",
systemPort, port.m_alias.c_str(), port.m_index);

/* Create LINE-SIDE port */
Expand Down Expand Up @@ -4457,11 +4457,11 @@ bool PortsOrch::initGearboxPort(Port &port)
status = sai_port_api->create_port(&linePort, phyOid, static_cast<uint32_t>(attrs.size()), attrs.data());
if (status != SAI_STATUS_SUCCESS)
{
SWSS_LOG_ERROR("BOX: Failed to create Gearbox line-side port for alias:%s port_id:0x%lx index:%d status:%d",
SWSS_LOG_ERROR("BOX: Failed to create Gearbox line-side port for alias:%s port_id:0x%" PRIx64 " index:%d status:%d",
port.m_alias.c_str(), port.m_port_id, port.m_index, status);
return false;
}
SWSS_LOG_NOTICE("BOX: Created Gearbox line-side port 0x%lx for alias:%s index:%d",
SWSS_LOG_NOTICE("BOX: Created Gearbox line-side port 0x%" PRIx64 " for alias:%s index:%d",
linePort, port.m_alias.c_str(), port.m_index);

/* Connect SYSTEM-SIDE to LINE-SIDE */
Expand All @@ -4477,11 +4477,11 @@ bool PortsOrch::initGearboxPort(Port &port)
status = sai_port_api->create_port_connector(&connector, phyOid, static_cast<uint32_t>(attrs.size()), attrs.data());
if (status != SAI_STATUS_SUCCESS)
{
SWSS_LOG_ERROR("BOX: Failed to connect Gearbox system-side:0x%lx to line-side:0x%lx; status:%d", systemPort, linePort, status);
SWSS_LOG_ERROR("BOX: Failed to connect Gearbox system-side:0x%" PRIx64 " to line-side:0x%" PRIx64 "; status:%d", systemPort, linePort, status);
return false;
}

SWSS_LOG_NOTICE("BOX: Connected Gearbox ports; system-side:0x%lx to line-side:0x%lx", systemPort, linePort);
SWSS_LOG_NOTICE("BOX: Connected Gearbox ports; system-side:0x%" PRIx64 " to line-side:0x%" PRIx64, systemPort, linePort);
m_gearboxPortListLaneMap[port.m_port_id] = make_tuple(systemPort, linePort);
}
}
Expand Down
5 changes: 3 additions & 2 deletions orchagent/saihelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ extern "C" {
#include "saiextensions.h"
}

#include <inttypes.h>
#include <string.h>
#include <fstream>
#include <map>
Expand Down Expand Up @@ -259,7 +260,7 @@ void initSaiRedis(const string &record_location)

if (status != SAI_STATUS_SUCCESS)
{
SWSS_LOG_ERROR("Failed to notify syncd INIT_VIEW, rv:%d gSwitchId %lx", status, gSwitchId);
SWSS_LOG_ERROR("Failed to notify syncd INIT_VIEW, rv:%d gSwitchId %" PRIx64, status, gSwitchId);
exit(EXIT_FAILURE);
}
SWSS_LOG_NOTICE("Notify syncd INIT_VIEW");
Expand Down Expand Up @@ -323,7 +324,7 @@ sai_status_t initSaiPhyApi(swss::gearbox_phy_t *phy)
SWSS_LOG_ERROR("BOX: Failed to create PHY:%d rtn:%d", phy->phy_id, status);
return status;
}
SWSS_LOG_NOTICE("BOX: Created PHY:%d Oid:0x%lx", phy->phy_id, phyOid);
SWSS_LOG_NOTICE("BOX: Created PHY:%d Oid:0x%" PRIx64, phy->phy_id, phyOid);

phy->phy_oid = sai_serialize_object_id(phyOid);

Expand Down