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 1DC8D44100; Wed, 29 May 2024 11:58:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A8DE4402CD; Wed, 29 May 2024 11:58:38 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by mails.dpdk.org (Postfix) with ESMTP id 6BC63402B9 for ; Wed, 29 May 2024 11:58:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716976716; x=1748512716; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=jTiVNjTmEKVXwebWAypw4rVZXLP9pRXT7xQqSWh/jCw=; b=f/xzlLFeQ94A0Rr58E6IViBEbuGWSFX0rPZgBYQXFGSl5hq7vElxTCtt gqSb5lwbWNOd70nBZ3O/WFkFYOW3lYcnTj1rUZcINSD9NKmYqKXUDoqRU wcY5BfGc0LVp1xF5tGLeFmytoh+16j45dMHjfyRov9r4FCltKU3TPlOOl 7ouuJP0NwnM/Qymw8ErSqYh70YgIFaTwnAO6PML2StEaxVbhbM9c70PN8 6k1LCjmWfoQYZi1ETtpB0yr1J42FfvQdUL2eZ43VtzbGzJoyIeYIpPdzT G5+Ba/xWLNToljnOrGkHeCuSsA7vdNacWIU25HAu4PeRoVQ2xrNvb+g6L Q==; X-CSE-ConnectionGUID: rHNr93gISfGgFVhB7s5kCQ== X-CSE-MsgGUID: x7wuR6f6Q6CL4qkR9cXwyA== X-IronPort-AV: E=McAfee;i="6600,9927,11085"; a="23978461" X-IronPort-AV: E=Sophos;i="6.08,198,1712646000"; d="scan'208";a="23978461" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 May 2024 02:58:35 -0700 X-CSE-ConnectionGUID: X9O2uD7kTGi5hZjDSYt2EA== X-CSE-MsgGUID: TNDV1DP1TUmZb+kLoIPLlA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,198,1712646000"; d="scan'208";a="40228155" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orviesa003.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 29 May 2024 02:58:34 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) 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.39; Wed, 29 May 2024 02:58:34 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 29 May 2024 02:58:04 -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.39 via Frontend Transport; Wed, 29 May 2024 02:58:04 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.168) 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.39; Wed, 29 May 2024 02:57:56 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FTcl+pGVzOJHWjQKoNk3y4prxkEUoY+dnzlmSrqQEZqn6xIP73qE2C1ztHd57OMvMBl+sAYKy6WGYNH94Qori0bleYJkavsfXiR7Tuj5fWDBTExPIUNwmAnt0Mbg0RyNni/6ca/Z0Dc0+qUtiOSnusokKBDVlbX+z//e1DXSCp2x/NsU3/LZvp2PwYBvjFUHRUdHFPOCYjI+SbskDYE+QoPBJTk9aOD2y6wo58kT0noFkSWIz2NTR27okERDDzyZNjKvCL9LJwkReuHwECExIqEFSQq95mgjjMvd0+IodqpWKwJc0Win4H/3u9egXBpm1qFIW8/xpADVF8QikgDuYw== 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=waMju2by5InlhgvqLXKGSLAqAO22suNBx6YHtya71BY=; b=I8vmqxMtoC+7CU65zCdLuIFsSti12U4PRTyHB5TVZ7+Nd7OWOGPOTVbE3joOvdzAyfQxAtg6ky0xsLutFgU4Az8r26El5iMA0M2jwv96NreiXbVgpSxwOFM3eLQHx1rGSN9BH9jyA/7Of1syCNf4tZfUYr2jOEqxgaKm2W2v+/GRz1AgQWvUwZY+F0Ed6yXcoDJWsLlezOiCYyDaNk43Fn5XhjyglMorT+VhjKs/6ykbNHlCLspYebkdmeMPhvJCwdCmf0e+I/Z+JAUWMs6WTlH607A0tzDYiufX+AVgReEMVKgrCv/TvVXN7rJH6otNWaNp8mNiMQl2wB5aCyVQiw== 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 MW4PR11MB5911.namprd11.prod.outlook.com (2603:10b6:303:16b::16) by CH3PR11MB8752.namprd11.prod.outlook.com (2603:10b6:610:1c2::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.30; Wed, 29 May 2024 09:57:49 +0000 Received: from MW4PR11MB5911.namprd11.prod.outlook.com ([fe80::1d00:286c:1800:c2f2]) by MW4PR11MB5911.namprd11.prod.outlook.com ([fe80::1d00:286c:1800:c2f2%3]) with mapi id 15.20.7611.030; Wed, 29 May 2024 09:57:49 +0000 From: "Kundapura, Ganapati" To: Akhil Goyal , "dev@dpdk.org" , "Ferruh Yigit" , "thomas@monjalon.net" , "Richardson, Bruce" CC: "Gujjar, Abhinandan S" , "ciara.power@intel.com" , "fanzhang.oss@gmail.com" Subject: RE: [EXTERNAL] [PATCH v1] crypto: fix build issues on crypto callbacks macro undefined Thread-Topic: [EXTERNAL] [PATCH v1] crypto: fix build issues on crypto callbacks macro undefined Thread-Index: AQHaj9XgIxDDCslMeECklgxt3xrjUbGuJp+AgAAV+3A= Date: Wed, 29 May 2024 09:57:49 +0000 Message-ID: References: <20240416081222.3002268-1-ganapati.kundapura@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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: MW4PR11MB5911:EE_|CH3PR11MB8752:EE_ x-ms-office365-filtering-correlation-id: 4d78d5be-7d83-4c0d-4f8b-08dc7fc5cc42 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230031|366007|376005|1800799015|38070700009; x-microsoft-antispam-message-info: =?us-ascii?Q?/1xwilsDWmasH2GM7WfyFpVFquL0I7lb6rCIv+1IjeqsFqwfv1zYQSZBXdOv?= =?us-ascii?Q?ZSaS3Gugq1Q8mbmcRolCNgr18qxOecaHeiFo3OPgBjpQGNjTJ7ZBzxpNliNW?= =?us-ascii?Q?Y8XW2XI6ghohn8HiOdOWZ6eZBHbUfcWA+soaHYzr6ii/ojdIFdfgLD7+XNhC?= =?us-ascii?Q?fM7i3GdTPUUbluDU+2QOQ82CpeHx1n11S+L4CpiFMuN++Hpm+0JufiiknF+d?= =?us-ascii?Q?gI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ftn1NwEWgqq6AcB?= =?us-ascii?Q?dYRFMQDialt7VfPfSm3F0DU6yrh5xrAlPW1Ghi4PpANgVCBsytV3DgNABWog?= =?us-ascii?Q?6/JtXWEf9TLRdj0YYaK5/myLkxPQkISrrO+8LK9mZhVEN64bBbetwhoTwDU7?= =?us-ascii?Q?S6zCxZjo7VQEw1JBHiCOCJpMSkPMHB/8KWBn5erF90s7mBgeefnztxrIiH2Z?= =?us-ascii?Q?wU8WG9CqG/QTjH3CAlClCEmzCdlZzjLGdrHEytZYM2NIZw=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW4PR11MB5911.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366007)(376005)(1800799015)(38070700009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?e+RglfM9O0jtK45bimUU5hW3GjrPpkUrvojaYukr3wIH4aH27XotIHH5Cc4/?= =?us-ascii?Q?xVBfIFH/dV/6FfS5d/PBRg1V8+sy11HcDR+DnM12nIT2Bd/qKECc+6SX4fZs?= =?us-ascii?Q?3O2M3FpncZBzH6uS/RiAhbMrnlz9DJn2MPBObiRAmz7Z7FcYqOmv6bF09NSQ?= =?us-ascii?Q?Lxs+qwRjBZ4pYWYvtiMXOy1n9N4kus+62mZ9DscbyTzCKIk8xy50NU9rUipa?= =?us-ascii?Q?wpQs5Ubb0F4tGI/JGywe5a70JlOf08gn7m16bVjcmbd2CaoKGnHFtD3jyZtg?= =?us-ascii?Q?V59kszHI/YB1Y648mSgbLeg0wf2dGlp/V2RAyImC/Q1lvlH14LvZ9IKLo78+?= =?us-ascii?Q?l+WoKdmaw3FXl9kDRbE0wYHCAx9bpUIQUoX8nDtJHRnU/9syw7Q+LELnZXRK?= =?us-ascii?Q?gQecwvvoB3hxeIdNI8iHmlS8nwx46mBk9HaqnCmE4F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A5sTgt7jBbjW85evAMkYM5SdUw4dcT9bjK1ROXzrDyS38ptX1lQ0RDCIp?= =?us-ascii?Q?kgMintj1sMwrkWikceK9chwIggmut5J0hqHJlEFOp16d800uGu3wP50J/Zqv?= =?us-ascii?Q?PUKg43FWVdAalNCYlqhXs6mntWvYrq+TYZh4Js0N8keRSc7RRZfrtp0GLKlL?= =?us-ascii?Q?JblWMlv5CeJArMEtAimoe5cGzly0VoA5SbCteh1VWljbF5BDweP0T4UFT1Jf?= =?us-ascii?Q?dXM2sNKqmIiOT6SYKFU=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5911.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4d78d5be-7d83-4c0d-4f8b-08dc7fc5cc42 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 May 2024 09:57:49.1713 (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: pfKgid1yviwtH4EQv9yMKLR/bSDhSHk2cQOFG/Tzlk2/mJN6rX53p0nXbTe745Wj/c6uzgsfdsoeyIhIeLxRqlQ7GgH+8VKOHKBDacfxIRM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR11MB8752 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 > -----Original Message----- > From: Akhil Goyal > Sent: Wednesday, May 29, 2024 2:05 PM > To: Kundapura, Ganapati ; dev@dpdk.org; > Ferruh Yigit ; thomas@monjalon.net; Richardson, > Bruce > Cc: Gujjar, Abhinandan S ; > ciara.power@intel.com; fanzhang.oss@gmail.com > Subject: RE: [EXTERNAL] [PATCH v1] crypto: fix build issues on crypto cal= lbacks > macro undefined >=20 > > Crypto callbacks macro is defined with value 1 and being used with > > ifdef, on config value is changed to 0 to disable, crypto callback > > changes still being compiled. >=20 > I believe we can use #if instead of ifdefs. > It seems convenient to enable/disable in my opinion. > We can use both, but whatever we use should be same as that for ethdev > callbacks. >=20 Using #if requires check for equality like #if RTE_CRYPTO_CALLBACKS =3D=3D 1 for a macro defined with value 1 > The same issue would be for ethdev callbacks too. > Ferruh, can you check? >=20 > > > > Defined crypto callbacks macro without value, undef to disable > > > > Wrapped crypto callback changes with RTE_CRYPTO_CALLBACKS macro to fix > > build issues when macro is undefined. > > > > As callback head nodes have valid pointer, this patch checks the next > > node from the head if callbacks registered. > > > > Fixes: 1c3ffb9 ("cryptodev: add enqueue and dequeue callbacks") > > Fixes: 5523a75 ("test/crypto: add case for enqueue/dequeue callbacks") > > > > Signed-off-by: Ganapati Kundapura >=20 >=20 > > diff --git a/config/rte_config.h b/config/rte_config.h index > > dd7bb0d35b..b647a69ba8 100644 > > --- a/config/rte_config.h > > +++ b/config/rte_config.h > > @@ -72,7 +72,7 @@ > > /* cryptodev defines */ > > #define RTE_CRYPTO_MAX_DEVS 64 > > #define RTE_CRYPTODEV_NAME_LEN 64 > > -#define RTE_CRYPTO_CALLBACKS 1 > > +#define RTE_CRYPTO_CALLBACKS /* No Value, undef/comment out to > > disable */ > > > > /* compressdev defines */ > > #define RTE_COMPRESS_MAX_DEVS 64 >=20 >=20 > > diff --git a/lib/cryptodev/rte_cryptodev.h > > b/lib/cryptodev/rte_cryptodev.h index 00ba6a234a..b811b458d5 100644 > > --- a/lib/cryptodev/rte_cryptodev.h > > +++ b/lib/cryptodev/rte_cryptodev.h > > @@ -1910,7 +1910,7 @@ rte_cryptodev_dequeue_burst(uint8_t dev_id, > > uint16_t qp_id, > > nb_ops =3D fp_ops->dequeue_burst(qp, ops, nb_ops); > > > > #ifdef RTE_CRYPTO_CALLBACKS > > - if (unlikely(fp_ops->qp.deq_cb !=3D NULL)) { > > + if (unlikely(fp_ops->qp.deq_cb[qp_id].next !=3D NULL)) { > > struct rte_cryptodev_cb_rcu *list; > > struct rte_cryptodev_cb *cb; > > > > @@ -1977,7 +1977,7 @@ rte_cryptodev_enqueue_burst(uint8_t dev_id, > > uint16_t qp_id, > > fp_ops =3D &rte_crypto_fp_ops[dev_id]; > > qp =3D fp_ops->qp.data[qp_id]; > > #ifdef RTE_CRYPTO_CALLBACKS > > - if (unlikely(fp_ops->qp.enq_cb !=3D NULL)) { > > + if (unlikely(fp_ops->qp.enq_cb[qp_id].next !=3D NULL)) { > > struct rte_cryptodev_cb_rcu *list; > > struct rte_cryptodev_cb *cb; > > > This is a separate issue. Please create a separate patch. ok