From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <stable-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 9C96A45634
	for <public@inbox.dpdk.org>; Wed, 17 Jul 2024 12:14:31 +0200 (CEST)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 657E140E16;
	Wed, 17 Jul 2024 12:14:31 +0200 (CEST)
Received: from NAM10-DM6-obe.outbound.protection.outlook.com
 (mail-dm6nam10on2069.outbound.protection.outlook.com [40.107.93.69])
 by mails.dpdk.org (Postfix) with ESMTP id 052054025F;
 Wed, 17 Jul 2024 12:14:24 +0200 (CEST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
 b=OkazifAZmLtHMXKqlHO9cCRuc1W62V/xfVjWmyKX4rBXpJVm1E1bs0BwdyyGAGhlPqS7tK4j2upQEE7mNQyc32Fv2HwLeilNCfprg6LqnyvvEBWFIfe6ur559+Ol60nfQlWamMwbXHHxaqGkE1W+Y4zGYJ1OEmOg9txXY8BowxWpvq04PuqvcBDfumHdYlVVL/W0gq7RuR8/uv5KyNY7KoGa4LWfgBTdg3PLyrADxo2uLgBGRi538bxElf5SxM5lSzx9Q6B/scQqufaWRo8So8ghCyC5pXykgUEAviBaZqTcl/Z14l0H+jwLjPx7c5iqipD7kSBvFSB6F9wR/YIh0g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector10001;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
 bh=P4yE3brROI07EtV6pTbDWaBITnT/SEmQqJO729zmNw4=;
 b=KPVTvJD6W4Bs+X8oy0fSLr9Pcb49k0ffJ51ouEJlo4NQ3zDvQU/FwbclquIVkDqsH7bRYxBiSqmWcUSynnESiFgXn1sM5CX72Klcaw2gAnVUixnTnI23UuCVuJmx6REPbO+qmnPgTeIkgI1x5ltyYExdig7aeinOGgplsBLiNl4iOwpGjn5XNdvqu26j56THSTluNofz3j3xAkTQxIVwlP+0W8Gcp6cDnaf2FDFzrKtb6XQj+8BI6owiBDPqPNMDwbFP7FWYeoyD8OxRNIxMU96H9+FSBYY2P5mC0t9LqMCpdezTj9ma/jhSOiJAY7oNk8Iqdwp0mK3/6miECemsMQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass
 header.d=amd.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; 
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=P4yE3brROI07EtV6pTbDWaBITnT/SEmQqJO729zmNw4=;
 b=L0Gg6lKT/G9RCPvA9rDASZwfzDiWkisCn0WCR666XE/9Tq+kJDidbKfCe9RRDMY0Cjl4lMvFsYdLAudYUyJL63F1RdVQWkpB34wZy9NgoMoJm1RKb7rnGEgWFNY02yQ6CpYtZdNgHEHb7rZLeQ5XFaU+p/o1I+CR6/KhEZfPFEk=
Authentication-Results: dkim=none (message not signed)
 header.d=none;dmarc=none action=none header.from=amd.com;
Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11)
 by IA1PR12MB8335.namprd12.prod.outlook.com (2603:10b6:208:3fa::19)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.16; Wed, 17 Jul
 2024 10:14:21 +0000
Received: from CH2PR12MB4294.namprd12.prod.outlook.com
 ([fe80::ebfb:2f9f:f9ca:82cd]) by CH2PR12MB4294.namprd12.prod.outlook.com
 ([fe80::ebfb:2f9f:f9ca:82cd%4]) with mapi id 15.20.7762.027; Wed, 17 Jul 2024
 10:14:21 +0000
Message-ID: <23404bf1-6e6d-4234-9af3-fc62faf64c43@amd.com>
Date: Wed, 17 Jul 2024 11:14:17 +0100
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v2] net/ark: fix index arithmetic optimization bug
To: Ed Czeck <ed.czeck@atomicrules.com>, dev@dpdk.org
Cc: stable@dpdk.org, Shepard Siegel <shepard.siegel@atomicrules.com>,
 John Miller <john.miller@atomicrules.com>
References: <20240716210631.2557642-1-ed.czeck@atomicrules.com>
 <20240716213939.2561065-1-ed.czeck@atomicrules.com>
Content-Language: en-US
From: Ferruh Yigit <ferruh.yigit@amd.com>
Autocrypt: addr=ferruh.yigit@amd.com; keydata=
 xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9
 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J
 eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg
 B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9
 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ
 N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ
 vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S
 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum
 CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4+huVv3jyhzoAUOEyXA
 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s68ERI2zvrVxdJ/fBWAllIEd0uQ4P05GtAHPdTIDQYp545+TPV7oyF0LfXcsQs
 SFVZE6igdvkjfYmh+QOrHGZvpWXLTmffVf/AQ81wspzbfxJ7sYM4P8Mg5kKOsaoUdyA/2qVe
 cMh1CLUHXF1GlofpGbe1lj4KUJVse5g3qwV7i9VrseA8c4VIZewdIjkzAhmmbxl+8rM/LKBH
 dZUMTzME5PFCXJIZ83qkZQ795MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk=
In-Reply-To: <20240716213939.2561065-1-ed.czeck@atomicrules.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-ClientProxiedBy: LO4P123CA0537.GBRP123.PROD.OUTLOOK.COM
 (2603:10a6:600:2c5::17) To CH2PR12MB4294.namprd12.prod.outlook.com
 (2603:10b6:610:a9::11)
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|IA1PR12MB8335:EE_
X-MS-Office365-Filtering-Correlation-Id: c0856205-52b9-4295-e6b4-08dca64939c1
X-LD-Processed: 3dd8961f-e488-4e60-8e11-a82d994e183d,ExtAddr
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014;
X-Microsoft-Antispam-Message-Info: =?utf-8?B?ZmhIWWYrZ1NWWko4Mko2aDF6SjhaeU1EY3pzRStQa3NFZ2w0N1JkQzBVMmRR?=
 =?utf-8?B?UkdFbzY1U3RUM1dOU1VKaHJGR29wOG9ZVklwU3RPVmpLWjd6MzE5bXhMLzFM?=
 =?utf-8?B?czBpUUZWV1N6OWNLY3BqbFJhNk90SzdCVEdaVUFmZjJFako4bHllRmVYWUxC?=
 =?utf-8?B?QmJmM2N3VSs5WVZjVjdzejdVWGxlSW9kRERiTktEV0V5cEdqcmZSU3JBTzNT?=
 =?utf-8?B?THZ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utf-8?B?bkhXY05WUE1XZU5ielU3Zzd0MEp3YTJKdjlKcStOQkRNamtIaXRsaWdBS0R5?=
 =?utf-8?B?OCt2ZlpxSzA0bGZxUjhpdEd0R0U0UWd2eEp2NkJ2UWxHZEVIM29mSVdPZFBx?=
 =?utf-8?B?ZnpCaTJEUncySzJNL3NVa1hSQlFsaEZxdC9RSElkV2c2V2ltS1BuWDcxZURF?=
 =?utf-8?B?WUNHWlAzanFwSGdLSkVORHFOb1pxdDU4NzhpRmpia2NPWjRhczF2SElFZER3?=
 =?utf-8?B?VWVObzdkMlBXZ2E0dmM0RDRvU1R1T3ZnclBoTHZ1ZEVTWGFvNWowTUZJYzZQ?=
 =?utf-8?B?U1hDdGYrajlBMWM3T0k0NlRuRDNtQ0IyWm1YTHN6ZDh0c056cjdxMjhlb09p?=
 =?utf-8?B?WFphRlM3c1ZzeDVZWUNpNFJHdVRlMURweGt2UStUanYyUDVnNlByQWtlUzV6?=
 =?utf-8?Q?l5DcXFYErN9AcmVV7u2zN1VtV?=
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-Network-Message-Id: c0856205-52b9-4295-e6b4-08dca64939c1
X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jul 2024 10:14:21.3716 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: 6RmVcl9UV0DaJqMcCN6j7kndtZeVbLTez4vfdWULTbTgVbPYEjA/yO38YGuEdA5/
X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB8335
X-BeenThere: stable@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: patches for DPDK stable branches <stable.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/stable>,
 <mailto:stable-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/stable/>
List-Post: <mailto:stable@dpdk.org>
List-Help: <mailto:stable-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/stable>,
 <mailto:stable-request@dpdk.org?subject=subscribe>
Errors-To: stable-bounces@dpdk.org

On 7/16/2024 10:39 PM, Ed Czeck wrote:
> fix for compiler optimizer error using int32_t.
> (a - b) > 0 can behave differently under optimization
> at values near max and min bounds.
>

Hi Ed,

Is this compiler optimization error, or can it be related to the
undefined behavior of signed integer overflow?
Although it is undefined I guess compilers wrap value to INT_MIN.

Just to understand issue better, so that we can apply learning to other
code base, can you please share values that create unexpected result?


> This patch replaces int32_t with uint32_t except for
> necessary casts.
> 
> Fixes: 9ee9e0d3b85e ("net/ark: update to reflect FPGA updates")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
> ---
> v2:
> * update patch to apply to dpdk-next-net
> ---
>  drivers/net/ark/ark_ethdev_tx.c | 19 ++++++++++---------
>  1 file changed, 10 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/net/ark/ark_ethdev_tx.c b/drivers/net/ark/ark_ethdev_tx.c
> index 9c89c85f50..30130b08de 100644
> --- a/drivers/net/ark/ark_ethdev_tx.c
> +++ b/drivers/net/ark/ark_ethdev_tx.c
> @@ -39,8 +39,8 @@ struct __rte_cache_aligned ark_tx_queue {
>  	uint32_t queue_mask;
>  
>  	/* 3 indexes to the paired data rings. */
> -	int32_t prod_index;		/* where to put the next one */
> -	int32_t free_index;		/* mbuf has been freed */
> +	uint32_t prod_index;		/* where to put the next one */
> +	uint32_t free_index;		/* mbuf has been freed */
>  
>  	/* The queue Id is used to identify the HW Q */
>  	uint16_t phys_qid;
> @@ -49,7 +49,7 @@ struct __rte_cache_aligned ark_tx_queue {
>  
>  	/* next cache line - fields written by device */
>  	alignas(RTE_CACHE_LINE_MIN_SIZE) RTE_MARKER cacheline1;
> -	volatile int32_t cons_index;		/* hw is done, can be freed */
> +	volatile uint32_t cons_index;		/* hw is done, can be freed */
>  };
>  
>  /* Forward declarations */
> @@ -108,7 +108,7 @@ eth_ark_xmit_pkts(void *vtxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
>  	uint32_t user_meta[5];
>  
>  	int stat;
> -	int32_t prod_index_limit;
> +	uint32_t prod_index_limit;
>  	uint16_t nb;
>  	uint8_t user_len = 0;
>  	const uint32_t min_pkt_len = ARK_MIN_TX_PKTLEN;
> @@ -124,7 +124,7 @@ eth_ark_xmit_pkts(void *vtxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
>  	prod_index_limit = queue->queue_size + queue->free_index - 4;
>  
>  	for (nb = 0;
> -	     (nb < nb_pkts) && (prod_index_limit - queue->prod_index) > 0;
> +	     (nb < nb_pkts) && (int32_t)(prod_index_limit - queue->prod_index) > 0;
>

I don't know possible ranges of the values, but in above case if the
result of "prod_index_limit - queue->prod_index", is bigger than INT_MAX
but smaller than UINT_MAX, although value is positive casting it to
'int' will make is negative and "> 0" check will be unexpected.


>  	     ++nb) {
>  		mbuf = tx_pkts[nb];
>  
> @@ -194,13 +194,13 @@ eth_ark_tx_jumbo(struct ark_tx_queue *queue, struct rte_mbuf *mbuf,
>  		 uint32_t *user_meta, uint8_t meta_cnt)
>  {
>  	struct rte_mbuf *next;
> -	int32_t free_queue_space;
> +	uint32_t free_queue_space;
>  	uint8_t flags = ARK_DDM_SOP;
>  
>  	free_queue_space = queue->queue_mask -
>  		(queue->prod_index - queue->free_index);
>  	/* We need up to 4 mbufs for first header and 2 for subsequent ones */
> -	if (unlikely(free_queue_space < (2 + (2 * mbuf->nb_segs))))
> +	if (unlikely(free_queue_space < (2U + (2U * mbuf->nb_segs))))
>  		return -1;
>  
>  	while (mbuf != NULL) {
> @@ -392,10 +392,11 @@ free_completed_tx(struct ark_tx_queue *queue)
>  {
>  	struct rte_mbuf *mbuf;
>  	union ark_tx_meta *meta;
> -	int32_t top_index;
> +	uint32_t top_index;
>  
>  	top_index = queue->cons_index;	/* read once */
> -	while ((top_index - queue->free_index) > 0) {
> +
> +	while ((int32_t)(top_index - queue->free_index) > 0) {
>  		meta = &queue->meta_q[queue->free_index & queue->queue_mask];
>  		if (likely((meta->flags & ARK_DDM_SOP) != 0)) {
>  			mbuf = queue->bufs[queue->free_index &