From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0F46EA04B4; Sat, 8 Aug 2020 03:11:09 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E4A6C2BF5; Sat, 8 Aug 2020 03:11:08 +0200 (CEST) Received: from huawei.com (szxga06-in.huawei.com [45.249.212.32]) by dpdk.org (Postfix) with ESMTP id 1D0682BF1 for ; Sat, 8 Aug 2020 03:11:07 +0200 (CEST) Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 05522E057005BA1237FB; Sat, 8 Aug 2020 09:11:06 +0800 (CST) Received: from [127.0.0.1] (10.67.103.128) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.487.0; Sat, 8 Aug 2020 09:10:55 +0800 To: , , , , , "Zhouchang (Forest)" , "liudongdong (C)" , lihuisong From: "humin (Q)" Message-ID: <6e438154-112a-0c21-48a5-9abb3e6d9ed3@huawei.com> Date: Sat, 8 Aug 2020 09:10:55 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.103.128] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [RFC]lib/ethdev: fix rx/tx queue stats mapping API X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Currently, only statistics of rx/tx queues with queue_id less than RTE_ETHDEV_QUEUE_STAT_CNTRS can be displayed. If there is a certain application scenario that it needs to use 256 or more than 256 queues and display all statistics of rx/tx queue. At this moment, we have to change the macro to be equaled to the queue number. However, modifying the macro to be greater than 256 will trigger many errors and warnings from test-pmd, PMD driver and librte_ethdev during compiling dpdk project. But it is possible and permited that rx/tx queue number is greater than 256 and all statistics of rx/tx queue need to be displayed. In addition, the data type of rx/tx queue number in rte_eth_dev_configure API is 'uint16_t'. So It is unreasonable to use the 'uint8_t' type for variables that control which per-queue statistics can be displayed. In these modifications, related API in /lib/librte_ethdev/rte_ethdev.c is as follows: static int -set_queue_stats_mapping(uint16_t port_id, uint16_t queue_id, uint8_t stat_idx, +set_queue_stats_mapping(uint16_t port_id, uint16_t queue_id, uint16_t stat_idx, uint8_t is_rx) int rte_eth_dev_set_tx_queue_stats_mapping(uint16_t port_id, uint16_t tx_queue_id, - uint8_t stat_idx) + uint16_t stat_idx) int rte_eth_dev_set_rx_queue_stats_mapping(uint16_t port_id, uint16_t rx_queue_id, - uint8_t stat_idx) + uint16_t stat_idx)