From patchwork Sun Sep 27 03:16:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "humin (Q)" X-Patchwork-Id: 78888 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4A51AA04BC; Sun, 27 Sep 2020 05:19:50 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2387F1D980; Sun, 27 Sep 2020 05:19:16 +0200 (CEST) Received: from huawei.com (szxga05-in.huawei.com [45.249.212.191]) by dpdk.org (Postfix) with ESMTP id EC02C1D92E for ; Sun, 27 Sep 2020 05:19:10 +0200 (CEST) Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 92480EAAA49F007F9DCE; Sun, 27 Sep 2020 11:19:08 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.487.0; Sun, 27 Sep 2020 11:19:06 +0800 From: "Min Hu (Connor)" To: CC: , , , Date: Sun, 27 Sep 2020 11:16:36 +0800 Message-ID: <1601176596-29900-3-git-send-email-humin29@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1601176596-29900-1-git-send-email-humin29@huawei.com> References: <1598845317-55956-1-git-send-email-humin29@huawei.com> <1601176596-29900-1-git-send-email-humin29@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH V5 2/2] ethdev: change data type in TC rxq and TC txq 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" From: Huisong Li Currently, base and nb_queue in the tc_rxq and tc_txq information of queue and TC mapping on both TX and RX paths are uint8_t. However, these data will be truncated when queue number under a TC is greater than 256. So it is necessary for base and nb_queue to change from uint8_t to uint16_t. Fixes: 01eb53eefeb40e8 ("ethdev: rename folder to library name") Signed-off-by: Huisong Li Signed-off-by: Min Hu (Connor) Reviewed-by: Wei Hu (Xavier) Reviewed-by: Dongdong Liu Acked-by: Thomas Monjalon Reviewed-by: Ferruh Yigit --- V4 -> V5: add release notes updated. --- doc/guides/rel_notes/release_20_11.rst | 5 +++++ lib/librte_ethdev/rte_ethdev.h | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst index 1ef6f0e..ad14fd7 100644 --- a/doc/guides/rel_notes/release_20_11.rst +++ b/doc/guides/rel_notes/release_20_11.rst @@ -183,6 +183,11 @@ API Changes function will be changed from ``uint8_t`` to ``uint16_t``, which supports for using 256 or more than 256 queues and displaying all statistics of rx/tx queue. +* ethdev: Modified field type of base and nb_queue in struct + ``rte_eth_dcb_tc_queue_mapping`` from ``uint8_t`` to ``uint16_t``. + As the data of uint8_t will be truncated when queue number under + a TC is greater than 256. + ABI Changes ----------- diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h index ff3a616..2270460 100644 --- a/lib/librte_ethdev/rte_ethdev.h +++ b/lib/librte_ethdev/rte_ethdev.h @@ -1522,13 +1522,13 @@ struct rte_eth_xstat_name { struct rte_eth_dcb_tc_queue_mapping { /** rx queues assigned to tc per Pool */ struct { - uint8_t base; - uint8_t nb_queue; + uint16_t base; + uint16_t nb_queue; } tc_rxq[ETH_MAX_VMDQ_POOL][ETH_DCB_NUM_TCS]; /** rx queues assigned to tc per Pool */ struct { - uint8_t base; - uint8_t nb_queue; + uint16_t base; + uint16_t nb_queue; } tc_txq[ETH_MAX_VMDQ_POOL][ETH_DCB_NUM_TCS]; };