sonic-swss icon indicating copy to clipboard operation
sonic-swss copied to clipboard

Create counter for the queue to which the host CPU traffic is sent

Open stephenxs opened this issue 1 year ago • 0 comments

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 avatar Oct 20 '24 14:10 stephenxs