[EXTERNAL] [PATCH v2 1/2] crypto: fix build issues on unsetting crypto callbacks macro

Kundapura, Ganapati ganapati.kundapura at intel.com
Thu May 30 13:41:56 CEST 2024


Hi,

> -----Original Message-----
> From: Morten Brørup <mb at smartsharesystems.com>
> Sent: Thursday, May 30, 2024 4:44 PM
> To: Akhil Goyal <gakhil at marvell.com>; Kundapura, Ganapati
> <ganapati.kundapura at intel.com>; dev at dpdk.org; Gujjar, Abhinandan S
> <abhinandan.gujjar at intel.com>; ferruh.yigit at amd.com;
> thomas at monjalon.net; Richardson, Bruce <bruce.richardson at intel.com>;
> fanzhang.oss at gmail.com; ciara.power at intel.com
> Subject: RE: [EXTERNAL] [PATCH v2 1/2] crypto: fix build issues on unsetting
> crypto callbacks macro
> 
> > From: Akhil Goyal [mailto:gakhil at marvell.com]
> > Sent: Thursday, 30 May 2024 13.02
> >
> > ++ Morten for comment on #if vs #ifdef
> >
> > > > 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 <ganapati.kundapura at intel.com>
> > > > ---
> > > > 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.
Irrespective of RTE_CRYPTO_CALLBACKS value set to 0/1,
#ifdef RTE_CRYPTO_CALLBACKS returns true always.



More information about the dev mailing list