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

[orchagent] Support for aggregrate VOQ Counters. #3047

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

vivekverma-arista
Copy link

@vivekverma-arista vivekverma-arista commented Feb 13, 2024

What I did

Implemented aggregate VOQ counters support according to aggregate VOQ counters HLD #1578

Why I did it

Part of aggregate VOQ counter feature support #1543

How I verified it

Sent traffic to the switch and checked that VOQ stats are getting populated in CHASSIS_APP_DB

@vivekverma-arista vivekverma-arista changed the title Agg voq [orchagent] Added support for aggregate VOQ counters. Feb 13, 2024
@vivekverma-arista vivekverma-arista changed the title [orchagent] Added support for aggregate VOQ counters. [orchagent] Support for aggregrate VOQ Counters. Feb 18, 2024
Copy link
Collaborator

@prsunny prsunny left a comment

Choose a reason for hiding this comment

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

please add tests

for (size_t queueIndex = 0; queueIndex < queue_ids.size(); ++queueIndex)
{
std::ostringstream key;
key << port.m_system_port_info.alias << "@" << gMyHostName << "|" << gMyAsicName << ":" << queueIndex;
Copy link
Contributor

Choose a reason for hiding this comment

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

Please share key example here.

{
SWSS_LOG_DEBUG("%s %s %s",key.str().c_str(), sai_serialize_queue_stat(it).c_str(),
to_string(queueStats[index]).c_str());
m_tableVoqQueueCounter->hset(key.str(), sai_serialize_queue_stat(it), to_string(queueStats[index++]));
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. Is this feature supported on SUP ?
  2. Please share CLI command as well as o/p.
  3. Please explain how aggregation of VoQ Stats from multiple LCs happening here. As VoQ id may be same across multiple LCs, it may end up over-writing existing data.
  4. please try reading the queue counters from LC while this polling is happening to make sure LC queue counter show is not impacting SUP o/p.

@vmittal-msft
Copy link
Contributor

@vivekverma-arista Can you please do test to send traffic from multiple sources to single destination and see if the aggregation is happening properly in the CLI o/p ?

@vmittal-msft
Copy link
Contributor

vmittal-msft commented Feb 28, 2024

Also, Can we have command format like - show queue counter --voq as it will be in-line with following -

show queue counters

@vmittal-msft
Copy link
Contributor

please rebase and bring to latest.

@judyjoseph
Copy link
Contributor

@saksarav-nokia please review as well

std::ostringstream key;
key << port.m_system_port_info.alias << "@" << gMyHostName << "|" << gMyAsicName << ":" << queueIndex;

sai_status_t status = sai_queue_api->get_queue_stats(
Copy link
Contributor

Choose a reason for hiding this comment

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

We support getting the voq stats locally at the linecard level, can we update the chassis_db when the voq stats are updated locally on the linecard? why we another timer and get the stats again to update to the chassis?

Create voq to port name map during port initializa

Why I did it?
When ports are getting created and voq's are being assigned to them, create a
voq to port name map table in counter DB so that it is easy to find the port
name for a specific voq when creating an entry in chassis_app_db to calculate
agg voq counters.
Copy link

linux-foundation-easycla bot commented May 16, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@vmittal-msft
Copy link
Contributor

Please update the code as it is out of date. @viveksrao-arista, Is this change to maintain mapping of VoQ to system port ? To be needed while updating the data to chassis_app_db ?

@vmittal-msft
Copy link
Contributor

@viveksrao-arista
Copy link

Please update the code as it is out of date. @viveksrao-arista, Is this change to maintain mapping of VoQ to system port ? To be needed while updating the data to chassis_app_db ?

Yes, this table maps a VoQ to system port and is used to obtain the interface name to which the VoQ belongs to when updating chassis_app_db.

@vmittal-msft
Copy link
Contributor

@viveksrao-arista please rebase it.

@viveksrao-arista
Copy link

@viveksrao-arista please rebase it.

Rebased the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

None yet

7 participants