Skip to content

Commit

Permalink
Fix review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Sun <stephens@nvidia.com>
  • Loading branch information
stephenxs committed Mar 13, 2024
1 parent a49006d commit 07aa1cd
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/RedisRemoteSaiInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,25 +537,23 @@ sai_status_t RedisRemoteSaiInterface::notifyCounterOperations(
{
auto *param = reinterpret_cast<sai_redis_flex_counter_parameter_t*>(attr->value.ptr);
std::vector<swss::FieldValueTuple> entries;
auto serializedObjectId = sai_serialize_object_id(objectId);
std::string key(param->counter_key);
std::string command;

if (param->counter_ids != nullptr)
{
entries.push_back({param->counter_field_name, param->counter_ids});
command = REDIS_FLEX_COUNTER_COMMAND_START_POLL;
if (param->stats_mode != nullptr)
{
entries.push_back({STATS_MODE_FIELD, param->stats_mode});
}
}
else
{
command = REDIS_FLEX_COUNTER_COMMAND_STOP_POLL;
}

if (param->stats_mode != nullptr)
{
entries.push_back({STATS_MODE_FIELD, param->stats_mode});
}

m_recorder->recordGenericSet(key, entries);
m_communicationChannel->set(key, entries, command);

Expand Down

0 comments on commit 07aa1cd

Please sign in to comment.