[dpdk-dev] [RFC 2/2] ethdev: fix compiling errors for per-queue statistics

Stephen Hemminger stephen at networkplumber.org
Tue Sep 1 04:23:21 CEST 2020


On Tue, 1 Sep 2020 09:33:18 +0800
"Min Hu (Connor)" <humin29 at huawei.com> wrote:

> From: Huisong Li <lihuisong at huawei.com>
> 
> 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.
> 
> Fixes: ed30d9b691b2 ("app/testpmd: add stats per queue")
> Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD")
> Fixes: abf7275bbaa2 ("ixgbe: move to drivers/net/")
> Fixes: e6defdfddc3b ("net/igc: enable statistics")
> Fixes: 2265e4b4e84b ("net/octeontx2: add basic stats operation")
> Fixes: 6c3169a3dc04 ("virtio: move to drivers/net/")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Huisong Li <lihuisong at huawei.com>
> Reviewed-by: huwei <xavier.huwei at huawei.com>
> Reviewed-by: liudongdong <liudongdong3 at huawei.com>
> ---

This looks like a reasonable way to address this.
But it does break the API, and it wasn't announced previously.
Since it is minor and compatible change I am ok with doing it for 20.11.
Please update the release notes.


More information about the dev mailing list