[v3,6/7] build: standardize component names and defines

Message ID 20201014141304.632120-7-bruce.richardson@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series Rework build macros |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Bruce Richardson Oct. 14, 2020, 2:13 p.m. UTC
  As discussed on the dpdk-dev mailing list[1], we can make some easy
improvements in standardizing the naming of the various components in DPDK,
and their associated feature-enabled macros.

Following this patch, each library will have the name in format,
'librte_<name>.so', and the macro indicating that library is enabled in the
build will have the form 'RTE_LIB_<NAME>'.

Similarly, for libraries, the equivalent name formats and macros are:
'librte_<class>_<name>.so' and 'RTE_<CLASS>_<NAME>', where class is the
device type taken from the relevant driver subdirectory name, i.e. 'net',
'crypto' etc.

To avoid too many changes at once for end applications, the old macro names
will still be provided in the build in this release, but will be removed
subsequently.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

[1] http://inbox.dpdk.org/dev/ef7c1a87-79ab-e405-4202-39b7ad6b0c71@solarflare.com/t/#u
---
 app/test-bbdev/meson.build            |  4 ++--
 app/test-crypto-perf/meson.build      |  2 +-
 app/test-pmd/meson.build              | 12 ++++++------
 app/test/meson.build                  |  8 ++++----
 doc/guides/rel_notes/deprecation.rst  |  8 ++++++++
 drivers/baseband/meson.build          |  1 -
 drivers/bus/meson.build               |  1 -
 drivers/common/meson.build            |  1 -
 drivers/common/mlx5/meson.build       |  1 -
 drivers/common/qat/meson.build        |  1 -
 drivers/compress/meson.build          |  1 -
 drivers/compress/octeontx/meson.build |  2 +-
 drivers/crypto/meson.build            |  1 -
 drivers/crypto/null/meson.build       |  2 +-
 drivers/crypto/octeontx/meson.build   |  2 +-
 drivers/crypto/octeontx2/meson.build  |  2 +-
 drivers/crypto/scheduler/meson.build  |  2 +-
 drivers/crypto/virtio/meson.build     |  2 +-
 drivers/event/dpaa/meson.build        |  2 +-
 drivers/event/dpaa2/meson.build       |  2 +-
 drivers/event/meson.build             |  1 -
 drivers/event/octeontx/meson.build    |  2 +-
 drivers/event/octeontx2/meson.build   |  2 +-
 drivers/mempool/meson.build           |  1 -
 drivers/meson.build                   |  9 ++++-----
 drivers/net/meson.build               |  1 -
 drivers/net/mlx4/meson.build          |  2 +-
 drivers/raw/ifpga/meson.build         |  2 +-
 drivers/raw/meson.build               |  1 -
 drivers/regex/meson.build             |  1 -
 drivers/vdpa/meson.build              |  1 -
 examples/bond/meson.build             |  2 +-
 examples/ethtool/meson.build          |  2 +-
 examples/ioat/meson.build             |  2 +-
 examples/l2fwd-crypto/meson.build     |  2 +-
 examples/ntb/meson.build              |  2 +-
 examples/vm_power_manager/meson.build |  6 +++---
 lib/librte_ethdev/meson.build         |  1 -
 lib/librte_graph/meson.build          |  2 --
 lib/meson.build                       |  3 ++-
 40 files changed, 47 insertions(+), 55 deletions(-)
  

Comments

Luca Boccassi Oct. 15, 2020, 10:30 a.m. UTC | #1
On Wed, 2020-10-14 at 15:13 +0100, Bruce Richardson wrote:
> As discussed on the dpdk-dev mailing list[1], we can make some easy
> improvements in standardizing the naming of the various components in DPDK,
> and their associated feature-enabled macros.
> 
> Following this patch, each library will have the name in format,
> 'librte_<name>.so', and the macro indicating that library is enabled in the
> build will have the form 'RTE_LIB_<NAME>'.
> 
> Similarly, for libraries, the equivalent name formats and macros are:
> 'librte_<class>_<name>.so' and 'RTE_<CLASS>_<NAME>', where class is the
> device type taken from the relevant driver subdirectory name, i.e. 'net',
> 'crypto' etc.
> 
> To avoid too many changes at once for end applications, the old macro names
> will still be provided in the build in this release, but will be removed
> subsequently.
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> 
> [1] http://inbox.dpdk.org/dev/ef7c1a87-79ab-e405-4202-39b7ad6b0c71@solarflare.com/t/#u
> ---
>  app/test-bbdev/meson.build            |  4 ++--
>  app/test-crypto-perf/meson.build      |  2 +-
>  app/test-pmd/meson.build              | 12 ++++++------
>  app/test/meson.build                  |  8 ++++----
>  doc/guides/rel_notes/deprecation.rst  |  8 ++++++++
>  drivers/baseband/meson.build          |  1 -
>  drivers/bus/meson.build               |  1 -
>  drivers/common/meson.build            |  1 -
>  drivers/common/mlx5/meson.build       |  1 -
>  drivers/common/qat/meson.build        |  1 -
>  drivers/compress/meson.build          |  1 -
>  drivers/compress/octeontx/meson.build |  2 +-
>  drivers/crypto/meson.build            |  1 -
>  drivers/crypto/null/meson.build       |  2 +-
>  drivers/crypto/octeontx/meson.build   |  2 +-
>  drivers/crypto/octeontx2/meson.build  |  2 +-
>  drivers/crypto/scheduler/meson.build  |  2 +-
>  drivers/crypto/virtio/meson.build     |  2 +-
>  drivers/event/dpaa/meson.build        |  2 +-
>  drivers/event/dpaa2/meson.build       |  2 +-
>  drivers/event/meson.build             |  1 -
>  drivers/event/octeontx/meson.build    |  2 +-
>  drivers/event/octeontx2/meson.build   |  2 +-
>  drivers/mempool/meson.build           |  1 -
>  drivers/meson.build                   |  9 ++++-----
>  drivers/net/meson.build               |  1 -
>  drivers/net/mlx4/meson.build          |  2 +-
>  drivers/raw/ifpga/meson.build         |  2 +-
>  drivers/raw/meson.build               |  1 -
>  drivers/regex/meson.build             |  1 -
>  drivers/vdpa/meson.build              |  1 -
>  examples/bond/meson.build             |  2 +-
>  examples/ethtool/meson.build          |  2 +-
>  examples/ioat/meson.build             |  2 +-
>  examples/l2fwd-crypto/meson.build     |  2 +-
>  examples/ntb/meson.build              |  2 +-
>  examples/vm_power_manager/meson.build |  6 +++---
>  lib/librte_ethdev/meson.build         |  1 -
>  lib/librte_graph/meson.build          |  2 --
>  lib/meson.build                       |  3 ++-
>  40 files changed, 47 insertions(+), 55 deletions(-)

Does this change the share object file names too, or only the macros?
  
Bruce Richardson Oct. 15, 2020, 11:18 a.m. UTC | #2
On Thu, Oct 15, 2020 at 11:30:29AM +0100, Luca Boccassi wrote:
> On Wed, 2020-10-14 at 15:13 +0100, Bruce Richardson wrote:
> > As discussed on the dpdk-dev mailing list[1], we can make some easy
> > improvements in standardizing the naming of the various components in DPDK,
> > and their associated feature-enabled macros.
> > 
> > Following this patch, each library will have the name in format,
> > 'librte_<name>.so', and the macro indicating that library is enabled in the
> > build will have the form 'RTE_LIB_<NAME>'.
> > 
> > Similarly, for libraries, the equivalent name formats and macros are:
> > 'librte_<class>_<name>.so' and 'RTE_<CLASS>_<NAME>', where class is the
> > device type taken from the relevant driver subdirectory name, i.e. 'net',
> > 'crypto' etc.
> > 
> > To avoid too many changes at once for end applications, the old macro names
> > will still be provided in the build in this release, but will be removed
> > subsequently.
> > 
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > 
> > [1] http://inbox.dpdk.org/dev/ef7c1a87-79ab-e405-4202-39b7ad6b0c71@solarflare.com/t/#u
> > ---
> >  app/test-bbdev/meson.build            |  4 ++--
> >  app/test-crypto-perf/meson.build      |  2 +-
> >  app/test-pmd/meson.build              | 12 ++++++------
> >  app/test/meson.build                  |  8 ++++----
> >  doc/guides/rel_notes/deprecation.rst  |  8 ++++++++
> >  drivers/baseband/meson.build          |  1 -
> >  drivers/bus/meson.build               |  1 -
> >  drivers/common/meson.build            |  1 -
> >  drivers/common/mlx5/meson.build       |  1 -
> >  drivers/common/qat/meson.build        |  1 -
> >  drivers/compress/meson.build          |  1 -
> >  drivers/compress/octeontx/meson.build |  2 +-
> >  drivers/crypto/meson.build            |  1 -
> >  drivers/crypto/null/meson.build       |  2 +-
> >  drivers/crypto/octeontx/meson.build   |  2 +-
> >  drivers/crypto/octeontx2/meson.build  |  2 +-
> >  drivers/crypto/scheduler/meson.build  |  2 +-
> >  drivers/crypto/virtio/meson.build     |  2 +-
> >  drivers/event/dpaa/meson.build        |  2 +-
> >  drivers/event/dpaa2/meson.build       |  2 +-
> >  drivers/event/meson.build             |  1 -
> >  drivers/event/octeontx/meson.build    |  2 +-
> >  drivers/event/octeontx2/meson.build   |  2 +-
> >  drivers/mempool/meson.build           |  1 -
> >  drivers/meson.build                   |  9 ++++-----
> >  drivers/net/meson.build               |  1 -
> >  drivers/net/mlx4/meson.build          |  2 +-
> >  drivers/raw/ifpga/meson.build         |  2 +-
> >  drivers/raw/meson.build               |  1 -
> >  drivers/regex/meson.build             |  1 -
> >  drivers/vdpa/meson.build              |  1 -
> >  examples/bond/meson.build             |  2 +-
> >  examples/ethtool/meson.build          |  2 +-
> >  examples/ioat/meson.build             |  2 +-
> >  examples/l2fwd-crypto/meson.build     |  2 +-
> >  examples/ntb/meson.build              |  2 +-
> >  examples/vm_power_manager/meson.build |  6 +++---
> >  lib/librte_ethdev/meson.build         |  1 -
> >  lib/librte_graph/meson.build          |  2 --
> >  lib/meson.build                       |  3 ++-
> >  40 files changed, 47 insertions(+), 55 deletions(-)
> 
> Does this change the share object file names too, or only the macros?
>

It does indeed change the object name files, which is a little bit
concerning. However, the consensus based on the RFC seemed to be that the
benefit is likely worth the change. If we want, we can look to use symlinks
to the old names on install, but I think that just delays the pain since I
would expect few to actually change their build to the new names until the
old ones and the symlinks completely go away.

/Bruce
  
Luca Boccassi Oct. 15, 2020, 1:05 p.m. UTC | #3
On Thu, 2020-10-15 at 12:18 +0100, Bruce Richardson wrote:
> On Thu, Oct 15, 2020 at 11:30:29AM +0100, Luca Boccassi wrote:
> > On Wed, 2020-10-14 at 15:13 +0100, Bruce Richardson wrote:
> > > As discussed on the dpdk-dev mailing list[1], we can make some easy
> > > improvements in standardizing the naming of the various components in DPDK,
> > > and their associated feature-enabled macros.
> > > 
> > > Following this patch, each library will have the name in format,
> > > 'librte_<name>.so', and the macro indicating that library is enabled in the
> > > build will have the form 'RTE_LIB_<NAME>'.
> > > 
> > > Similarly, for libraries, the equivalent name formats and macros are:
> > > 'librte_<class>_<name>.so' and 'RTE_<CLASS>_<NAME>', where class is the
> > > device type taken from the relevant driver subdirectory name, i.e. 'net',
> > > 'crypto' etc.
> > > 
> > > To avoid too many changes at once for end applications, the old macro names
> > > will still be provided in the build in this release, but will be removed
> > > subsequently.
> > > 
> > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > > 
> > > [1] http://inbox.dpdk.org/dev/ef7c1a87-79ab-e405-4202-39b7ad6b0c71@solarflare.com/t/#u
> > > ---
> > >  app/test-bbdev/meson.build            |  4 ++--
> > >  app/test-crypto-perf/meson.build      |  2 +-
> > >  app/test-pmd/meson.build              | 12 ++++++------
> > >  app/test/meson.build                  |  8 ++++----
> > >  doc/guides/rel_notes/deprecation.rst  |  8 ++++++++
> > >  drivers/baseband/meson.build          |  1 -
> > >  drivers/bus/meson.build               |  1 -
> > >  drivers/common/meson.build            |  1 -
> > >  drivers/common/mlx5/meson.build       |  1 -
> > >  drivers/common/qat/meson.build        |  1 -
> > >  drivers/compress/meson.build          |  1 -
> > >  drivers/compress/octeontx/meson.build |  2 +-
> > >  drivers/crypto/meson.build            |  1 -
> > >  drivers/crypto/null/meson.build       |  2 +-
> > >  drivers/crypto/octeontx/meson.build   |  2 +-
> > >  drivers/crypto/octeontx2/meson.build  |  2 +-
> > >  drivers/crypto/scheduler/meson.build  |  2 +-
> > >  drivers/crypto/virtio/meson.build     |  2 +-
> > >  drivers/event/dpaa/meson.build        |  2 +-
> > >  drivers/event/dpaa2/meson.build       |  2 +-
> > >  drivers/event/meson.build             |  1 -
> > >  drivers/event/octeontx/meson.build    |  2 +-
> > >  drivers/event/octeontx2/meson.build   |  2 +-
> > >  drivers/mempool/meson.build           |  1 -
> > >  drivers/meson.build                   |  9 ++++-----
> > >  drivers/net/meson.build               |  1 -
> > >  drivers/net/mlx4/meson.build          |  2 +-
> > >  drivers/raw/ifpga/meson.build         |  2 +-
> > >  drivers/raw/meson.build               |  1 -
> > >  drivers/regex/meson.build             |  1 -
> > >  drivers/vdpa/meson.build              |  1 -
> > >  examples/bond/meson.build             |  2 +-
> > >  examples/ethtool/meson.build          |  2 +-
> > >  examples/ioat/meson.build             |  2 +-
> > >  examples/l2fwd-crypto/meson.build     |  2 +-
> > >  examples/ntb/meson.build              |  2 +-
> > >  examples/vm_power_manager/meson.build |  6 +++---
> > >  lib/librte_ethdev/meson.build         |  1 -
> > >  lib/librte_graph/meson.build          |  2 --
> > >  lib/meson.build                       |  3 ++-
> > >  40 files changed, 47 insertions(+), 55 deletions(-)
> > 
> > Does this change the share object file names too, or only the macros?
> > 
> 
> It does indeed change the object name files, which is a little bit
> concerning. However, the consensus based on the RFC seemed to be that the
> benefit is likely worth the change. If we want, we can look to use symlinks
> to the old names on install, but I think that just delays the pain since I
> would expect few to actually change their build to the new names until the
> old ones and the symlinks completely go away.
> 
> /Bruce

It is a backward incompatible change, so we need to provide symlinks,
right? On upgrade, programs linked to librte_old.so will fail to start.
Or was this targeted at 20.11 thus piggy-backing on the ABI change
which forces a re-link?
  
Bruce Richardson Oct. 15, 2020, 2:03 p.m. UTC | #4
On Thu, Oct 15, 2020 at 02:05:37PM +0100, Luca Boccassi wrote:
> On Thu, 2020-10-15 at 12:18 +0100, Bruce Richardson wrote:
> > On Thu, Oct 15, 2020 at 11:30:29AM +0100, Luca Boccassi wrote:
> > > On Wed, 2020-10-14 at 15:13 +0100, Bruce Richardson wrote:
> > > > As discussed on the dpdk-dev mailing list[1], we can make some easy
> > > > improvements in standardizing the naming of the various components in DPDK,
> > > > and their associated feature-enabled macros.
> > > > 
> > > > Following this patch, each library will have the name in format,
> > > > 'librte_<name>.so', and the macro indicating that library is enabled in the
> > > > build will have the form 'RTE_LIB_<NAME>'.
> > > > 
> > > > Similarly, for libraries, the equivalent name formats and macros are:
> > > > 'librte_<class>_<name>.so' and 'RTE_<CLASS>_<NAME>', where class is the
> > > > device type taken from the relevant driver subdirectory name, i.e. 'net',
> > > > 'crypto' etc.
> > > > 
> > > > To avoid too many changes at once for end applications, the old macro names
> > > > will still be provided in the build in this release, but will be removed
> > > > subsequently.
> > > > 
> > > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > > > 
> > > > [1] http://inbox.dpdk.org/dev/ef7c1a87-79ab-e405-4202-39b7ad6b0c71@solarflare.com/t/#u
> > > > ---
> > > >  app/test-bbdev/meson.build            |  4 ++--
> > > >  app/test-crypto-perf/meson.build      |  2 +-
> > > >  app/test-pmd/meson.build              | 12 ++++++------
> > > >  app/test/meson.build                  |  8 ++++----
> > > >  doc/guides/rel_notes/deprecation.rst  |  8 ++++++++
> > > >  drivers/baseband/meson.build          |  1 -
> > > >  drivers/bus/meson.build               |  1 -
> > > >  drivers/common/meson.build            |  1 -
> > > >  drivers/common/mlx5/meson.build       |  1 -
> > > >  drivers/common/qat/meson.build        |  1 -
> > > >  drivers/compress/meson.build          |  1 -
> > > >  drivers/compress/octeontx/meson.build |  2 +-
> > > >  drivers/crypto/meson.build            |  1 -
> > > >  drivers/crypto/null/meson.build       |  2 +-
> > > >  drivers/crypto/octeontx/meson.build   |  2 +-
> > > >  drivers/crypto/octeontx2/meson.build  |  2 +-
> > > >  drivers/crypto/scheduler/meson.build  |  2 +-
> > > >  drivers/crypto/virtio/meson.build     |  2 +-
> > > >  drivers/event/dpaa/meson.build        |  2 +-
> > > >  drivers/event/dpaa2/meson.build       |  2 +-
> > > >  drivers/event/meson.build             |  1 -
> > > >  drivers/event/octeontx/meson.build    |  2 +-
> > > >  drivers/event/octeontx2/meson.build   |  2 +-
> > > >  drivers/mempool/meson.build           |  1 -
> > > >  drivers/meson.build                   |  9 ++++-----
> > > >  drivers/net/meson.build               |  1 -
> > > >  drivers/net/mlx4/meson.build          |  2 +-
> > > >  drivers/raw/ifpga/meson.build         |  2 +-
> > > >  drivers/raw/meson.build               |  1 -
> > > >  drivers/regex/meson.build             |  1 -
> > > >  drivers/vdpa/meson.build              |  1 -
> > > >  examples/bond/meson.build             |  2 +-
> > > >  examples/ethtool/meson.build          |  2 +-
> > > >  examples/ioat/meson.build             |  2 +-
> > > >  examples/l2fwd-crypto/meson.build     |  2 +-
> > > >  examples/ntb/meson.build              |  2 +-
> > > >  examples/vm_power_manager/meson.build |  6 +++---
> > > >  lib/librte_ethdev/meson.build         |  1 -
> > > >  lib/librte_graph/meson.build          |  2 --
> > > >  lib/meson.build                       |  3 ++-
> > > >  40 files changed, 47 insertions(+), 55 deletions(-)
> > > 
> > > Does this change the share object file names too, or only the macros?
> > > 
> > 
> > It does indeed change the object name files, which is a little bit
> > concerning. However, the consensus based on the RFC seemed to be that the
> > benefit is likely worth the change. If we want, we can look to use symlinks
> > to the old names on install, but I think that just delays the pain since I
> > would expect few to actually change their build to the new names until the
> > old ones and the symlinks completely go away.
> > 
> > /Bruce
> 
> It is a backward incompatible change, so we need to provide symlinks,
> right? On upgrade, programs linked to librte_old.so will fail to start.
> Or was this targeted at 20.11 thus piggy-backing on the ABI change
> which forces a re-link?
> 
More of the latter, and the fact that changing the build system involved a
few library renames anyway for those using make. Since the ABI is changing
this release, and all the libs have a new major version number there is no
requirement for libs linked against an older version to work, and since
pkg-config should now be used for linking the actual names should not be
a concern.

That's the thinking anyway. :-)

/Bruce
  
Luca Boccassi Oct. 15, 2020, 3:32 p.m. UTC | #5
On Thu, 2020-10-15 at 15:03 +0100, Bruce Richardson wrote:
> On Thu, Oct 15, 2020 at 02:05:37PM +0100, Luca Boccassi wrote:
> > On Thu, 2020-10-15 at 12:18 +0100, Bruce Richardson wrote:
> > > On Thu, Oct 15, 2020 at 11:30:29AM +0100, Luca Boccassi wrote:
> > > > On Wed, 2020-10-14 at 15:13 +0100, Bruce Richardson wrote:
> > > > > As discussed on the dpdk-dev mailing list[1], we can make some easy
> > > > > improvements in standardizing the naming of the various components in DPDK,
> > > > > and their associated feature-enabled macros.
> > > > > 
> > > > > Following this patch, each library will have the name in format,
> > > > > 'librte_<name>.so', and the macro indicating that library is enabled in the
> > > > > build will have the form 'RTE_LIB_<NAME>'.
> > > > > 
> > > > > Similarly, for libraries, the equivalent name formats and macros are:
> > > > > 'librte_<class>_<name>.so' and 'RTE_<CLASS>_<NAME>', where class is the
> > > > > device type taken from the relevant driver subdirectory name, i.e. 'net',
> > > > > 'crypto' etc.
> > > > > 
> > > > > To avoid too many changes at once for end applications, the old macro names
> > > > > will still be provided in the build in this release, but will be removed
> > > > > subsequently.
> > > > > 
> > > > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > > > > 
> > > > > [1] http://inbox.dpdk.org/dev/ef7c1a87-79ab-e405-4202-39b7ad6b0c71@solarflare.com/t/#u
> > > > > ---
> > > > >  app/test-bbdev/meson.build            |  4 ++--
> > > > >  app/test-crypto-perf/meson.build      |  2 +-
> > > > >  app/test-pmd/meson.build              | 12 ++++++------
> > > > >  app/test/meson.build                  |  8 ++++----
> > > > >  doc/guides/rel_notes/deprecation.rst  |  8 ++++++++
> > > > >  drivers/baseband/meson.build          |  1 -
> > > > >  drivers/bus/meson.build               |  1 -
> > > > >  drivers/common/meson.build            |  1 -
> > > > >  drivers/common/mlx5/meson.build       |  1 -
> > > > >  drivers/common/qat/meson.build        |  1 -
> > > > >  drivers/compress/meson.build          |  1 -
> > > > >  drivers/compress/octeontx/meson.build |  2 +-
> > > > >  drivers/crypto/meson.build            |  1 -
> > > > >  drivers/crypto/null/meson.build       |  2 +-
> > > > >  drivers/crypto/octeontx/meson.build   |  2 +-
> > > > >  drivers/crypto/octeontx2/meson.build  |  2 +-
> > > > >  drivers/crypto/scheduler/meson.build  |  2 +-
> > > > >  drivers/crypto/virtio/meson.build     |  2 +-
> > > > >  drivers/event/dpaa/meson.build        |  2 +-
> > > > >  drivers/event/dpaa2/meson.build       |  2 +-
> > > > >  drivers/event/meson.build             |  1 -
> > > > >  drivers/event/octeontx/meson.build    |  2 +-
> > > > >  drivers/event/octeontx2/meson.build   |  2 +-
> > > > >  drivers/mempool/meson.build           |  1 -
> > > > >  drivers/meson.build                   |  9 ++++-----
> > > > >  drivers/net/meson.build               |  1 -
> > > > >  drivers/net/mlx4/meson.build          |  2 +-
> > > > >  drivers/raw/ifpga/meson.build         |  2 +-
> > > > >  drivers/raw/meson.build               |  1 -
> > > > >  drivers/regex/meson.build             |  1 -
> > > > >  drivers/vdpa/meson.build              |  1 -
> > > > >  examples/bond/meson.build             |  2 +-
> > > > >  examples/ethtool/meson.build          |  2 +-
> > > > >  examples/ioat/meson.build             |  2 +-
> > > > >  examples/l2fwd-crypto/meson.build     |  2 +-
> > > > >  examples/ntb/meson.build              |  2 +-
> > > > >  examples/vm_power_manager/meson.build |  6 +++---
> > > > >  lib/librte_ethdev/meson.build         |  1 -
> > > > >  lib/librte_graph/meson.build          |  2 --
> > > > >  lib/meson.build                       |  3 ++-
> > > > >  40 files changed, 47 insertions(+), 55 deletions(-)
> > > > 
> > > > Does this change the share object file names too, or only the macros?
> > > > 
> > > 
> > > It does indeed change the object name files, which is a little bit
> > > concerning. However, the consensus based on the RFC seemed to be that the
> > > benefit is likely worth the change. If we want, we can look to use symlinks
> > > to the old names on install, but I think that just delays the pain since I
> > > would expect few to actually change their build to the new names until the
> > > old ones and the symlinks completely go away.
> > > 
> > > /Bruce
> > 
> > It is a backward incompatible change, so we need to provide symlinks,
> > right? On upgrade, programs linked to librte_old.so will fail to start.
> > Or was this targeted at 20.11 thus piggy-backing on the ABI change
> > which forces a re-link?
> > 
> More of the latter, and the fact that changing the build system involved a
> few library renames anyway for those using make. Since the ABI is changing
> this release, and all the libs have a new major version number there is no
> requirement for libs linked against an older version to work, and since
> pkg-config should now be used for linking the actual names should not be
> a concern.
> 
> That's the thinking anyway. :-)
> 
> /Bruce

Ok that makes sense, I wasn't sure if this series was targeted for
20.11 or for later. In that case,

Acked-by: Luca Boccassi <bluca@debian.org>
  
Bruce Richardson Oct. 15, 2020, 3:34 p.m. UTC | #6
On Thu, Oct 15, 2020 at 04:32:35PM +0100, Luca Boccassi wrote:
> On Thu, 2020-10-15 at 15:03 +0100, Bruce Richardson wrote:
> > On Thu, Oct 15, 2020 at 02:05:37PM +0100, Luca Boccassi wrote:
> > > On Thu, 2020-10-15 at 12:18 +0100, Bruce Richardson wrote:
> > > > On Thu, Oct 15, 2020 at 11:30:29AM +0100, Luca Boccassi wrote:
> > > > > On Wed, 2020-10-14 at 15:13 +0100, Bruce Richardson wrote:
> > > > > > As discussed on the dpdk-dev mailing list[1], we can make some easy
> > > > > > improvements in standardizing the naming of the various components in DPDK,
> > > > > > and their associated feature-enabled macros.
> > > > > > 
> > > > > > Following this patch, each library will have the name in format,
> > > > > > 'librte_<name>.so', and the macro indicating that library is enabled in the
> > > > > > build will have the form 'RTE_LIB_<NAME>'.
> > > > > > 
> > > > > > Similarly, for libraries, the equivalent name formats and macros are:
> > > > > > 'librte_<class>_<name>.so' and 'RTE_<CLASS>_<NAME>', where class is the
> > > > > > device type taken from the relevant driver subdirectory name, i.e. 'net',
> > > > > > 'crypto' etc.
> > > > > > 
> > > > > > To avoid too many changes at once for end applications, the old macro names
> > > > > > will still be provided in the build in this release, but will be removed
> > > > > > subsequently.
> > > > > > 
> > > > > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > > > > > 
> > > > > > [1] http://inbox.dpdk.org/dev/ef7c1a87-79ab-e405-4202-39b7ad6b0c71@solarflare.com/t/#u
> > > > > > ---
> > > > > >  app/test-bbdev/meson.build            |  4 ++--
> > > > > >  app/test-crypto-perf/meson.build      |  2 +-
> > > > > >  app/test-pmd/meson.build              | 12 ++++++------
> > > > > >  app/test/meson.build                  |  8 ++++----
> > > > > >  doc/guides/rel_notes/deprecation.rst  |  8 ++++++++
> > > > > >  drivers/baseband/meson.build          |  1 -
> > > > > >  drivers/bus/meson.build               |  1 -
> > > > > >  drivers/common/meson.build            |  1 -
> > > > > >  drivers/common/mlx5/meson.build       |  1 -
> > > > > >  drivers/common/qat/meson.build        |  1 -
> > > > > >  drivers/compress/meson.build          |  1 -
> > > > > >  drivers/compress/octeontx/meson.build |  2 +-
> > > > > >  drivers/crypto/meson.build            |  1 -
> > > > > >  drivers/crypto/null/meson.build       |  2 +-
> > > > > >  drivers/crypto/octeontx/meson.build   |  2 +-
> > > > > >  drivers/crypto/octeontx2/meson.build  |  2 +-
> > > > > >  drivers/crypto/scheduler/meson.build  |  2 +-
> > > > > >  drivers/crypto/virtio/meson.build     |  2 +-
> > > > > >  drivers/event/dpaa/meson.build        |  2 +-
> > > > > >  drivers/event/dpaa2/meson.build       |  2 +-
> > > > > >  drivers/event/meson.build             |  1 -
> > > > > >  drivers/event/octeontx/meson.build    |  2 +-
> > > > > >  drivers/event/octeontx2/meson.build   |  2 +-
> > > > > >  drivers/mempool/meson.build           |  1 -
> > > > > >  drivers/meson.build                   |  9 ++++-----
> > > > > >  drivers/net/meson.build               |  1 -
> > > > > >  drivers/net/mlx4/meson.build          |  2 +-
> > > > > >  drivers/raw/ifpga/meson.build         |  2 +-
> > > > > >  drivers/raw/meson.build               |  1 -
> > > > > >  drivers/regex/meson.build             |  1 -
> > > > > >  drivers/vdpa/meson.build              |  1 -
> > > > > >  examples/bond/meson.build             |  2 +-
> > > > > >  examples/ethtool/meson.build          |  2 +-
> > > > > >  examples/ioat/meson.build             |  2 +-
> > > > > >  examples/l2fwd-crypto/meson.build     |  2 +-
> > > > > >  examples/ntb/meson.build              |  2 +-
> > > > > >  examples/vm_power_manager/meson.build |  6 +++---
> > > > > >  lib/librte_ethdev/meson.build         |  1 -
> > > > > >  lib/librte_graph/meson.build          |  2 --
> > > > > >  lib/meson.build                       |  3 ++-
> > > > > >  40 files changed, 47 insertions(+), 55 deletions(-)
> > > > > 
> > > > > Does this change the share object file names too, or only the macros?
> > > > > 
> > > > 
> > > > It does indeed change the object name files, which is a little bit
> > > > concerning. However, the consensus based on the RFC seemed to be that the
> > > > benefit is likely worth the change. If we want, we can look to use symlinks
> > > > to the old names on install, but I think that just delays the pain since I
> > > > would expect few to actually change their build to the new names until the
> > > > old ones and the symlinks completely go away.
> > > > 
> > > > /Bruce
> > > 
> > > It is a backward incompatible change, so we need to provide symlinks,
> > > right? On upgrade, programs linked to librte_old.so will fail to start.
> > > Or was this targeted at 20.11 thus piggy-backing on the ABI change
> > > which forces a re-link?
> > > 
> > More of the latter, and the fact that changing the build system involved a
> > few library renames anyway for those using make. Since the ABI is changing
> > this release, and all the libs have a new major version number there is no
> > requirement for libs linked against an older version to work, and since
> > pkg-config should now be used for linking the actual names should not be
> > a concern.
> > 
> > That's the thinking anyway. :-)
> > 
> > /Bruce
> 
> Ok that makes sense, I wasn't sure if this series was targeted for
> 20.11 or for later. In that case,
> 
> Acked-by: Luca Boccassi <bluca@debian.org>
>

Yes, if it doesn't make 20.11 we'll have to re-evaluate and be stricter
with the compatibility constraints. It might not be worth doing post-20.11.
  

Patch

diff --git a/app/test-bbdev/meson.build b/app/test-bbdev/meson.build
index 18ab6a8c6..178306b08 100644
--- a/app/test-bbdev/meson.build
+++ b/app/test-bbdev/meson.build
@@ -7,8 +7,8 @@  sources = files('main.c',
 		'test_bbdev_vector.c')
 deps += ['bbdev', 'bus_vdev']
 if dpdk_conf.has('RTE_LIBRTE_PMD_BBDEV_FPGA_LTE_FEC')
-	deps += ['pmd_bbdev_fpga_lte_fec']
+	deps += ['baseband_fpga_lte_fec']
 endif
 if dpdk_conf.has('RTE_LIBRTE_PMD_BBDEV_FPGA_5GNR_FEC')
-	deps += ['pmd_bbdev_fpga_5gnr_fec']
+	deps += ['baseband_fpga_5gnr_fec']
 endif
diff --git a/app/test-crypto-perf/meson.build b/app/test-crypto-perf/meson.build
index 4bd71510d..e6ddda6f0 100644
--- a/app/test-crypto-perf/meson.build
+++ b/app/test-crypto-perf/meson.build
@@ -13,5 +13,5 @@  sources = files('cperf_ops.c',
 		'main.c')
 deps += ['cryptodev', 'net', 'security']
 if dpdk_conf.has('RTE_LIBRTE_PMD_CRYPTO_SCHEDULER')
-	deps += 'pmd_crypto_scheduler'
+	deps += 'crypto_scheduler'
 endif
diff --git a/app/test-pmd/meson.build b/app/test-pmd/meson.build
index 0d9e45049..2e8b9f8a9 100644
--- a/app/test-pmd/meson.build
+++ b/app/test-pmd/meson.build
@@ -38,22 +38,22 @@  if dpdk_conf.has('RTE_LIBRTE_LATENCYSTATS')
 	deps += 'latencystats'
 endif
 if dpdk_conf.has('RTE_LIBRTE_PMD_CRYPTO_SCHEDULER')
-	deps += 'pmd_crypto_scheduler'
+	deps += 'crypto_scheduler'
 endif
 if dpdk_conf.has('RTE_LIBRTE_BOND_PMD')
-	deps += 'pmd_bond'
+	deps += 'net_bond'
 endif
 if dpdk_conf.has('RTE_LIBRTE_BNXT_PMD')
-	deps += 'pmd_bnxt'
+	deps += 'net_bnxt'
 endif
 if dpdk_conf.has('RTE_LIBRTE_I40E_PMD')
-	deps += 'pmd_i40e'
+	deps += 'net_i40e'
 endif
 if dpdk_conf.has('RTE_LIBRTE_IXGBE_PMD')
-	deps += 'pmd_ixgbe'
+	deps += 'net_ixgbe'
 endif
 if dpdk_conf.has('RTE_LIBRTE_DPAA_PMD')
-	deps += ['bus_dpaa', 'mempool_dpaa', 'pmd_dpaa']
+	deps += ['bus_dpaa', 'mempool_dpaa', 'net_dpaa']
 endif
 if dpdk_conf.has('RTE_LIBRTE_BPF')
 	sources += files('bpf_cmd.c')
diff --git a/app/test/meson.build b/app/test/meson.build
index fc90a1909..c5ce1d2c0 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -345,7 +345,7 @@  if dpdk_conf.has('RTE_LIBRTE_STACK_MEMPOOL')
 	test_deps += 'mempool_stack'
 endif
 if dpdk_conf.has('RTE_LIBRTE_SKELETON_EVENTDEV_PMD')
-	test_deps += 'pmd_skeleton_event'
+	test_deps += 'event_skeleton'
 endif
 if dpdk_conf.has('RTE_LIBRTE_TELEMETRY')
 	test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c']
@@ -355,7 +355,7 @@  endif
 # The following linkages of drivers are required because
 # they are used via a driver-specific API.
 if dpdk_conf.has('RTE_LIBRTE_BOND_PMD')
-	test_deps += 'pmd_bond'
+	test_deps += 'net_bond'
 	test_sources += ['test_link_bonding.c', 'test_link_bonding_rssconf.c']
 	driver_test_names += ['link_bonding_autotest', 'link_bonding_rssconf_autotest']
 	if dpdk_conf.has('RTE_LIBRTE_RING_PMD')
@@ -364,7 +364,7 @@  if dpdk_conf.has('RTE_LIBRTE_BOND_PMD')
 	endif
 endif
 if dpdk_conf.has('RTE_LIBRTE_RING_PMD')
-	test_deps += 'pmd_ring'
+	test_deps += 'net_ring'
 	test_sources += 'test_pmd_ring_perf.c'
 	test_sources += 'test_pmd_ring.c'
 	test_sources += 'test_event_eth_tx_adapter.c'
@@ -415,7 +415,7 @@  endif
 
 if dpdk_conf.has('RTE_LIBRTE_PMD_CRYPTO_SCHEDULER')
 	driver_test_names += 'cryptodev_scheduler_autotest'
-	test_deps += 'pmd_crypto_scheduler'
+	test_deps += 'crypto_scheduler'
 endif
 
 foreach d:test_deps
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 584e72087..69e3ef91c 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -11,6 +11,14 @@  here.
 Deprecation Notices
 -------------------
 
+* build: The macros defined to indicate which DPDK libraries and drivers
+  are included in the meson build are changing to a standardized format of
+  ``RTE_LIB_<NAME>`` and ``RTE_<CLASS>_<NAME>``, where ``NAME`` is the
+  upper-case component name, e.g. EAL, ETHDEV, IXGBE, and ``CLASS`` is the
+  upper-case name of the device class to which a driver belongs e.g.
+  ``NET``, ``CRYPTO``, ``VDPA``. The old macros are deprecated and will be
+  removed in a future release.
+
 * meson: The minimum supported version of meson for configuring and building
   DPDK will be increased to v0.47.1 (from 0.41) from DPDK 19.05 onwards. For
   those users with a version earlier than 0.47.1, an updated copy of meson
diff --git a/drivers/baseband/meson.build b/drivers/baseband/meson.build
index 415b6724b..7e1b64ffd 100644
--- a/drivers/baseband/meson.build
+++ b/drivers/baseband/meson.build
@@ -8,4 +8,3 @@  endif
 drivers = ['null', 'turbo_sw', 'fpga_lte_fec', 'fpga_5gnr_fec']
 
 config_flag_fmt = 'RTE_LIBRTE_PMD_BBDEV_@0@'
-driver_name_fmt = 'rte_pmd_bbdev_@0@'
diff --git a/drivers/bus/meson.build b/drivers/bus/meson.build
index 80de2d91d..bd73efd18 100644
--- a/drivers/bus/meson.build
+++ b/drivers/bus/meson.build
@@ -4,4 +4,3 @@ 
 drivers = ['dpaa', 'fslmc', 'ifpga', 'pci', 'vdev', 'vmbus']
 std_deps = ['eal']
 config_flag_fmt = 'RTE_LIBRTE_@0@_BUS'
-driver_name_fmt = 'rte_bus_@0@'
diff --git a/drivers/common/meson.build b/drivers/common/meson.build
index abb4f1529..d78882f05 100644
--- a/drivers/common/meson.build
+++ b/drivers/common/meson.build
@@ -8,4 +8,3 @@  endif
 std_deps = ['eal']
 drivers = ['cpt', 'dpaax', 'iavf', 'mvep', 'octeontx', 'octeontx2', 'sfc_efx']
 config_flag_fmt = 'RTE_LIBRTE_@0@_COMMON'
-driver_name_fmt = 'rte_common_@0@'
diff --git a/drivers/common/mlx5/meson.build b/drivers/common/mlx5/meson.build
index 8e5608703..3dacc6f68 100644
--- a/drivers/common/mlx5/meson.build
+++ b/drivers/common/mlx5/meson.build
@@ -8,7 +8,6 @@  if not is_linux
 endif
 
 config_flag_fmt = 'RTE_LIBRTE_@0@_COMMON'
-driver_name_fmt = 'rte_common_@0@'
 deps += ['hash', 'pci', 'bus_pci', 'net', 'eal', 'kvargs']
 sources += files(
 	'mlx5_devx_cmds.c',
diff --git a/drivers/common/qat/meson.build b/drivers/common/qat/meson.build
index 3409162d0..fdf8b84f8 100644
--- a/drivers/common/qat/meson.build
+++ b/drivers/common/qat/meson.build
@@ -2,7 +2,6 @@ 
 # Copyright(c) 2017-2018 Intel Corporation
 
 config_flag_fmt = 'RTE_LIBRTE_@0@_COMMON'
-driver_name_fmt = 'rte_common_@0@'
 
 qat_crypto = true
 qat_crypto_path = 'crypto/qat'
diff --git a/drivers/compress/meson.build b/drivers/compress/meson.build
index 3a4723c0c..33f5e33dd 100644
--- a/drivers/compress/meson.build
+++ b/drivers/compress/meson.build
@@ -9,4 +9,3 @@  drivers = ['isal', 'octeontx', 'zlib']
 
 std_deps = ['compressdev'] # compressdev pulls in all other needed deps
 config_flag_fmt = 'RTE_LIBRTE_PMD_@0@'
-driver_name_fmt = 'rte_pmd_@0@'
diff --git a/drivers/compress/octeontx/meson.build b/drivers/compress/octeontx/meson.build
index 0dc98b762..2d71b4da2 100644
--- a/drivers/compress/octeontx/meson.build
+++ b/drivers/compress/octeontx/meson.build
@@ -1,7 +1,7 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Cavium, Inc
 
-name = 'octeontx_compress'
+fmt_name = 'octeontx_compress'
 sources = files('otx_zip.c', 'otx_zip_pmd.c')
 includes += include_directories('include')
 deps += ['mempool_octeontx', 'bus_pci']
diff --git a/drivers/crypto/meson.build b/drivers/crypto/meson.build
index bd7a940e6..fa5c7ef3a 100644
--- a/drivers/crypto/meson.build
+++ b/drivers/crypto/meson.build
@@ -26,4 +26,3 @@  drivers = ['aesni_gcm',
 
 std_deps = ['cryptodev'] # cryptodev pulls in all other needed deps
 config_flag_fmt = 'RTE_LIBRTE_PMD_@0@'
-driver_name_fmt = 'rte_pmd_@0@'
diff --git a/drivers/crypto/null/meson.build b/drivers/crypto/null/meson.build
index 502336da2..421414916 100644
--- a/drivers/crypto/null/meson.build
+++ b/drivers/crypto/null/meson.build
@@ -2,5 +2,5 @@ 
 # Copyright(c) 2017 Intel Corporation
 
 deps += 'bus_vdev'
-name = 'null_crypto'
+fmt_name = 'null_crypto'
 sources = files('null_crypto_pmd.c', 'null_crypto_pmd_ops.c')
diff --git a/drivers/crypto/octeontx/meson.build b/drivers/crypto/octeontx/meson.build
index cf031b006..d6939720d 100644
--- a/drivers/crypto/octeontx/meson.build
+++ b/drivers/crypto/octeontx/meson.build
@@ -7,7 +7,7 @@  endif
 
 deps += ['bus_pci']
 deps += ['common_cpt']
-name = 'octeontx_crypto'
+fmt_name = 'octeontx_crypto'
 
 sources = files('otx_cryptodev.c',
 		'otx_cryptodev_capabilities.c',
diff --git a/drivers/crypto/octeontx2/meson.build b/drivers/crypto/octeontx2/meson.build
index 148ec184a..bf502e247 100644
--- a/drivers/crypto/octeontx2/meson.build
+++ b/drivers/crypto/octeontx2/meson.build
@@ -11,7 +11,7 @@  deps += ['common_cpt']
 deps += ['common_octeontx2']
 deps += ['ethdev']
 deps += ['security']
-name = 'octeontx2_crypto'
+fmt_name = 'octeontx2_crypto'
 
 sources = files('otx2_cryptodev.c',
 		'otx2_cryptodev_capabilities.c',
diff --git a/drivers/crypto/scheduler/meson.build b/drivers/crypto/scheduler/meson.build
index c5ba2d680..2209c5023 100644
--- a/drivers/crypto/scheduler/meson.build
+++ b/drivers/crypto/scheduler/meson.build
@@ -2,7 +2,7 @@ 
 # Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
 
 deps += ['bus_vdev', 'reorder']
-name = 'crypto_scheduler'
+fmt_name = 'crypto_scheduler'
 sources = files(
 	'rte_cryptodev_scheduler.c',
 	'scheduler_failover.c',
diff --git a/drivers/crypto/virtio/meson.build b/drivers/crypto/virtio/meson.build
index b15b3f9fa..6cea782de 100644
--- a/drivers/crypto/virtio/meson.build
+++ b/drivers/crypto/virtio/meson.build
@@ -3,6 +3,6 @@ 
 
 includes += include_directories('../../../lib/librte_vhost')
 deps += 'bus_pci'
-name = 'virtio_crypto'
+fmt_name = 'virtio_crypto'
 sources = files('virtio_cryptodev.c', 'virtio_pci.c',
 		'virtio_rxtx.c', 'virtqueue.c')
diff --git a/drivers/event/dpaa/meson.build b/drivers/event/dpaa/meson.build
index 2f761f8e5..9abb75e3e 100644
--- a/drivers/event/dpaa/meson.build
+++ b/drivers/event/dpaa/meson.build
@@ -5,7 +5,7 @@  if not is_linux
 	build = false
 	reason = 'only supported on linux'
 endif
-deps += ['pmd_dpaa', 'pmd_dpaa_sec']
+deps += ['net_dpaa', 'crypto_dpaa_sec']
 sources = files('dpaa_eventdev.c')
 
 includes += include_directories('../../crypto/dpaa_sec/')
diff --git a/drivers/event/dpaa2/meson.build b/drivers/event/dpaa2/meson.build
index 71c8be3d6..4ead7bb3e 100644
--- a/drivers/event/dpaa2/meson.build
+++ b/drivers/event/dpaa2/meson.build
@@ -5,7 +5,7 @@  if not is_linux
 	build = false
 	reason = 'only supported on linux'
 endif
-deps += ['bus_vdev', 'pmd_dpaa2', 'pmd_dpaa2_sec']
+deps += ['bus_vdev', 'net_dpaa2', 'crypto_dpaa2_sec']
 sources = files('dpaa2_hw_dpcon.c',
 		'dpaa2_eventdev.c',
 		'dpaa2_eventdev_selftest.c')
diff --git a/drivers/event/meson.build b/drivers/event/meson.build
index f2a343147..a7dac99de 100644
--- a/drivers/event/meson.build
+++ b/drivers/event/meson.build
@@ -12,4 +12,3 @@  if not (toolchain == 'gcc' and cc.version().version_compare('<4.8.6') and
 endif
 std_deps = ['eventdev', 'kvargs']
 config_flag_fmt = 'RTE_LIBRTE_PMD_@0@_EVENTDEV'
-driver_name_fmt = 'rte_pmd_@0@_event'
diff --git a/drivers/event/octeontx/meson.build b/drivers/event/octeontx/meson.build
index 2b74bb62d..41e367684 100644
--- a/drivers/event/octeontx/meson.build
+++ b/drivers/event/octeontx/meson.build
@@ -10,4 +10,4 @@  sources = files('ssovf_worker.c',
 		'timvf_probe.c'
 )
 
-deps += ['common_octeontx', 'mempool_octeontx', 'bus_vdev', 'pmd_octeontx']
+deps += ['common_octeontx', 'mempool_octeontx', 'bus_vdev', 'net_octeontx']
diff --git a/drivers/event/octeontx2/meson.build b/drivers/event/octeontx2/meson.build
index 0ade51cec..3e5eb37d2 100644
--- a/drivers/event/octeontx2/meson.build
+++ b/drivers/event/octeontx2/meson.build
@@ -24,6 +24,6 @@  foreach flag: extra_flags
 	endif
 endforeach
 
-deps += ['bus_pci', 'common_octeontx2', 'mempool_octeontx2', 'pmd_octeontx2']
+deps += ['bus_pci', 'common_octeontx2', 'mempool_octeontx2', 'net_octeontx2']
 
 includes += include_directories('../../crypto/octeontx2')
diff --git a/drivers/mempool/meson.build b/drivers/mempool/meson.build
index 7520e489f..a6ddd35b2 100644
--- a/drivers/mempool/meson.build
+++ b/drivers/mempool/meson.build
@@ -4,4 +4,3 @@ 
 drivers = ['bucket', 'dpaa', 'dpaa2', 'octeontx', 'octeontx2', 'ring', 'stack']
 std_deps = ['mempool']
 config_flag_fmt = 'RTE_LIBRTE_@0@_MEMPOOL'
-driver_name_fmt = 'rte_mempool_@0@'
diff --git a/drivers/meson.build b/drivers/meson.build
index 3d4bbff13..a5a6fed06 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -33,9 +33,6 @@  foreach subpath:subdirs
 	drivers = []
 	std_deps = []
 	config_flag_fmt = '' # format string used to set the value in dpdk_conf
-	driver_name_fmt = '' # format string for driver name, used to name
-	                     # the library, the dependency and to find the
-	                     # version file for linking
 
 	# subpath can be either "class" or "class/driver"
 	if subpath.contains('/')
@@ -113,11 +110,14 @@  foreach subpath:subdirs
 			endif
 		else
 			enabled_drivers += name
+			lib_name = '_'.join(['rte', class, name])
+			dpdk_conf.set(lib_name.to_upper(), 1)
 
 			if fmt_name == ''
 				fmt_name = name
 			endif
-			dpdk_conf.set(config_flag_fmt.format(fmt_name.to_upper()),1)
+
+			dpdk_conf.set(config_flag_fmt.format(fmt_name.to_upper()),1) #old-style macro
 			# for driver compatibility, since we changed the
 			# default to match that of make. Remove in future release
 			# after following deprecation process
@@ -133,7 +133,6 @@  foreach subpath:subdirs
 				dpdk_conf.set(alt_flag_fmt.format(
 						fmt_name.to_upper()), 1)
 			endif
-			lib_name = driver_name_fmt.format(fmt_name)
 
 			dpdk_extra_ldflags += pkgconfig_extra_libs
 
diff --git a/drivers/net/meson.build b/drivers/net/meson.build
index d56b24051..4e4c2c976 100644
--- a/drivers/net/meson.build
+++ b/drivers/net/meson.build
@@ -59,4 +59,3 @@  std_deps = ['ethdev', 'kvargs'] # 'ethdev' also pulls in mbuf, net, eal etc
 std_deps += ['bus_pci']         # very many PMDs depend on PCI, so make std
 std_deps += ['bus_vdev']        # same with vdev bus
 config_flag_fmt = 'RTE_LIBRTE_@0@_PMD'
-driver_name_fmt = 'rte_pmd_@0@'
diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build
index 5a25e11a7..404006515 100644
--- a/drivers/net/mlx4/meson.build
+++ b/drivers/net/mlx4/meson.build
@@ -116,7 +116,7 @@  configure_file(output : 'mlx4_autoconf.h', configuration : config)
 # Build Glue Library
 if dlopen_ibverbs
 	dlopen_name = 'mlx4_glue'
-	dlopen_lib_name = driver_name_fmt.format(dlopen_name)
+	dlopen_lib_name = 'rte_net_' + dlopen_name
 	dlopen_so_version = LIB_GLUE_VERSION
 	dlopen_sources = files('mlx4_glue.c')
 	dlopen_install_dir = [ eal_pmd_path + '-glue' ]
diff --git a/drivers/raw/ifpga/meson.build b/drivers/raw/ifpga/meson.build
index da454b194..027ff8056 100644
--- a/drivers/raw/ifpga/meson.build
+++ b/drivers/raw/ifpga/meson.build
@@ -11,7 +11,7 @@  subdir('base')
 objs = [base_objs]
 
 deps += ['ethdev', 'rawdev', 'pci', 'bus_pci', 'kvargs',
-	'bus_vdev', 'bus_ifpga', 'net', 'pmd_i40e', 'pmd_ipn3ke']
+	'bus_vdev', 'bus_ifpga', 'net', 'net_i40e', 'net_ipn3ke']
 
 sources = files('ifpga_rawdev.c')
 
diff --git a/drivers/raw/meson.build b/drivers/raw/meson.build
index 2c1e65ec7..d8d6cf582 100644
--- a/drivers/raw/meson.build
+++ b/drivers/raw/meson.build
@@ -12,4 +12,3 @@  drivers = ['dpaa2_cmdif', 'dpaa2_qdma',
 	'skeleton']
 std_deps = ['rawdev']
 config_flag_fmt = 'RTE_LIBRTE_PMD_@0@_RAWDEV'
-driver_name_fmt = 'rte_rawdev_@0@'
diff --git a/drivers/regex/meson.build b/drivers/regex/meson.build
index 79bb5d5df..880a1b4a3 100644
--- a/drivers/regex/meson.build
+++ b/drivers/regex/meson.build
@@ -4,4 +4,3 @@ 
 drivers = ['mlx5', 'octeontx2']
 std_deps = ['ethdev', 'kvargs'] # 'ethdev' also pulls in mbuf, net, eal etc
 config_flag_fmt = 'RTE_LIBRTE_@0@_PMD'
-driver_name_fmt = 'rte_pmd_@0@'
diff --git a/drivers/vdpa/meson.build b/drivers/vdpa/meson.build
index 798eb3830..b346e4308 100644
--- a/drivers/vdpa/meson.build
+++ b/drivers/vdpa/meson.build
@@ -10,4 +10,3 @@  drivers = ['ifc',
 std_deps = ['bus_pci', 'kvargs']
 std_deps += ['vhost']
 config_flag_fmt = 'RTE_LIBRTE_@0@_PMD'
-driver_name_fmt = 'rte_pmd_@0@'
diff --git a/examples/bond/meson.build b/examples/bond/meson.build
index 82e355a49..69382ffcd 100644
--- a/examples/bond/meson.build
+++ b/examples/bond/meson.build
@@ -6,7 +6,7 @@ 
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
-deps += 'pmd_bond'
+deps += 'net_bond'
 allow_experimental_apis = true
 sources = files(
 	'main.c'
diff --git a/examples/ethtool/meson.build b/examples/ethtool/meson.build
index bc7a35514..fdfdd1971 100644
--- a/examples/ethtool/meson.build
+++ b/examples/ethtool/meson.build
@@ -14,7 +14,7 @@  includes = include_directories('lib', 'ethtool-app')
 
 deps += 'bus_pci'
 if dpdk_conf.has('RTE_LIBRTE_IXGBE_PMD')
-	deps += 'pmd_ixgbe'
+	deps += 'net_ixgbe'
 endif
 
 allow_experimental_apis = true
diff --git a/examples/ioat/meson.build b/examples/ioat/meson.build
index f72cf70e7..f1a045a0a 100644
--- a/examples/ioat/meson.build
+++ b/examples/ioat/meson.build
@@ -9,7 +9,7 @@ 
 allow_experimental_apis = true
 build = dpdk_conf.has('RTE_LIBRTE_PMD_IOAT_RAWDEV')
 
-deps += ['rawdev_ioat']
+deps += ['raw_ioat']
 
 sources = files(
 	'ioatfwd.c'
diff --git a/examples/l2fwd-crypto/meson.build b/examples/l2fwd-crypto/meson.build
index 39e1604fa..9002d62a6 100644
--- a/examples/l2fwd-crypto/meson.build
+++ b/examples/l2fwd-crypto/meson.build
@@ -8,7 +8,7 @@ 
 
 deps += 'cryptodev'
 if dpdk_conf.has('RTE_LIBRTE_PMD_CRYPTO_SCHEDULER')
-	deps += 'pmd_crypto_scheduler'
+	deps += 'crypto_scheduler'
 endif
 allow_experimental_apis = true
 sources = files(
diff --git a/examples/ntb/meson.build b/examples/ntb/meson.build
index 45a59350c..bac6e5cd2 100644
--- a/examples/ntb/meson.build
+++ b/examples/ntb/meson.build
@@ -16,5 +16,5 @@  sources = files(
 	'ntb_fwd.c'
 )
 if dpdk_conf.has('RTE_LIBRTE_PMD_NTB_RAWDEV')
-	deps += 'rawdev_ntb'
+	deps += 'raw_ntb'
 endif
diff --git a/examples/vm_power_manager/meson.build b/examples/vm_power_manager/meson.build
index 54e2b584f..2dd132015 100644
--- a/examples/vm_power_manager/meson.build
+++ b/examples/vm_power_manager/meson.build
@@ -14,15 +14,15 @@  endif
 deps += ['power']
 
 if dpdk_conf.has('RTE_LIBRTE_BNXT_PMD')
-	deps += ['pmd_bnxt']
+	deps += ['net_bnxt']
 endif
 
 if dpdk_conf.has('RTE_LIBRTE_I40E_PMD')
-	deps += ['pmd_i40e']
+	deps += ['net_i40e']
 endif
 
 if dpdk_conf.has('RTE_LIBRTE_IXGBE_PMD')
-	deps += ['pmd_ixgbe']
+	deps += ['net_ixgbe']
 endif
 
 allow_experimental_apis = true
diff --git a/lib/librte_ethdev/meson.build b/lib/librte_ethdev/meson.build
index 8fc24e8c8..e4b610246 100644
--- a/lib/librte_ethdev/meson.build
+++ b/lib/librte_ethdev/meson.build
@@ -1,7 +1,6 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
-name = 'ethdev'
 sources = files('ethdev_private.c',
 	'ethdev_profile.c',
 	'ethdev_trace_points.c',
diff --git a/lib/librte_graph/meson.build b/lib/librte_graph/meson.build
index d5de1e250..d3ec78ca6 100644
--- a/lib/librte_graph/meson.build
+++ b/lib/librte_graph/meson.build
@@ -1,8 +1,6 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(C) 2020 Marvell International Ltd.
 
-name = 'graph'
-
 sources = files('node.c', 'graph.c', 'graph_ops.c', 'graph_debug.c', 'graph_stats.c', 'graph_populate.c')
 headers = files('rte_graph.h', 'rte_graph_worker.h')
 
diff --git a/lib/meson.build b/lib/meson.build
index 8761457c9..5f8177e1a 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -98,7 +98,8 @@  foreach l:libraries
 		set_variable(name.underscorify() + '_disable_reason', reason)
 	else
 		enabled_libs += name
-		dpdk_conf.set('RTE_LIBRTE_' + name.to_upper(), 1)
+		dpdk_conf.set('RTE_LIBRTE_' + name.to_upper(), 1) #old macro
+		dpdk_conf.set('RTE_LIB_' + name.to_upper(), 1) # new macro
 		install_headers(headers)
 
 		libname = 'rte_' + name