Hi Akhil, Joseph, Thomas,
Just spotted this now.
See below.
> -----Original Message-----
> From: Thomas Monjalon [mailto:tho...@monjalon.net]
> Sent: Monday, October 1, 2018 11:05 AM
> To: Joseph, Anoob <anoob.jos...@caviumnetworks.com>
> Cc: dev@dpdk.org; Trahe, Fiona <fiona.tr...@intel.com>; Akhil Goyal
> <akhil.go...@nxp.com>; Anoob
> Joseph <ajos...@caviumnetworks.com>; De Lara Guarch, Pablo
> <pablo.de.lara.gua...@intel.com>;
> Murthy NSSR <nidadavolu.mur...@caviumnetworks.com>; Jerin Jacob
> <jerin.ja...@caviumnetworks.com>; Narayana Prasad
> <narayanaprasad.athr...@caviumnetworks.com>; Ankur Dwivedi
> <ankur.dwiv...@caviumnetworks.com>; Nithin Dabilpuram
> <nithin.dabilpu...@caviumnetworks.com>; Ragothaman Jayaraman
> <rjayara...@caviumnetworks.com>; Srisivasubramanian S
> <ssriniva...@caviumnetworks.com>;
> Tejasree Kondoj <kondoj.tejas...@caviumnetworks.com>
> Subject: Re: [dpdk-dev] [PATCH v2 09/33] crypto/octeontx: adds symmetric
> capabilities
>
> 24/09/2018 13:36, Joseph, Anoob:
> > Hi Fiona,
> >
> > Can you please comment on this?
> >
> > We are adding all capabilities of octeontx-crypto PMD as a macro in
> > otx_cryptodev_capabilites.h file and then we are using it from
> > otx_cryptodev_ops.c. This is the approach followed by QAT crypto PMD. As
> > per my understanding, this is to ensure that cryptodev_ops file remains
> > simple. For other PMDs with fewer number of capabilities, the structure
> > can be populated in the .c file itself without the size of the file
> > coming into the picture.
> >
> > But this would cause checkpatch to report error. Akhil's suggestion is
> > to move the entire definition to a header and include it from the .c
> > file. I believe, the QAT approach was to avoid variable definition in
> > the header. What do you think would be a better approach here?
>
> I think we should avoid adding some code in a .h file.
> And it is even worst when using macros.
>
> I suggest defining the capabilities in a .c file.
> If you don't want to bloat the main .c file, you can create a function
> defined in another .c file.
>
I can't remember all the variations we tried, but there were a few.
I think the macro works well in this case.
What is the issue we need to solve?