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

Add support for voq counters in portsorch. #2467

Merged
merged 6 commits into from
Oct 12, 2022
Merged

Add support for voq counters in portsorch. #2467

merged 6 commits into from
Oct 12, 2022

Conversation

skbarista
Copy link
Contributor

What I did

Add m_voq_ids to SystemPortInfo to maintain the list of queue ids.
Add two new tables COUNTERS_SYSTEM_PORT_NAME_MAP and
COUNTERS_VOQ_NAME_MAP to enable queuestat to differentiate between
Port Tx queues and Voqs.
Add a new function initializeVoqs that retrieves the number of voqs
for a system port and stores the voq object ids in m_voq_ids
Add code to handle queue type SAI_QUEUE_TYPE_UNICAST_VOQ.
Initialize voqs and populate COUNTERS_SYSTEM_PORT_NAME_MAP in
addSystemPorts function.
Update generateQueueMap to generate queue maps for both Txqs and Voq.
For PHY ports in a voq system both Txqs and Voqs are instantiated. For
Voqs of remote system port, only Voq counters are initialized.

Why I did it

Add support for voq counters.

How I verified it

Modified queuestat locally and confirming the counters are populated for Voqs.

Details if related

@skbarista skbarista requested a review from prsunny as a code owner September 26, 2022 16:33
@skbarista skbarista marked this pull request as draft September 27, 2022 17:23
@prsunny
Copy link
Collaborator

prsunny commented Sep 30, 2022

@skbarista , i see the subport tests are consistently failing for this PR but not for others. Please make sure, it is passing consistently

test_sub_port_intf.py::TestSubPortIntf::test_sub_port_intf_creation FAILED

@skbarista skbarista marked this pull request as ready for review October 6, 2022 03:19
@vmittal-msft
Copy link
Contributor

@prsunny I have verified these changes to be working fine along with other PRs (#2465)

vmittal-msft
vmittal-msft previously approved these changes Oct 6, 2022
* Add m_voq_ids to SystemPortInfo to maintain the list of queue ids.
* Add two new tables COUNTERS_SYSTEM_PORT_NAME_MAP and
  COUNTERS_VOQ_NAME_MAP to enable queuestat to differentiate between
  Port Tx queues and Voqs.
* Add a new function initializeVoqs that retrieves the number of voqs
  for a system port and stores the voq object ids in m_voq_ids
* Add code to handle queue type SAI_QUEUE_TYPE_UNICAST_VOQ.
* Initialize voqs and populate COUNTERS_SYSTEM_PORT_NAME_MAP in
  addSystemPorts function.
* Update generateQueueMap to generate queue maps for both Txqs and Voq.
  For PHY ports in a voq system both Txqs and Voqs are instantiated. For
  Voqs of remote system port, only Voq counters are initialized.
@skbarista skbarista reopened this Oct 6, 2022
vmittal-msft
vmittal-msft previously approved these changes Oct 6, 2022
* Add m_voq_ids to SystemPortInfo to maintain the list of queue ids.
* Add two new tables COUNTERS_SYSTEM_PORT_NAME_MAP and
  COUNTERS_VOQ_NAME_MAP to enable queuestat to differentiate between
  Port Tx queues and Voqs.
* Add a new function initializeVoqs that retrieves the number of voqs
  for a system port and stores the voq object ids in m_voq_ids
* Add code to handle queue type SAI_QUEUE_TYPE_UNICAST_VOQ.
* Initialize voqs and populate COUNTERS_SYSTEM_PORT_NAME_MAP in
  addSystemPorts function.
* Update generateQueueMap to generate queue maps for both Txqs and Voq.
  For PHY ports in a voq system both Txqs and Voqs are instantiated. For
  Voqs of remote system port, only Voq counters are initialized.
@vmittal-msft
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

* Add m_voq_ids to SystemPortInfo to maintain the list of queue ids.
* Add two new tables COUNTERS_SYSTEM_PORT_NAME_MAP and
  COUNTERS_VOQ_NAME_MAP to enable queuestat to differentiate between
  Port Tx queues and Voqs.
* Add a new function initializeVoqs that retrieves the number of voqs
  for a system port and stores the voq object ids in m_voq_ids
* Add code to handle queue type SAI_QUEUE_TYPE_UNICAST_VOQ.
* Initialize voqs and populate COUNTERS_SYSTEM_PORT_NAME_MAP in
  addSystemPorts function.
* Update generateQueueMap to generate queue maps for both Txqs and Voq.
  For PHY ports in a voq system both Txqs and Voqs are instantiated. For
  Voqs of remote system port, only Voq counters are initialized.
* Add m_voq_ids to SystemPortInfo to maintain the list of queue ids.
* Add two new tables COUNTERS_SYSTEM_PORT_NAME_MAP and
  COUNTERS_VOQ_NAME_MAP to enable queuestat to differentiate between
  Port Tx queues and Voqs.
* Add a new function initializeVoqs that retrieves the number of voqs
  for a system port and stores the voq object ids in m_voq_ids
* Add code to handle queue type SAI_QUEUE_TYPE_UNICAST_VOQ.
* Initialize voqs and populate COUNTERS_SYSTEM_PORT_NAME_MAP in
  addSystemPorts function.
* Update generateQueueMap to generate queue maps for both Txqs and Voq.
  For PHY ports in a voq system both Txqs and Voqs are instantiated. For
  Voqs of remote system port, only Voq counters are initialized.
* Add m_voq_ids to SystemPortInfo to maintain the list of queue ids.
* Add two new tables COUNTERS_SYSTEM_PORT_NAME_MAP and
  COUNTERS_VOQ_NAME_MAP to enable queuestat to differentiate between
  Port Tx queues and Voqs.
* Add a new function initializeVoqs that retrieves the number of voqs
  for a system port and stores the voq object ids in m_voq_ids
* Add code to handle queue type SAI_QUEUE_TYPE_UNICAST_VOQ.
* Initialize voqs and populate COUNTERS_SYSTEM_PORT_NAME_MAP in
  addSystemPorts function.
* Update generateQueueMap to generate queue maps for both Txqs and Voq.
  For PHY ports in a voq system both Txqs and Voqs are instantiated. For
  Voqs of remote system port, only Voq counters are initialized.
@prsunny prsunny merged commit 15beee4 into sonic-net:master Oct 12, 2022
liat-grozovik pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Nov 10, 2022
Advance sonic-swss submodule to pick up new commits:

dbdf31c [counters] Improve performance by polling only configured ports buffer queue/pg counters sonic-net/sonic-swss#2473
ab4f804 [portsorch] remove port OID from saiOidToAlias map on port deletion sonic-net/sonic-swss#2483
ab29920 [QoS] Support dynamic headroom calculation for Barefoot platforms sonic-net/sonic-swss#2412
15beee4 Add support for voq counters in portsorch. sonic-net/sonic-swss#2467
c8d4905 [vlanmgr] Disable arp_evict_nocarrier for vlan host intf sonic-net/sonic-swss#2469
31c9321 [chassis][voq]Collect counters for fabric links sonic-net/sonic-swss#1944

Signed-off-by: Kebo Liu <[email protected]>
@yxieca
Copy link
Contributor

yxieca commented Dec 1, 2022

@skbarista this change cannot be cherry-picked cleanly. please create new PR for 202205 branch. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants