From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by smtp.lore.kernel.org (Postfix) with ESMTP id A49D8C25B74 for ; Thu, 30 May 2024 11:13:40 +0000 (UTC) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7925140685; Thu, 30 May 2024 13:13:39 +0200 (CEST) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 437EC40608 for ; Thu, 30 May 2024 13:13:38 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id 1081920904; Thu, 30 May 2024 13:13:38 +0200 (CEST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [EXTERNAL] [PATCH v2 1/2] crypto: fix build issues on unsetting crypto callbacks macro X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Thu, 30 May 2024 13:13:33 +0200 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F4D7@smartserver.smartshare.dk> In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [EXTERNAL] [PATCH v2 1/2] crypto: fix build issues on unsetting crypto callbacks macro Thread-Index: AQHasdYqBA7BiFARTUmhLk6iVntHPbGvZbfQgAA31SCAAAJdMA== References: <20240416081222.3002268-1-ganapati.kundapura@intel.com> <20240529144025.4089318-1-ganapati.kundapura@intel.com> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Akhil Goyal" , "Ganapati Kundapura" , , , , , , , 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 > From: Akhil Goyal [mailto:gakhil@marvell.com] > Sent: Thursday, 30 May 2024 13.02 >=20 > ++ Morten for comment on #if vs #ifdef >=20 > > > Subject: [EXTERNAL] [PATCH v2 1/2] crypto: fix build issues on = unsetting > crypto > > > callbacks macro > > > > > > 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. > > > > > > Used #if instead of #ifdef and also wrapped crypto callback = changes > > > under RTE_CRYPTO_CALLBACKS macro to fix build issues when macro is > > > unset. > > > > > > Fixes: 1c3ffb95595e ("cryptodev: add enqueue and dequeue = callbacks") > > > Fixes: 5523a75af539 ("test/crypto: add case for enqueue/dequeue > callbacks") > > > > > > Signed-off-by: Ganapati Kundapura > > > --- > > > v2: > > > * Used #if instead of #ifdef and restored macro definition in = config > > > * Split callback registration check in a seperate patch The DPDK convention is #ifdef, not #if. Ethdev also uses #ifdef, e.g.: https://elixir.bootlin.com/dpdk/v24.03/source/lib/ethdev/rte_ethdev.h#L61= 12 PS: Personally, I prefer #if too. But we should set personal preferences = aside, and follow the existing convention in DPDK and use #ifdef.