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 7F88A45D0F for ; Fri, 15 Nov 2024 10:09:38 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6510340278; Fri, 15 Nov 2024 10:09:38 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by mails.dpdk.org (Postfix) with ESMTP id 5A6DF40278; Fri, 15 Nov 2024 10:09:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1731661777; x=1763197777; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=zzUQTQsb/sFcF8cwRDeKz+J2eh9LHbukjwi8IlSYeMk=; b=G6aoQF2RADv1XgXDkJg3CAhBAbOrNypwHybZeRa0tATwIhMlZf/v807s kDBiAOt/P+iIAqAfHkivf6CW66iZzJc03fEnCOEAN9RLbNXWsMd7KK/vd agj/MpptLDOpTfpIONKQHRjdUEkzLAI7lwIVsoFStcEBcIIPd/kKFacEO 13EM+am9ByoHUFmSucFf+D/cnpKY9UA7g5vgDY92mx8fbIqUvi9hx8NV2 ngnzVH9HRTgrLvv24TLFo4+BodQDKuzSwaC4qM817Ik5smw33mRVBfUIT lxgw04LVFRI51DqHZyfyS3Qn4Ay+IpxGWNC/P4Md6TTTqqi6L93WNjQAf w==; X-CSE-ConnectionGUID: WaUwUttYSeSAiN8rs+EZVw== X-CSE-MsgGUID: NXZaFM4jQFu5Y1ZNIKrhiQ== X-IronPort-AV: E=McAfee;i="6700,10204,11256"; a="31504369" X-IronPort-AV: E=Sophos;i="6.12,156,1728975600"; d="scan'208";a="31504369" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Nov 2024 01:09:33 -0800 X-CSE-ConnectionGUID: tN8xDdNjQ5eGRQBCM+c6Ww== X-CSE-MsgGUID: ZBxlTeU1QW+gO5QesGiPuA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,156,1728975600"; d="scan'208";a="88912510" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmviesa009.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 15 Nov 2024 01:09:32 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 15 Nov 2024 01:09:31 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Fri, 15 Nov 2024 01:09:31 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.43) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Fri, 15 Nov 2024 01:09:31 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Uqb/vftlIGG35q6qd63r623+V09RcfYOobz1tAd3Rf8kg0AVxnzNaOHMpe5POhVWI9rBIePSWZ+tuU8xLnusBYqhZa8w3wbYoPd+TOkF/UaqX4/zMESU9yhKmfq5AJYUsN0Zabr7tsV/tBBSguaL9liM++2fXxgD/MO6+ayJoNib+AsjDs8o+cPUr08ihoYBYBggsfe6kAtKA/vTPPnExvmsI/FG/RSqDk7DU/y7JRXgs87+DPX2gPyxSZHY3vQKI+dUs6F4pIIWoFs2gT98zljMavsNN0txkM/BYsQa0E+uhDqgziL/B14giEXDaWn4Gzp8RVnAo49Fu8wOn7jSOg== 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=SmYhEg2F/8FAFk7hBMbnwqs1uqmHqu/us02tep2VljY=; b=EjstzTAvASZuPOl+/fKhyrFVFksDN+rI5kRebLZh8OlFA6pgtslo9cW7dJ/dWEFXXJBrrVClNS9gJppmLwkZVJv0zFHZaZgyFtfGUCO0h88iv75tjjchdUzOsSHUFo3/gPKd2MA19UR64Yw9KdsINyF3AwJqJFPIQmg73Rqm12ZJw6sv3MT2q1bocuwvQ4algti9JNcs9wENRE39mbhyAWQzOVSxb9EipAAN4rzrH5cD8P44X4bul70ylWXNFap/ew37H6MOjRIa0i4WmzbVZfGTXY3ktPJj8xADcmUQmrO55tkHZXQ7oN2ybOFGP3wSCigDwHnmYW+uxlQ/bAkMRQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by SA2PR11MB5180.namprd11.prod.outlook.com (2603:10b6:806:fb::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.19; Fri, 15 Nov 2024 09:09:30 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b%4]) with mapi id 15.20.8093.018; Fri, 15 Nov 2024 09:09:30 +0000 Date: Fri, 15 Nov 2024 09:09:24 +0000 From: Bruce Richardson To: Stephen Hemminger CC: , , , Ori Kam , Aman Singh Subject: Re: [PATCH v2 09/10] app/test-pmd: avoid potential outside of array reference Message-ID: References: <20241114001403.147609-1-stephen@networkplumber.org> <20241114192603.41145-1-stephen@networkplumber.org> <20241114192603.41145-10-stephen@networkplumber.org> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20241114192603.41145-10-stephen@networkplumber.org> X-ClientProxiedBy: BEXP281CA0005.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10::15) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|SA2PR11MB5180:EE_ X-MS-Office365-Filtering-Correlation-Id: 53d222df-f11d-4789-a629-08dd05553664 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?qpqjp2rMiEM4V/zWLhhmM09frahft+v3PUFt43o+Y7tl3Oodlud46YviLz0o?= =?us-ascii?Q?cueR+a1UU7//TMVT4eiy0AL5OaXSPwWwW+SyEn2OxYB3q0mWB3XUchfv77TZ?= =?us-ascii?Q?WysH77KF846xUO0XAivrWSSa8kE1d+N/loz8DgHf4XL3uY7nLiLUDaHpwiGY?= =?us-ascii?Q?CA2SbajgQO09ScOjdUFduFmB7T8uv03OIS/Z2BOxa/Pc87y/phuHUoOW6fIM?= =?us-ascii?Q?Rka/lW2Dx8ATh06gMFL8ufORFCqymCcFLSb4/Tj6upmRu0x6jAsrfWmhJnkU?= =?us-ascii?Q?fe/m0gHj69Uxo1CASNO9hLJOcb1RormMIvTt7iLziTBT0ch34HFtRJjzTuyq?= =?us-ascii?Q?oASI0hnoMgUKtv28hwEXo+GGhbaUYfmkJZaVFwU29VCY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rIhWuW1oeCv?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(376014)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?03wDFGQe5MRcL/7mvmmJ9n3FqJg5R4eRBpwEqhpcOpGu2r87S6kJQZ4crkfZ?= =?us-ascii?Q?BWNeVsuxFXgoV/pVHxTNANo6ah2o78gm7gHJyV+oIYcgwcoHe0DkIy2gWCMB?= =?us-ascii?Q?LwAxSck+pS5lkaN73DE9scMhyyEz7D7xyWKB3L4ptdi+hdv6dcpd4BkLsVag?= =?us-ascii?Q?CLQnfDjAxeopSY5mQ2Muiym9FWXopEF/WbDPPKyA45OgO8C2bV5qrIqTcFn7?= =?us-ascii?Q?wrsoUC5bvdAoQo9u/Xf6FRrvonXJupBi5eB1q35L/6IXTPgbHTAfoulNTFDf?= =?us-ascii?Q?9uIrqNTrGVlwo0Et5gJgLfrCOvdQpoVGqElUe3TBshLNNyddg/j0Qq1w3vQM?= =?us-ascii?Q?I+TTyZ20zC+wZwen6rHeLuUDkQ/he2u7auJoT/0IqZAZK47ZIq+0X4AdqB6W?= =?us-ascii?Q?aY4w5qRxPG7BEzmuD/bkQTAm7NGW6mvjN1RgI/FitrxcDnc6YykpCGa4Qp+I?= =?us-ascii?Q?AFuiH1p3uKD44yCHjYVx3Ks6VfZU5T9sVTGYkTnR/9ALLw5/++SiXXsaMNAg?= =?us-ascii?Q?gDzMtch87MUNb2z4p/5IkYqVYunJfQfQLDEnF8JtecZQIpY0BRbOgCE01zYM?= =?us-ascii?Q?QAEH9ocpgzlOCQzrTlWRkUMaamfaBDtuzsbqxy+ROrxc0IytXIGuLqSU4+7b?= =?us-ascii?Q?8EWo9MGdN3SQWzah7LYILLk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=?us-ascii?Q?JD85AaFL6UomwpKSFek2PxH3nzPeTF9ItsqMQHvK+YHCYpoo8BD4mAzSOB56?= =?us-ascii?Q?8g=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 53d222df-f11d-4789-a629-08dd05553664 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Nov 2024 09:09:30.0333 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: j32Gkm2nU7pIQKXMmhKWe751CRwGhgaxvhNYK/siIgjEsAhdfqryojPfAyLOOrRkps5NLWYpvM2lm8nlDix9LzGjCXpiJHN6eQirMjMexS0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB5180 X-OriginatorOrg: intel.com X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 On Thu, Nov 14, 2024 at 11:25:07AM -0800, Stephen Hemminger wrote: > The order of comparison is wrong, and potentially allows > referencing past the array. > > Link: https://pvs-studio.com/en/blog/posts/cpp/1179/ > > Fixes: 3e3edab530a1 ("ethdev: add flow quota") > Cc: getelson@nvidia.com > Cc: stable@dpdk.org > > Signed-off-by: Stephen Hemminger Acked-by: Bruce Richardson