On Thu, Jul 28, 2022 at 6:38 PM Bruce Richardson <bruce.richard...@intel.com> wrote: > > On Thu, Jul 28, 2022 at 05:26:22PM +0200, David Marchand wrote: > > RTE_FUNC_PTR_OR_* macros have nothing to do with the rte_device object > > and associated API. > > Move them to rte_common.h and include it where needed. > > > > Signed-off-by: David Marchand <david.march...@redhat.com> > > --- > > Personally, I really don't like these macros at all. I think having the > check explicitly in the code would be far more readable, and would only be > one line of code longer than the macro call. Is there some private header > file we could move these to instead of rte_common.h so we can drop their > use in future if we decide to?
I don't like them either. Not sure where to put them though... My "grep-all" shows no user in the projects consuming DPDK I track. We could mark those macros deprecated, fix our code and drop them later. -- David Marchand