-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DASH] Add support for ENI counters #30
Conversation
Signed-off-by: Vivek Reddy <vkarri@nvidia.com>
|
||
DashOrch::DashOrch(DBConnector *db, vector<string> &tableName, ZmqServer *zmqServer) : ZmqOrch(db, tableName, zmqServer) | ||
#define FLEX_COUNTER_UPD_INTERVAL 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why there are two defines for the update interval? What is the difference comparing to ENI_STAT_FLEX_COUNTER_POLLING_INTERVAL_MS
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's redundant, will remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually i'm wrong sorry. FLEX_COUNTER_UPD_INTERVAL is the period for SelectableTimer. ENI_STAT_FLEX_COUNTER_POLLING_INTERVAL_MS is the default polling interval for FlexCounter i.e. to collect and populate the COUNTERS_DB
|
||
void DashOrch::doTask(SelectableTimer &timer) | ||
{ | ||
SWSS_LOG_ENTER(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to start this at all in case if we are not using traditional model? All it does in non traditional approach is to ++it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The update logic will run regardless of the model. If it's asic_db approach, we don't wait for vidtorid table to be populated (cause since it's through ASIC channel, this op is guarenteed to be run after the actual object creation.
In the case of traditional counter, we are waiting until the vidtorid object is created before population FLEX_COUNTER_DB
} | ||
} | ||
|
||
if (m_eni_stat_work_queue.empty()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case of ! gTraditionalFlexCounter since the queue may not be empty this may loop for ever on creation of single eni. This may be unwarranted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above m_eni_stat_work_queue will be empty eventually
|
||
#include "dash_api/appliance.pb.h" | ||
#include "dash_api/route_type.pb.h" | ||
#include "dash_api/eni.pb.h" | ||
#include "dash_api/qos.pb.h" | ||
|
||
#define ENI_STAT_COUNTER_FLEX_COUNTER_GROUP "ENI_STAT_COUNTER" | ||
#define ENI_STAT_FLEX_COUNTER_POLLING_INTERVAL_MS 10000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did we decide the default polling interval as 10 sec. Is it based on some spec?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Every other object other than PORT has a default of 10 sec. you think i should update this?
Signed-off-by: Vivek Reddy <vkarri@nvidia.com>
Signed-off-by: Vivek Reddy <vkarri@nvidia.com>
What I did
Why I did it
How I verified it
Enable Flex Counter Creation:
Details if related