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

Create counter for the queue to which the host CPU traffic is sent when create_only_config_db_buffers is enabled #3334

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stephenxs
Copy link
Collaborator

What I did

Why I did it

How I verified it
Verified the following scenarios

  1. No BUFFER_QUEUE covering host CPU queue
       Port    TxQ    Counter/pkts    Counter/bytes    Drop/pkts    Drop/bytes
-----------  -----  --------------  ---------------  -----------  ------------
Ethernet248    UC0               0                0            0           N/A
Ethernet248    UC1               0                0            0           N/A
Ethernet248    UC2               0                0            0           N/A
Ethernet248    UC3               0                0            0           N/A
Ethernet248    UC4               0                0            0           N/A
Ethernet248    UC5               0                0            0           N/A
Ethernet248    UC6               0                0            0           N/A
Ethernet248    UC7             287            61730            0           N/A

admin@r-leopard-simx-74:~$ redis-cli -n 4
127.0.0.1:6379[4]> keys BUFFER_QUEUE*Ethernet248*
1) "BUFFER_QUEUE|Ethernet248|0-2"
2) "BUFFER_QUEUE|Ethernet248|5-6"
3) "BUFFER_QUEUE|Ethernet248|3-4"
  1. Remove irrelevant BUFFER_QUEUE on the port
admin@r-leopard-simx-74:~$ redis-cli -n 4          
127.0.0.1:6379[4]> del BUFFER_QUEUE|Ethernet248|5-6
(integer) 1
127.0.0.1:6379[4]> 
admin@r-leopard-simx-74:~$ queuestat -p Ethernet248
       Port    TxQ    Counter/pkts    Counter/bytes    Drop/pkts    Drop/bytes
-----------  -----  --------------  ---------------  -----------  ------------
Ethernet248    UC0               0                0            0           N/A
Ethernet248    UC1               0                0            0           N/A
Ethernet248    UC2               0                0            0           N/A
Ethernet248    UC3               0                0            0           N/A
Ethernet248    UC4               0                0            0           N/A
Ethernet248    UC7             294            63022            0           N/A
  1. Reconfig BUFFER_QEUUE covering host CPU queue
admin@r-leopard-simx-74:~$ redis-cli -n 4          
127.0.0.1:6379[4]> hset BUFFER_QUEUE|Ethernet248|5-7 profile q_lossy_profile
(integer) 1
127.0.0.1:6379[4]> exit
admin@r-leopard-simx-74:~$ queuestat -p Ethernet248
       Port    TxQ    Counter/pkts    Counter/bytes    Drop/pkts    Drop/bytes
-----------  -----  --------------  ---------------  -----------  ------------
Ethernet248    UC0               0                0            0           N/A
Ethernet248    UC1               0                0            0           N/A
Ethernet248    UC2               0                0            0           N/A
Ethernet248    UC3               0                0            0           N/A
Ethernet248    UC4               0                0            0           N/A
Ethernet248    UC5               0                0            0           N/A
Ethernet248    UC6               0                0            0           N/A
Ethernet248    UC7             298            63934            0           N/A
  1. Remove the configured BUFFER_QUEUE
admin@r-leopard-simx-74:~$ redis-cli -n 4          
127.0.0.1:6379[4]> del BUFFER_QUEUE|Ethernet248|5-7
(integer) 1
127.0.0.1:6379[4]> exit
admin@r-leopard-simx-74:~$ queuestat -p Ethernet248
       Port    TxQ    Counter/pkts    Counter/bytes    Drop/pkts    Drop/bytes
-----------  -----  --------------  ---------------  -----------  ------------
Ethernet248    UC0               0                0            0           N/A
Ethernet248    UC1               0                0            0           N/A
Ethernet248    UC2               0                0            0           N/A
Ethernet248    UC3               0                0            0           N/A
Ethernet248    UC4               0                0            0           N/A
Ethernet248    UC7             305            64818            0           N/A

Details if related

@stephenxs
Copy link
Collaborator Author

Failed due to some routing test cases which is not relevant to the PR. Retrying.

@stephenxs
Copy link
Collaborator Author

/apzw run

@stephenxs
Copy link
Collaborator Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@stephenxs stephenxs force-pushed the create-counter-for-cpu-queue branch 2 times, most recently from 3fb27c0 to 3b9b430 Compare October 30, 2024 23:28
@prabhataravind
Copy link
Contributor

My understanding is that you are setting queue counters for queue 7 (control traffic tx queue). Isn't that already available on sonic today? At least "show queue counters" seems to show queue counters on cpu tx queue already. The first output in your verifications also show q7 counters, so what does this PR change affect? @bingwang-ms for viz

@stephenxs
Copy link
Collaborator Author

My understanding is that you are setting queue counters for queue 7 (control traffic tx queue). Isn't that already available on sonic today? At least "show queue counters" seems to show queue counters on cpu tx queue already. The first output in your verifications also show q7 counters, so what does this PR change affect? @bingwang-ms for viz

Hi @prabhataravind
This is not accurate. There is a configuration to optimize the buffer performance DEVICE_METADATA|localhost.create_only_config_db_buffers. Using this configuration the buffer counters are created only for the queues and PGs with buffer configured for performance optimization.
However, to have counters for CPU tx queue, we have to configure it in BUFFER_QUEUE, mainly for data traffic, which is a bad coupling.
Using this PR the counter will be created for CPU tx queue without data buffer configuration.

@prabhataravind
Copy link
Contributor

prabhataravind commented Nov 7, 2024

create_only_config_db_buffer
Hi @stephenxs, thanks for the clarification. I am assuming you are referring to #2883? If so, the issue should not be observed without this configuration, correct?

Could you please update the PR title/description to indicate that this handles queue counters for CPU TX queue for the specific case where create_only_config_db_buffers configuration is set?

Signed-off-by: Stephen Sun <stephens@nvidia.com>
@stephenxs stephenxs changed the title Create counter for the queue to which the host CPU traffic is sent Create counter for the queue to which the host CPU traffic is sent when create_only_config_db_buffers is enabled Nov 7, 2024
@stephenxs
Copy link
Collaborator Author

stephenxs commented Nov 7, 2024

create_only_config_db_buffer
Hi @stephenxs, thanks for the clarification. I am assuming you are referring to #2883? If so, the issue should not be observed without this configuration, correct?

Could you please update the PR title/description to indicate that this handles queue counters for CPU TX queue for the specific case where create_only_config_db_buffers configuration is set?

yes, I am referring to #2883 and there is no issue without the configuration.

Sure. Done.

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.

4 participants