Skip to content

Commit 15b8235

Browse files
committed
Fix review comments
- Handle table name change - Remove BufferOrch's constructor which isnt used Signed-off-by: Stephen Sun <stephens@nvidia.com>
1 parent 6c60a7d commit 15b8235

File tree

4 files changed

+4
-20
lines changed

4 files changed

+4
-20
lines changed

cfgmgr/buffer_pool_mellanox.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ local statistics = {}
104104
-- Fetch sizes of all of the profiles, accumulate them
105105
local accumulative_occupied_buffer = 0
106106
for i = 1, #profiles, 1 do
107-
if profiles[i][1] ~= "BUFFER_PROFILE_KEY_SET" and profiles[i][1] ~= "BUFFER_PROFILE_DEL_SET" then
107+
if profiles[i][1] ~= "BUFFER_PROFILE_TABLE_KEY_SET" and profiles[i][1] ~= "BUFFER_PROFILE_TABLE_DEL_SET" then
108108
local size = tonumber(redis.call('HGET', profiles[i][1], 'size'))
109109
if size ~= nil then
110110
if profiles[i][1] == "BUFFER_PROFILE_TABLE:ingress_lossy_profile" then

cfgmgr/buffermgr.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,9 @@ void BufferMgr::transformReference(string &name)
258258
* One thing we need to handle is to transform the separator from | to :
259259
* The following items contain separator:
260260
* - keys of each item
261-
* - pool in BUFFER_POOL
261+
* - pool in BUFFER_PROFILE
262262
* - profile in BUFFER_PG
263+
* - profile_list in BUFFER_PORT_INGRESS_PROFILE_LIST and BUFFER_PORT_EGRESS_PROFILE_LIST
263264
*/
264265
void BufferMgr::doBufferTableTask(Consumer &consumer, ProducerStateTable &applTable)
265266
{

orchagent/bufferorch.cpp

+1-17
Original file line numberDiff line numberDiff line change
@@ -50,22 +50,6 @@ BufferOrch::BufferOrch(DBConnector *applDb, DBConnector *confDb, DBConnector *st
5050
initBufferConstants();
5151
};
5252

53-
BufferOrch::BufferOrch(DBConnector *applDb, DBConnector *confDb, DBConnector *stateDb, vector<TableConnector> &tableConnectors) :
54-
Orch(tableConnectors),
55-
m_flexCounterDb(new DBConnector("FLEX_COUNTER_DB", 0)),
56-
m_flexCounterTable(new ProducerTable(m_flexCounterDb.get(), FLEX_COUNTER_TABLE)),
57-
m_flexCounterGroupTable(new ProducerTable(m_flexCounterDb.get(), FLEX_COUNTER_GROUP_TABLE)),
58-
m_countersDb(new DBConnector("COUNTERS_DB", 0)),
59-
m_countersDbRedisClient(m_countersDb.get()),
60-
m_stateBufferMaximumValueTable(stateDb, STATE_BUFFER_MAXIMUM_VALUE_TABLE)
61-
{
62-
SWSS_LOG_ENTER();
63-
initTableHandlers();
64-
initBufferReadyLists(confDb);
65-
initFlexCounterGroupTable();
66-
initBufferConstants();
67-
};
68-
6953
void BufferOrch::initTableHandlers()
7054
{
7155
SWSS_LOG_ENTER();
@@ -132,7 +116,7 @@ void BufferOrch::initBufferConstants()
132116
status = sai_switch_api->get_switch_attribute(gSwitchId, 1, &attr);
133117
if (status != SAI_STATUS_SUCCESS)
134118
{
135-
SWSS_LOG_ERROR("Failed to get Maxiuum memory size, rv:%d", status);
119+
SWSS_LOG_ERROR("Failed to get Maximum memory size, rv:%d", status);
136120
// This is not a mandatory attribute so in case of failure we just return
137121
return;
138122
}

orchagent/bufferorch.h

-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ class BufferOrch : public Orch
3333
{
3434
public:
3535
BufferOrch(DBConnector *applDb, DBConnector *confDb, DBConnector *stateDb, vector<string> &tableNames);
36-
BufferOrch(DBConnector *applDb, DBConnector *confDb, DBConnector *stateDb, vector<TableConnector> &tableConnectors);
3736
bool isPortReady(const std::string& port_name) const;
3837
static type_map m_buffer_type_maps;
3938
void generateBufferPoolWatermarkCounterIdList(void);

0 commit comments

Comments
 (0)