Skip to content
Merged
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: 6 additions & 0 deletions syncd/syncd_counters.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "syncd.h"
#include <condition_variable>
#include <sstream>

void collectCounters(swss::Table &countersTable,
const std::vector<sai_port_stat_counter_t> &supportedCounters)
Expand Down Expand Up @@ -36,6 +37,11 @@ void collectCounters(swss::Table &countersTable,
std::string strPortId;
sai_serialize_primitive(vid, strPortId);

// for counters, use port vid as printf "%llx" format
std::stringstream ss;
ss << std::hex << vid;
strPortId = ss.str();

std::vector<swss::FieldValueTuple> values;

for (size_t idx = 0; idx < counters.size(); idx++)
Expand Down