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 C5B1EA0521 for ; Tue, 3 Nov 2020 10:21:08 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BC91BC822; Tue, 3 Nov 2020 10:21:07 +0100 (CET) Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by dpdk.org (Postfix) with ESMTP id 49C4FC822 for ; Tue, 3 Nov 2020 10:21:06 +0100 (CET) Received: by mail-wm1-f68.google.com with SMTP id d142so3337559wmd.4 for ; Tue, 03 Nov 2020 01:21:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-transfer-encoding:user-agent:mime-version; bh=mzxH1wMTPiZxv03XFMizAlNSkz51IG7Qmc4yFtHwngc=; b=CBXDyrRmDtpKhaclexKZpvLhmC6IAagngoSn/lRKtAgCJyI22MjVuBUVEczkVV+15p qlSoZvMliGOuBimFi8c2GTqqiYswhG+/Tv3F6saumhsGkmAjGP4RybsnTYLCfEFIAJdp ywcsipLiG8zrpTyil9aUFAPdcXyULMKRojUXXxiL9H+7t3d4WujKtVVW051AbdTRXcz2 PwtxsFCzmahjU6AOeC2/jghKHX3YNzzF3q5IjSm4Q2VQvElkN6vEy5mws9Qfin0XTFZc xZNVqHjgrg22nHXiN6bNK+rJ9tsNQgIP+mNQ51kUtQsk4ruQKVy+VTnnofvz6qixdXNq CuOQ== X-Gm-Message-State: AOAM531pIr+UZPTGrIvs2hGPY7jOeSKWpkDpIZaRZPTpSgU1P/E7L68u DLMP8lR9FzYKnQcCOwGGfHyADe3pcRwL7GHN X-Google-Smtp-Source: ABdhPJyNbKTH4ukfaqoTQ6vEudj3VCnkqadrDzec1wnKCowWN2cbZGTZgiXtYvXqwm2NBUNy3/vTgg== X-Received: by 2002:a1c:e087:: with SMTP id x129mr2475158wmg.2.1604395264999; Tue, 03 Nov 2020 01:21:04 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id o7sm25489061wrp.23.2020.11.03.01.21.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2020 01:21:04 -0800 (PST) Message-ID: From: Luca Boccassi To: Lijun Ou , stable@dpdk.org Cc: linuxarm@huawei.com Date: Tue, 03 Nov 2020 09:21:03 +0000 In-Reply-To: <1604394260-9644-1-git-send-email-oulijun@huawei.com> References: <1604394260-9644-1-git-send-email-oulijun@huawei.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 Subject: Re: [dpdk-stable] [PATCH 19.11.6] ethdev: fix data type in TC queues X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On Tue, 2020-11-03 at 17:04 +0800, Lijun Ou wrote: > From: Huisong Li >=20 > [ upstream commit 9f6dc8592d54aa2ec1800c53977a31bd7922147b ] >=20 > 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. >=20 > Fixes: 89d6728c7837 ("ethdev: get DCB information") > Cc: stable@dpdk.org >=20 > 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 > --- > doc/guides/rel_notes/release_19_11.rst | 5 +++++ > lib/librte_ethdev/rte_ethdev.h | 8 ++++---- > 2 files changed, 9 insertions(+), 4 deletions(-) >=20 > diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_note= s/release_19_11.rst > index acd18a3..cba8ebd 100644 > --- a/doc/guides/rel_notes/release_19_11.rst > +++ b/doc/guides/rel_notes/release_19_11.rst > @@ -457,6 +457,11 @@ API Changes > * ethdev: changed ``rte_eth_dev_owner_delete`` return value from ``void`= ` to > ``int`` to provide a way to report various error conditions. > =20 > +* 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. > + > * ethdev: The deprecated function ``rte_eth_dev_count`` was removed. > The function ``rte_eth_dev_count_avail`` is a drop-in replacement. > If the intent is to iterate over ports, ``RTE_ETH_FOREACH_*`` macros > diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethde= v.h > index 51f9f25..5fedff0 100644 > --- a/lib/librte_ethdev/rte_ethdev.h > +++ b/lib/librte_ethdev/rte_ethdev.h > @@ -1360,13 +1360,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]; > }; Hi, Thanks for the patch, but isn't this an ABI breakage? This is a public header right? --=20 Kind regards, Luca Boccassi