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 5186C42DD8; Wed, 5 Jul 2023 15:08:46 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8279C42BAC; Wed, 5 Jul 2023 15:08:45 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id DB61D4021F; Wed, 5 Jul 2023 15:08:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688562524; x=1720098524; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version; bh=Vmf1EhUr6RjCFoZ5P35hxHqqboHFKCGGNlgTYtYec+c=; b=VWg2q/6He7YJkPwH1mEPQURZ8Rda2F4GMeaDnO7VLRo/7HFvP5RqdwKZ dTEpz3P4ZekSjU8k2L37sH5D6bJIGshLVnVeGTeW+pk+IkaWL3WLmvY0s ljuE4dtQe9FlQ+7jJucZSWiJPJekSAqLCMgXZ2oHm7H/BBs1HzNDYqSQx Wh7ELnoVsIxK6iAXsymWQ6tUy87eYxqag9xkK9nVnRm9jjSWS7jgpzO6E nCc0UrPH9rjJzNQX9lgrGT5gZUwqMAdvXDGymF1LrStPsDnb2Yz6D6Ltn U3yJ7Q78g1XeuSTWVlqPq87OJ2mK+f0ELbx3G/NDLLZkjr7jyTXgcWJg0 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10762"; a="427018999" X-IronPort-AV: E=Sophos;i="6.01,183,1684825200"; d="scan'208,217";a="427018999" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jul 2023 06:08:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10762"; a="722393297" X-IronPort-AV: E=Sophos;i="6.01,183,1684825200"; d="scan'208,217";a="722393297" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga007.fm.intel.com with ESMTP; 05 Jul 2023 06:08:42 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 5 Jul 2023 06:08:41 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27 via Frontend Transport; Wed, 5 Jul 2023 06:08:41 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.104) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.27; Wed, 5 Jul 2023 06:08:41 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gheJvuMo88yF2Z00r1QbGFBfEaGmHRjABMu3pogNCmgowVpVSTrzvO7jBGG2uBY+mQb9nR8no67npASRCms1XASWOodzbeILY4fnqEmC6qmQoQ+IXmAFMBNpBjahyfhVD1q6WUpx89xRMIRMdWNSSADKON72xWS/4+dbp0OxaL/YkxzXOYB6Y9hLv7/Xf8brCZeA5MKaGsTG22g1esmP/9HsVKu5JnqHLSVbJlW9TQWdjz+1gJrsNdUOVLNG9kqUodr+ZEehbenHoqQZBtkwTjFOYsEORveDFiVhFwvjeu81K98gohL8NFp+fsbrlg0mJDd6hFamiOl8v2CuuhSV/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=MWDU5Z8ysSAe7i1ICeq9kOmRjNmqNgErfrwzLRYt9nE=; b=jV9dj9IL1H1QHQTnaumRZa7+c2GJBBViLgNDZGDQdDvpqIGpUUEws0QQe2XFWqObfi7WU9/QYmgKLSIF3Xl9dIXjFg0br4luNj5HfNG6hdP7HgY7Viof/z+DSMCWuS7fRQmiGyHmqIziXH1s/SmUbbD8h3q8XaJd7pNd4tJ+dN2/6PwoYJO9Fx6YTZ1NFkBXF/RVjD6EA6N8tzxjdcJWPHArdoMpt7kWeZDu9ldBuW+AklZQaxsSSvAJt8tAzYfVsHyLlVkNGGYk37kZAg2ICS2FThzK/M68ZKbNdPcUNRszq0kei30ytp7imekjNYecFPatPw2Ev/FaH8CmE8AoYA== 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 Received: from SN6PR11MB3408.namprd11.prod.outlook.com (2603:10b6:805:bc::22) by SJ2PR11MB7597.namprd11.prod.outlook.com (2603:10b6:a03:4c6::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Wed, 5 Jul 2023 13:08:39 +0000 Received: from SN6PR11MB3408.namprd11.prod.outlook.com ([fe80::121a:92cb:2f78:e53d]) by SN6PR11MB3408.namprd11.prod.outlook.com ([fe80::121a:92cb:2f78:e53d%5]) with mapi id 15.20.6544.024; Wed, 5 Jul 2023 13:08:39 +0000 From: "Ji, Kai" To: "Power, Ciara" , "dev@dpdk.org" CC: "gakhil@marvell.com" , "Matz, Olivier" , "stable@dpdk.org" Subject: Re: [PATCH] app/crypto-perf: fix socket ID default value Thread-Topic: [PATCH] app/crypto-perf: fix socket ID default value Thread-Index: AQHZryv2z6wzZXOlB0G8BNJvK7HFy6+rJThy Date: Wed, 5 Jul 2023 13:08:39 +0000 Message-ID: References: <20230705103047.1127985-1-ciara.power@intel.com> In-Reply-To: <20230705103047.1127985-1-ciara.power@intel.com> Accept-Language: en-GB, en-US, en-IE Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SN6PR11MB3408:EE_|SJ2PR11MB7597:EE_ x-ms-office365-filtering-correlation-id: 4e5c3a97-f726-47f2-43ba-08db7d58f30e x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: WOZvJmB2ZQEjHKKUiotZimpm0yQlSZHxF0Pt/GmpVcjaPGsrOD6RCN7Fj6t47jdOTdC+tzXfNUFB2I/oD4r0L2XZmu9AB8DScVbP0Cazx5rpZBnb0q/Qux8JI9BCqw0WeIdDQMoUDnGNMIy0zlODu4Fwomg1oy+ii8D4MT3drtVfUnkpKW1Q8tbLN1jBH1aJX9nFDdMDPivuwxUbsFoRXVdPjcZKV7wnPook2oyV+XfeNDdqhzc8bN5wTAbZgMAhmAq/Vvm8Sc5VaZcOnXj20qSkxx5ll8JQ5hQEUGMHuSNzorP3gOSxXBub+9x2fEaSEIWeaBw64YE4T9JSNUJIYeY0vuelAePq5solS2qNOIe7QjHHwWWKE84Xkgpau5xl0uoZ8QhTrHRcfa0mpoeCKzrdW0d5ppHV/qWybP7JO/SUbhpXqNoNBVC+83SLn8voW+iWy8uL+5i9rvEU+/SoopgAyhqD6qFoqpmZBx4l0j6DE2iOWBXv0FzLXU+x46Puy/+wP2wXH9XzQyQWSKYeZkiigUlB/3lOzneDvBNM4jFrIkMiHUijhKzZ79ByTzEGvIHtNsIDGKZK2YBM4wiNjzElGHtT/13Hheqn4a58ca3vP5/cK5oC1JxbgomOptvu x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB3408.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(396003)(136003)(346002)(376002)(39860400002)(366004)(451199021)(19627405001)(7696005)(71200400001)(478600001)(110136005)(54906003)(76116006)(91956017)(33656002)(38070700005)(86362001)(55016003)(2906002)(66556008)(186003)(66946007)(53546011)(6506007)(26005)(9686003)(82960400001)(122000001)(38100700002)(64756008)(4326008)(66446008)(66476007)(316002)(41300700001)(8936002)(8676002)(52536014)(5660300002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?SNKG9neOIF/AODRBGksRJ+3Y/x9xQTmHVDGarJ7TrKWCIqB+GauZvOl0A13z?= =?us-ascii?Q?TmRanyYMJhHkenh7qoTy3qXoo0CqphaBGdtB8EhJBrCXSB3I7ufk57U/osdS?= =?us-ascii?Q?vpal1hvdlC65omvn7em1A7sFdQbDU/7RJMBF3tzKCiakxImL4SBk6hH7WBf/?= =?us-ascii?Q?SEhTzEmR7ptSvdrquK9wQf3BtD9kAvSLwmqh/YBWY+KJfI+dm+bVYKSU7ey/?= =?us-ascii?Q?YW8i4MgYpIXBIFhAkxj8dU5hPG9BK6KabQQNoxTqdBOibsnfUwbTApVauvSV?= =?us-ascii?Q?+ursxqbG5DBJNwabUUb40PheYm4zBveKrQn1CAGMS+a4oGsL7N6cf1zG7knV?= =?us-ascii?Q?QfgKIjOCiSMfbR8SDgdoNCQPeKrIE7vnrQEBC+8CXQuWEvokLsTjyAgaQ2cf?= =?us-ascii?Q?xBPDQ1sjEN/NqMiPtYGIyxyd1/12TsGcQhlOCUycwxKqzL/42zDOiPXh0BOr?= =?us-ascii?Q?JdJg9VSkZ80lkNTYcQnEB8TeWlSHUcxZbJ4Evgv4F1GXv4gs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I8Y471TGMg7Y1qAjDphhv/zY3LUU3kvJq4jn0bD?= =?us-ascii?Q?DV3PUVo9cDEWWE8/s+DXWYxHzqHYNCSSUfhCRrxYVBvkCXgVlDMDy+b7UOCt?= =?us-ascii?Q?SceP13Jl0K71NdT47sVVKW6HaOAjgWMcCsv5M/MSFo1tG28q2ie5mVDzoQVI?= =?us-ascii?Q?YGsn0yRswYcgDgM3/yo=3D?= Content-Type: multipart/alternative; boundary="_000_SN6PR11MB34080195BC2A8F66BCF81EC4812FASN6PR11MB3408namp_" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB3408.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4e5c3a97-f726-47f2-43ba-08db7d58f30e X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jul 2023 13:08:39.0824 (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: TYccKJujnF8FFIGdgZ2e0Ae+rDJKAT8P4ldAOHBArlsWdRK9KLgTOxTMqosL404zM09w+IJWXxzb8QPeAsU7GQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR11MB7597 X-OriginatorOrg: intel.com 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 --_000_SN6PR11MB34080195BC2A8F66BCF81EC4812FASN6PR11MB3408namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Acked-by: Kai Ji > ________________________________ From: Ciara Power Sent: 05 July 2023 11:30 To: dev@dpdk.org Cc: gakhil@marvell.com ; Power, Ciara ; Matz, Olivier ; stable@dpdk.org Subject: [PATCH] app/crypto-perf: fix socket ID default value Due to recent changes to the default device socket ID, before being used as an index for session mempool list, the socket ID should be set to 0 if unknown (-1). Fixes: 7dcd73e37965 ("drivers/bus: set device NUMA node to unknown by defau= lt") Cc: olivier.matz@6wind.com Cc: stable@dpdk.org Signed-off-by: Ciara Power --- app/test-crypto-perf/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c index af5bd0d23b..b74e7ba118 100644 --- a/app/test-crypto-perf/main.c +++ b/app/test-crypto-perf/main.c @@ -651,6 +651,11 @@ main(int argc, char **argv) cdev_id =3D enabled_cdevs[cdev_index]; uint8_t socket_id =3D rte_cryptodev_socket_id(cdev_id); + /* range check the socket_id, negative values become big + * positive ones due to use of unsigned value + */ + if (socket_id >=3D RTE_MAX_NUMA_NODES) + socket_id =3D 0; ctx[i] =3D cperf_testmap[opts.test].constructor( session_pool_socket[socket_id].sess_mp, -- 2.25.1 --_000_SN6PR11MB34080195BC2A8F66BCF81EC4812FASN6PR11MB3408namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Acked-by: Kai Ji <kai.ji@intel.com>

From: Ciara Power <ciara= .power@intel.com>
Sent: 05 July 2023 11:30
To: dev@dpdk.org <dev@dpdk.org>
Cc: gakhil@marvell.com <gakhil@marvell.com>; Power, Ciara <= ciara.power@intel.com>; Matz, Olivier <olivier.matz@6wind.com>; st= able@dpdk.org <stable@dpdk.org>
Subject: [PATCH] app/crypto-perf: fix socket ID default value
 
Due to recent changes to the default device socket= ID,
before being used as an index for session mempool list,
the socket ID should be set to 0 if unknown (-1).

Fixes: 7dcd73e37965 ("drivers/bus: set device NUMA node to unknown by = default")
Cc: olivier.matz@6wind.com
Cc: stable@dpdk.org

Signed-off-by: Ciara Power <ciara.power@intel.com>
---
 app/test-crypto-perf/main.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index af5bd0d23b..b74e7ba118 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -651,6 +651,11 @@ main(int argc, char **argv)
            &nb= sp;    cdev_id =3D enabled_cdevs[cdev_index];
 
            &nb= sp;    uint8_t socket_id =3D rte_cryptodev_socket_id(cdev_id= );
+            &n= bsp;  /* range check the socket_id, negative values become big
+            &n= bsp;   * positive ones due to use of unsigned value
+            &n= bsp;   */
+            &n= bsp;  if (socket_id >=3D RTE_MAX_NUMA_NODES)
+            &n= bsp;          socket_id =3D 0;=
 
            &nb= sp;    ctx[i] =3D cperf_testmap[opts.test].constructor(
            &nb= sp;            =         session_pool_socket[socket_id].s= ess_mp,
--
2.25.1

--_000_SN6PR11MB34080195BC2A8F66BCF81EC4812FASN6PR11MB3408namp_--