From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D8DD942AA2; Tue, 9 May 2023 10:15:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9523E410FA; Tue, 9 May 2023 10:15:06 +0200 (CEST) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id 66EDF410D7 for ; Tue, 9 May 2023 10:15:05 +0200 (CEST) Received: from kwepemi500020.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4QFrSJ5hg3zTkR8; Tue, 9 May 2023 16:10:24 +0800 (CST) Received: from [10.67.103.42] (10.67.103.42) by kwepemi500020.china.huawei.com (7.221.188.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 9 May 2023 16:15:00 +0800 Message-ID: Date: Tue, 9 May 2023 16:15:00 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v5 1/3] ring: fix unmatched type definition and usage To: Ruifeng Wang , Honnappa Nagarahalli , Konstantin Ananyev , Olivier Matz , Dharmik Jayesh Thakkar CC: "dev@dpdk.org" , "liudongdong3@huawei.com" , nd References: <20230210024835.33804-1-haijie1@huawei.com> <20230509012907.3817-1-haijie1@huawei.com> <20230509012907.3817-2-haijie1@huawei.com> From: Jie Hai In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.103.42] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemi500020.china.huawei.com (7.221.188.8) X-CFilter-Loop: Reflected X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 2023/5/9 14:23, Ruifeng Wang wrote: >> -----Original Message----- >> From: Jie Hai >> Sent: Tuesday, May 9, 2023 9:29 AM >> To: Honnappa Nagarahalli ; Konstantin Ananyev >> ; Ruifeng Wang ; Gavin Hu >> ; Olivier Matz ; Dharmik Jayesh Thakkar >> >> Cc: dev@dpdk.org; liudongdong3@huawei.com >> Subject: [PATCH v5 1/3] ring: fix unmatched type definition and usage >> >> Field 'flags' of struct rte_ring is defined as int type. However, it is used as unsigned >> int. To ensure consistency, change the type of flags to unsigned int. Since these two >> types has the same byte size, this change is not an ABI change. >> >> Fixes: cc4b218790f6 ("ring: support configurable element size") > > The change looks good. > However, I think the fix line is not accurate. > I suppose it fixes af75078fece3 ("first public release"). > Thanks for your review. Sorry for quoting the wrong commit. This issue was indeed introduced by commit af75078fece3 ("first public release"). I will fix this in the next version. >> >> Signed-off-by: Jie Hai >> Acked-by: Konstantin Ananyev >> Acked-by: Chengwen Feng >> --- >> lib/ring/rte_ring_core.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/lib/ring/rte_ring_core.h b/lib/ring/rte_ring_core.h index >> 82b237091b71..1c809abeb531 100644 >> --- a/lib/ring/rte_ring_core.h >> +++ b/lib/ring/rte_ring_core.h >> @@ -120,7 +120,7 @@ struct rte_ring_hts_headtail { struct rte_ring { >> char name[RTE_RING_NAMESIZE] __rte_cache_aligned; >> /**< Name of the ring. */ >> - int flags; /**< Flags supplied at creation. */ >> + uint32_t flags; /**< Flags supplied at creation. */ >> const struct rte_memzone *memzone; >> /**< Memzone, if any, containing the rte_ring */ >> uint32_t size; /**< Size of ring. */ >> -- >> 2.33.0 > > .