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 7982E4567F; Mon, 22 Jul 2024 12:56:44 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5DD7540DF8; Mon, 22 Jul 2024 12:56:44 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2047.outbound.protection.outlook.com [40.107.244.47]) by mails.dpdk.org (Postfix) with ESMTP id A876A4027F; Mon, 22 Jul 2024 12:52:48 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WxYBLRVT9H+5JajNqAU/7qdDJme+iZ5hLuYWVHIono9OALhNNZOAGUqAUedIP9UH2hPz+NAvpKmixA2WLOkNA22Fu0t6t5/HxjyM+hKtTsdQawtacnpqJqX6KfwWuBq8hC+hg87UfhfGmSCh3Uql/VMiDeBLBgNtcOw0UUniYejWiqTKTgtRTeNk9t/RkKy83EP2N340Zm5R47y8xWdPgj/WGGuzhYjVyeZCcCpIFS28EW5qI7uwzHFLEtROKD+2SQuAYrDIWQ/HWjPx4uJYdUq4lw88AH5l6rzWXAH5oZQAxd9EpNHujv19DKqggiz+x8ucp8aUsGupxACZQyrEWw== 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=VXhMchlV9Eg5nIIH4m6iKK2e3GBLVHjWdmnja2XR8QE=; b=Oh6RIz2EPzzFGYIRp/XaLyGR4tqtcWioqRMfKIb+zk6UE17WmmpRGG47i48J5rMZiOsjrk7IUYsn88ptIDTl1BEKZmtzAy5AzbNLd1rV47gKEOp5xshYhfrphKT97mEeYnrUGBbFH02PJgkG/XNNMUsViEqR1jJK2IcKQ7qjbRLaZCMpGZxVV/FB4h3ZtikHC+DCFgexm23R5+18YDhAJ48xtwMSHqB531coqqFX/xwixgVCCK+BB26Bkt2k9J3sJtAyLxpSjejBeL6t+Ap+vZmektPwwEZznFLskW/amFo5LYQkgb5mUlmCyqfkX1J1jnZSvgCdduK675GmvtfE6Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=intel.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) 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=VXhMchlV9Eg5nIIH4m6iKK2e3GBLVHjWdmnja2XR8QE=; b=17HQ8iqPgkeyhKJLcgVuID4eS31pigj0/jgptMfh/2oNgWW/BszEUFsSAOWFvV/c+j8lQHPeHnCsq83nJFvvaYZFGF8SptlOx2a3aKU9DkfR4Z2mGu3ndmsCaFUuhh/6Cm2bRPTJAnhMxRV9uLha8f802leSN4i6ee53R/ra0CA= Received: from PH7P220CA0023.NAMP220.PROD.OUTLOOK.COM (2603:10b6:510:326::10) by IA1PR12MB6483.namprd12.prod.outlook.com (2603:10b6:208:3a8::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.17; Mon, 22 Jul 2024 10:52:45 +0000 Received: from SA2PEPF000015C7.namprd03.prod.outlook.com (2603:10b6:510:326:cafe::9b) by PH7P220CA0023.outlook.office365.com (2603:10b6:510:326::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.20 via Frontend Transport; Mon, 22 Jul 2024 10:52:45 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SA2PEPF000015C7.mail.protection.outlook.com (10.167.241.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7784.11 via Frontend Transport; Mon, 22 Jul 2024 10:52:44 +0000 Received: from dpdk-rc.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 22 Jul 2024 05:52:43 -0500 From: Ferruh Yigit To: Aman Singh , Sivaprasad Tummala CC: , , Raslan Darawsheh Subject: [PATCH] app/testpmd: fix build on signed comparison Date: Mon, 22 Jul 2024 03:52:29 -0700 Message-ID: <20240722105229.2628825-1-ferruh.yigit@amd.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF000015C7:EE_|IA1PR12MB6483:EE_ X-MS-Office365-Filtering-Correlation-Id: 3b1177b6-3629-487a-9634-08dcaa3c6b04 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|82310400026|376014|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?tDfeDfQCDys37oGKaj6NEJ5I5Jq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OMgagDkesympT503qqAG6erlBxtH9oUml5g7eGMceZn1y2RZBAy?= =?us-ascii?Q?6IODXu7lIY+PMfREPbzVvXdkJGiUU+8d8wcTh7xmvjZbeIsHPrk9phuZQDPK?= =?us-ascii?Q?9VnG/ZsXkuQR2E3Ki/ACrp5kddUAHug5BnJzfC8ZJsYO2jpTKI3+uqsXSF2h?= =?us-ascii?Q?v93pIQ9SegSzCAtSAwEdBcSeV17BUbpmC3XtbuVTESQmiasVxSZgQYCBGoUj?= =?us-ascii?Q?iOLGKfDZ4IE1QXVXb4tPS6+Lyd4m1FZ+1RYn2UYtTNNh5b+gQGWDBdKTPFO5?= =?us-ascii?Q?j6LSH8zVZ1OU8J8nD2P+yeBTshtttsKEs9QZdQx3s+/8wf+bAmCdDcfKzM+d?= =?us-ascii?Q?ke38EKGAoyAfSj2zCUKtDIRzxTTvHYmNS+nyqHTxTjdICD39g21P55vAsObI?= =?us-ascii?Q?hdqbC9LN2YwQtOy4K4OY7ot9USgoTqUBbHnOhj9Vab6/exKNcTrTmIlNr3SU?= =?us-ascii?Q?ZAjvV3MtcVthQ8CRDCgWRGfJh5GSd1V57HeLaZ1c3EOdeyQhYe8PV33O3+mZ?= =?us-ascii?Q?8wucRLYVhHGKuVTjd10MIW9CMoo3zZXT?= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(1800799024)(82310400026)(376014)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jul 2024 10:52:44.9052 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3b1177b6-3629-487a-9634-08dcaa3c6b04 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SA2PEPF000015C7.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6483 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 Build error: .../app/test-pmd/config.c: In function 'icmp_echo_config_setup': .../app/test-pmd/config.c:5159:30: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] if ((nb_txq * nb_fwd_ports) < nb_fwd_lcores) ^ All 'nb_txq', 'nb_fwd_ports' & 'nb_fwd_lcores' are unsigned variables, but the warning is related to the integer promotion rules of C: 'nb_txq' -> uint16_t, promoted to 'int' 'nb_fwd_ports' -> uint16_t, promoted to 'int' (nb_txq * nb_fwd_ports) -> result 'int' nb_fwd_lcores -> 'uint32_t' Ends up comparing 'int' vs 'uint32_t'. Fixing by adding the casting back which was initially part of the patch. Fixes: 2bf44dd14fa5 ("app/testpmd: fix lcore ID restriction") Cc: stable@dpdk.org Reported-by: Raslan Darawsheh Signed-off-by: Ferruh Yigit --- Cc: sivaprasad.tummala@amd.com --- app/test-pmd/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 66c3a68c1dc6..6f0beafa271c 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -5156,7 +5156,7 @@ icmp_echo_config_setup(void) lcoreid_t lc_id; uint16_t sm_id; - if ((nb_txq * nb_fwd_ports) < nb_fwd_lcores) + if ((lcoreid_t)(nb_txq * nb_fwd_ports) < nb_fwd_lcores) cur_fwd_config.nb_fwd_lcores = (lcoreid_t) (nb_txq * nb_fwd_ports); else -- 2.43.0