Skip to content

Commit

Permalink
policer counter - fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
shiraez authored and shiraez committed Dec 9, 2024
1 parent 0d62611 commit 6409451
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 29 deletions.
2 changes: 1 addition & 1 deletion orchagent/flex_counter/flex_counter_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ enum class CounterType
TUNNEL,
HOSTIF_TRAP,
ROUTE,
ENI
ENI,
POLICER,
};

Expand Down
25 changes: 0 additions & 25 deletions orchagent/policerorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,6 @@ bool PolicerOrch::decreaseRefCount(const string &name)
return true;
}

// PolicerOrch::PolicerOrch(vector<TableConnector> &tableNames, PortsOrch *portOrch) : Orch(tableNames), m_portsOrch(portOrch)
// {
// SWSS_LOG_ENTER();
// }

PolicerOrch::PolicerOrch( vector<TableConnector> &tableNames, PortsOrch *portOrch) :
Orch(tableNames),
Expand Down Expand Up @@ -274,9 +270,6 @@ task_process_status PolicerOrch::handlePortStormControlTable(swss::KeyOpFieldsVa
SWSS_LOG_DEBUG("Created storm-control policer %s", storm_policer_name.c_str());
m_syncdPolicers[storm_policer_name] = policer_id;
m_policerRefCounts[storm_policer_name] = 0;


// addPolicerToFlexCounter(policer_id, key.c_str());

}
// Update an existing policer
Expand Down Expand Up @@ -307,8 +300,6 @@ task_process_status PolicerOrch::handlePortStormControlTable(swss::KeyOpFieldsVa

}
}

// addPolicerToFlexCounter(policer_id, key.c_str());
}
policer_id = m_syncdPolicers[storm_policer_name];

Expand Down Expand Up @@ -413,19 +404,6 @@ task_process_status PolicerOrch::handlePortStormControlTable(swss::KeyOpFieldsVa
return task_process_status::task_success;
}

// sai_object_id_t PolicerOrch::getCounterOid() const
// {
// return m_counterOid;
// }

void PolicerOrch::generatePolicerCounterStats(std::unordered_set<std::string>& counter_stats)
{
for (const auto& it: policer_stat_ids)
{
counter_stats.emplace(sai_serialize_policer_stat(it));
}
}

string PolicerOrch::getPolicerFlexCounterTableKey(string key)
{
return string(POLICER_STAT_COUNTER_FLEX_COUNTER_GROUP) + ":" + key;
Expand All @@ -452,9 +430,6 @@ void PolicerOrch::removePCFromFlexCounter(sai_object_id_t id, const string &name
m_counter_table->hdel("", name);
m_vidToRidTable->hdel("", counter_oid_str);

// /* remove it from FLEX_COUNTER_DB */
// string key = getPolicerFlexCounterTableKey(counter_oid_str);

SWSS_LOG_DEBUG("Unregistered interface %s from Flex counter", name.c_str());
}

Expand Down
3 changes: 0 additions & 3 deletions orchagent/policerorch.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@ class PolicerOrch : public Orch
task_process_status handlePortStormControlTable(swss::KeyOpFieldsValuesTuple tuple);
void generatePolicerCounterMap();
void addPolicerToFlexCounter(sai_object_id_t oid, const string &name);
sai_object_id_t getCounterOid() const;
private:
PortsOrch *m_portsOrch;
// void PolicerOrch::getstats(sai_object_id_t policer_id);
virtual void doTask(Consumer& consumer);
void doTask(swss::SelectableTimer&) override;

Expand All @@ -44,7 +42,6 @@ class PolicerOrch : public Orch
void getPolicerCounter(void);
void initPolicerCounterPlugin(void);
void removePCFromFlexCounter(sai_object_id_t id, const string &name);
void generatePolicerCounterStats(std::unordered_set<std::string>& counter_stats);
string getPolicerFlexCounterTableKey(string key);
std::unordered_set<std::string> generatePCounterStats();

Expand Down

0 comments on commit 6409451

Please sign in to comment.