net/hns3: get Rx/Tx queue fbd in xstats
authorChengwen Feng <fengchengwen@huawei.com>
Tue, 21 Apr 2020 03:32:15 +0000 (11:32 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Apr 2020 17:16:41 +0000 (19:16 +0200)
commit4016d76b7c54db9b292e5a90db53029980e91f74
treee0acd9d3b3fff4e6916156842f89468c03460f38
parentbd5b86732bc7cbecd7dd2a92abb30834bcbe1dc6
net/hns3: get Rx/Tx queue fbd in xstats

This patch adds getting Rx/Tx queue fbd information in extended device
statistics. The upper level application can get them by calling the
rte_eth_xstats_get API function.

The fbd registers of every Rx/Tx queue are very useful to identify the
Rx/Tx bottleneck.
1. The Rx queue fbd register is the number of the unprocessed buffer
   descriptors which are waiting for driver to process;
2. The Tx queue fbd register is the number of the unprocessed buffer
   descriptors which are waiting for network engine hardware to process.

As a result, we get the following output information in testpmd
application by using the command "show port xstats" as below:
rx_q0RX_QUEUE_FBD: 19
rx_q1RX_QUEUE_FBD: 18
tx_q0TX_QUEUE_FBD: 0
tx_q1TX_QUEUE_FBD: 0

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Huisong Li <lihuisong@huawei.com>
drivers/net/hns3/hns3_stats.c
drivers/net/hns3/hns3_stats.h