Skip to content
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

Postpone QueueMap initialization until activation of the counters #527

Merged
merged 1 commit into from
Jun 26, 2018

Conversation

pavel-shirshov
Copy link
Contributor

What I did
I postponed generation of the QueueMaps until the counters are activated.

Why I did it
We don't need QueueMaps until the counters are active

How I verified it
Build an image and run on DUT

Details if related

@@ -70,6 +70,10 @@ void FlexCounterOrch::doTask(Consumer &consumer)
}
else if(field == FLEX_COUNTER_STATUS_FIELD)
{
// Currently the counters are disabled by default
// The queue maps will be generated as soon as counters are enabled
gPortsOrch->generateQueueMap();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the map generated after queue counters are enabled or all the counters are enabled?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The map is generated after activation of the flex counters. As I understand the maps are related to port queues. So they will be used with queue counters.

@@ -1817,61 +1817,6 @@ void PortsOrch::initializeQueues(Port &port)
}

SWSS_LOG_INFO("Get queues for port %s", port.m_alias.c_str());

/* Create the Queue map in the Counter DB */
/* Add stat counters to flex_counter */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need queue map for applying qos configuration?

Copy link
Contributor Author

@pavel-shirshov pavel-shirshov Jun 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. We use only Port::m_queue_ids vector. We use the maps only for:

  1. swss: pfc handler
  2. swss: countercheckorch
  3. queuestat
  4. snmp
  5. pfcwd utility

@pavel-shirshov pavel-shirshov merged commit 258ffe6 into sonic-net:master Jun 26, 2018
@pavel-shirshov pavel-shirshov deleted the pavelsh/q_inits branch June 26, 2018 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants