[dpdk-dev] [RFC PATCH 0/5] rework feature enabling macros for compatibility

Bruce Richardson bruce.richardson at intel.com
Wed Sep 30 18:19:47 CEST 2020


On Wed, Sep 30, 2020 at 05:12:50PM +0100, Ferruh Yigit wrote:
> On 9/16/2020 5:44 PM, Bruce Richardson wrote:
> > As flagged previously on-list, there are a number of macros used to specify
> > what libs and drivers are enabled in the build which differ from the
> > equivalents used with make. This patchset is one possible approach to
> > fixing these, but as part of the investigation some issues were hit where
> > I'd like additional input to ensure we are ok with the approach taken in
> > this set.
> > 
> > First, a problem statement:
> > 
> > * While the make build defines generally followed a pattern, there were
> >    many instances where the defines were unique. These can be seen in the
> >    values defined in patch 4.
> > 
> > * The NIC PMDs had two separate standards for the defines - some (the
> >    physical device drivers) tended to have the _PMD at the end of the
> >    macros, while the virtual drivers had it in the middle. Since the
> >    majority seemed to go with it at the end, meson chose this option.
> >    However, as can be seen from patch 4, a number now need special handling
> >    for compatibility
> 
> +1 to all X_PMD macros.
> 
> > 
> > * This "_PMD" at the end made its way into other device classes, such as
> >    crypto and event, but it appears that the standard for these classes from
> >    make is in fact the opposite. Therefore we have had for the last 2+ years
> >    conflicting macros for crypto, compression and event classes.
> > 
> > * There is also the question of how important compatibility for these
> >    macros is, especially since we have had numerous incompatibilities
> >    without it being reported before. There is also the issue of the
> >    deprecation process for macros, since these are not part of any ABI.
> > 
> > What's done in this set:
> > 
> > * Firstly, and missing dependencies on apps or examples had to be fixed,
> >    where a dependency was missed because it was never needed due to the code
> >    being stripped out because of a missing macro.
> > 
> > * Secondly, since it is likely that use of the defines from make is more
> >    widespread than those from meson, the defines for the crypto, compression
> >    and event classes are changed to align with the make values. Just in case
> >    though, temporary code is added to drivers/meson.build to redefine the
> >    old meson values too, and a deprecation notice is added for these. The
> >    hope is that we can then remove this temporary code in the next release,
> >    leaving us with just one macro style for each driver class.
> > 
> > * Thirdly, we add an additional set of backward compatibility macros for
> >    the ~30 special-cases, where the meson macro template does not match that
> >    defined for make. Again, this is intended to be temporary and a
> >    deprecation notice is given for the macros in that file.
> >
> 
> Why we need this backward compatibility? The macros are to enable/disable a
> module, so isn't it DPDK internal.
> If we enable the macros for new naming convention and update the build
> system and code for new macros, will it affect the end user?
>

I'd love to be able to just take this option, but the macros are used to
indicate to applications what drivers or other components can be expected
to be available - much as the case for testpmd. Ideally, they should not be
necessary.

I think the best approach is that proposed earlier on this thread - we keep
backward compatibility as much as possible in this release, but add in a
new set of standardized macros and a deprecation notice about the old ones.
I hope to work on a new rev of this patchset shortly.

/Bruce


More information about the dev mailing list