[07/15] net/liquidio: rename version map after library file name

Message ID 20180910200415.8340-8-bluca@debian.org (mailing list archive)
State Superseded, archived
Headers
Series rename PMDs map files to match library name and add Meson files |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Luca Boccassi Sept. 10, 2018, 8:04 p.m. UTC
  The library is called librte_pmd_lio, so rename the map file and set
the name in the meson file so that the built library names with meson
and legacy makefiles are the same

Fixes: bad475c03fee ("net/liquidio: add to meson build")
Cc: stable@dpdk.org

Signed-off-by: Luca Boccassi <bluca@debian.org>
---
 drivers/net/liquidio/Makefile                                   | 2 +-
 drivers/net/liquidio/meson.build                                | 1 +
 .../{rte_pmd_liquidio_version.map => rte_pmd_lio_version.map}   | 0
 3 files changed, 2 insertions(+), 1 deletion(-)
 rename drivers/net/liquidio/{rte_pmd_liquidio_version.map => rte_pmd_lio_version.map} (100%)
  

Comments

Bruce Richardson Sept. 11, 2018, 1:06 p.m. UTC | #1
On Mon, Sep 10, 2018 at 09:04:07PM +0100, Luca Boccassi wrote:
> The library is called librte_pmd_lio, so rename the map file and set
> the name in the meson file so that the built library names with meson
> and legacy makefiles are the same
> 
> Fixes: bad475c03fee ("net/liquidio: add to meson build")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Luca Boccassi <bluca@debian.org>

Rather than doing this renaming, can we instead add a symlink in the
install phase to map the old name to the new one? I'd like to see the
consistency of directory name, map filename and driver name enforced
strictly in the build system. Having exceptions is a pain.

/Bruce
  
Luca Boccassi Sept. 11, 2018, 1:09 p.m. UTC | #2
On Tue, 2018-09-11 at 14:06 +0100, Bruce Richardson wrote:
> On Mon, Sep 10, 2018 at 09:04:07PM +0100, Luca Boccassi wrote:
> > The library is called librte_pmd_lio, so rename the map file and
> > set
> > the name in the meson file so that the built library names with
> > meson
> > and legacy makefiles are the same
> > 
> > Fixes: bad475c03fee ("net/liquidio: add to meson build")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Luca Boccassi <bluca@debian.org>
> 
> Rather than doing this renaming, can we instead add a symlink in the
> install phase to map the old name to the new one? I'd like to see the
> consistency of directory name, map filename and driver name enforced
> strictly in the build system. Having exceptions is a pain.
> 
> /Bruce

We could, but the pain gets shifted on packagers then - what about
renaming the directory entirely to net/lio?
  
Bruce Richardson Sept. 11, 2018, 1:30 p.m. UTC | #3
On Tue, Sep 11, 2018 at 02:09:30PM +0100, Luca Boccassi wrote:
> On Tue, 2018-09-11 at 14:06 +0100, Bruce Richardson wrote:
> > On Mon, Sep 10, 2018 at 09:04:07PM +0100, Luca Boccassi wrote:
> > > The library is called librte_pmd_lio, so rename the map file and
> > > set
> > > the name in the meson file so that the built library names with
> > > meson
> > > and legacy makefiles are the same
> > > 
> > > Fixes: bad475c03fee ("net/liquidio: add to meson build")
> > > Cc: stable@dpdk.org
> > > 
> > > Signed-off-by: Luca Boccassi <bluca@debian.org>
> > 
> > Rather than doing this renaming, can we instead add a symlink in the
> > install phase to map the old name to the new one? I'd like to see the
> > consistency of directory name, map filename and driver name enforced
> > strictly in the build system. Having exceptions is a pain.
> > 
> > /Bruce
> 
> We could, but the pain gets shifted on packagers then - what about
> renaming the directory entirely to net/lio?
> 

It is still an issue with packagers if the symlinks are created as part of
the install step of DPDK itself (which is what I was intending)? I was
thinking of adding a new post-install script for the backward compatible
renames.

As for renaming the directory, I don't mind, but I'll let the driver
maintainers comment on their thoughts on it.

/Bruce
  
Bruce Richardson Sept. 11, 2018, 1:32 p.m. UTC | #4
On Tue, Sep 11, 2018 at 02:09:30PM +0100, Luca Boccassi wrote:
> On Tue, 2018-09-11 at 14:06 +0100, Bruce Richardson wrote:
> > On Mon, Sep 10, 2018 at 09:04:07PM +0100, Luca Boccassi wrote:
> > > The library is called librte_pmd_lio, so rename the map file and
> > > set
> > > the name in the meson file so that the built library names with
> > > meson
> > > and legacy makefiles are the same
> > > 
> > > Fixes: bad475c03fee ("net/liquidio: add to meson build")
> > > Cc: stable@dpdk.org
> > > 
> > > Signed-off-by: Luca Boccassi <bluca@debian.org>
> > 
> > Rather than doing this renaming, can we instead add a symlink in the
> > install phase to map the old name to the new one? I'd like to see the
> > consistency of directory name, map filename and driver name enforced
> > strictly in the build system. Having exceptions is a pain.
> > 
> > /Bruce
> 
> We could, but the pain gets shifted on packagers then - what about
> renaming the directory entirely to net/lio?

For packagers, what sort of ABI compatibility guarantees do you try and
keep between releases. Is this something that just needs a one-release ABI
announcement, as with other ABI changes?

/Bruce
  
Luca Boccassi Sept. 11, 2018, 1:38 p.m. UTC | #5
On Tue, 2018-09-11 at 14:30 +0100, Bruce Richardson wrote:
> On Tue, Sep 11, 2018 at 02:09:30PM +0100, Luca Boccassi wrote:
> > On Tue, 2018-09-11 at 14:06 +0100, Bruce Richardson wrote:
> > > On Mon, Sep 10, 2018 at 09:04:07PM +0100, Luca Boccassi wrote:
> > > > The library is called librte_pmd_lio, so rename the map file
> > > > and
> > > > set
> > > > the name in the meson file so that the built library names with
> > > > meson
> > > > and legacy makefiles are the same
> > > > 
> > > > Fixes: bad475c03fee ("net/liquidio: add to meson build")
> > > > Cc: stable@dpdk.org
> > > > 
> > > > Signed-off-by: Luca Boccassi <bluca@debian.org>
> > > 
> > > Rather than doing this renaming, can we instead add a symlink in
> > > the
> > > install phase to map the old name to the new one? I'd like to see
> > > the
> > > consistency of directory name, map filename and driver name
> > > enforced
> > > strictly in the build system. Having exceptions is a pain.
> > > 
> > > /Bruce
> > 
> > We could, but the pain gets shifted on packagers then - what about
> > renaming the directory entirely to net/lio?
> > 
> 
> It is still an issue with packagers if the symlinks are created as
> part of
> the install step of DPDK itself (which is what I was intending)? I
> was
> thinking of adding a new post-install script for the backward
> compatible
> renames.

At least for Debian/Ubuntu, if I tell the tools that package libfoo1
needs to have libfoo.so.1.2.3, that's what it will do, without
following symlinks. So a broken link will be installed in the system,
unless I start tracking what symlinks are there and adding them
manually to the package they belong to.
There's also the fact that by policy the library package names should
match the file name of the library and its ABI revision, so
libfoo.so.1.2.3 should be in libfoo1 pkg vy policy - if they mismatch,
some linters tools are going to yell at me at the very least.

> As for renaming the directory, I don't mind, but I'll let the driver
> maintainers comment on their thoughts on it.
> 
> /Bruce
  
Luca Boccassi Sept. 11, 2018, 1:41 p.m. UTC | #6
On Tue, 2018-09-11 at 14:32 +0100, Bruce Richardson wrote:
> On Tue, Sep 11, 2018 at 02:09:30PM +0100, Luca Boccassi wrote:
> > On Tue, 2018-09-11 at 14:06 +0100, Bruce Richardson wrote:
> > > On Mon, Sep 10, 2018 at 09:04:07PM +0100, Luca Boccassi wrote:
> > > > The library is called librte_pmd_lio, so rename the map file
> > > > and
> > > > set
> > > > the name in the meson file so that the built library names with
> > > > meson
> > > > and legacy makefiles are the same
> > > > 
> > > > Fixes: bad475c03fee ("net/liquidio: add to meson build")
> > > > Cc: stable@dpdk.org
> > > > 
> > > > Signed-off-by: Luca Boccassi <bluca@debian.org>
> > > 
> > > Rather than doing this renaming, can we instead add a symlink in
> > > the
> > > install phase to map the old name to the new one? I'd like to see
> > > the
> > > consistency of directory name, map filename and driver name
> > > enforced
> > > strictly in the build system. Having exceptions is a pain.
> > > 
> > > /Bruce
> > 
> > We could, but the pain gets shifted on packagers then - what about
> > renaming the directory entirely to net/lio?
> 
> For packagers, what sort of ABI compatibility guarantees do you try
> and
> keep between releases. Is this something that just needs a one-
> release ABI
> announcement, as with other ABI changes?
> 
> /Bruce

Currently in Debian/Ubuntu we are using the ABI override (because of
the sticky ABI breakage issue) so the filenames and package names are
different on every release anyway.

So in theory we could change the name of the libs and packages, but
what I'm mostly worried about is keeping consistency and some level of
compatibility between old and new build systems, isn't that an issue?
  
Bruce Richardson Sept. 11, 2018, 2:06 p.m. UTC | #7
On Tue, Sep 11, 2018 at 02:41:36PM +0100, Luca Boccassi wrote:
> On Tue, 2018-09-11 at 14:32 +0100, Bruce Richardson wrote:
> > On Tue, Sep 11, 2018 at 02:09:30PM +0100, Luca Boccassi wrote:
> > > On Tue, 2018-09-11 at 14:06 +0100, Bruce Richardson wrote:
> > > > On Mon, Sep 10, 2018 at 09:04:07PM +0100, Luca Boccassi wrote:
> > > > > The library is called librte_pmd_lio, so rename the map file
> > > > > and
> > > > > set
> > > > > the name in the meson file so that the built library names with
> > > > > meson
> > > > > and legacy makefiles are the same
> > > > > 
> > > > > Fixes: bad475c03fee ("net/liquidio: add to meson build")
> > > > > Cc: stable@dpdk.org
> > > > > 
> > > > > Signed-off-by: Luca Boccassi <bluca@debian.org>
> > > > 
> > > > Rather than doing this renaming, can we instead add a symlink in
> > > > the
> > > > install phase to map the old name to the new one? I'd like to see
> > > > the
> > > > consistency of directory name, map filename and driver name
> > > > enforced
> > > > strictly in the build system. Having exceptions is a pain.
> > > > 
> > > > /Bruce
> > > 
> > > We could, but the pain gets shifted on packagers then - what about
> > > renaming the directory entirely to net/lio?
> > 
> > For packagers, what sort of ABI compatibility guarantees do you try
> > and
> > keep between releases. Is this something that just needs a one-
> > release ABI
> > announcement, as with other ABI changes?
> > 
> > /Bruce
> 
> Currently in Debian/Ubuntu we are using the ABI override (because of
> the sticky ABI breakage issue) so the filenames and package names are
> different on every release anyway.
> 
> So in theory we could change the name of the libs and packages, but
> what I'm mostly worried about is keeping consistency and some level of
> compatibility between old and new build systems, isn't that an issue?
> 

It's a good question, and I suspect everyone will have their own opinion.

Personally, I take the view that moving build system involves quite a
number of changes anyway, so we should take the opportunity to clean up a
few other things at the same time. This is why I'm so keep on trying to
keep everything consistent as far as possible throughout the system and not
put in special cases. For many of these a) if we put in lots of name
overrides now we'll probably never get rid of them, and b) it's more likely
that future drivers will adopt the same technique to have different naming
of drivers and directories.

However, if keeping sonames consistent is a major concern, then perhaps we
should look to rename some directories, like you suggested before.

/Bruce
  
Luca Boccassi Sept. 11, 2018, 4:05 p.m. UTC | #8
On Tue, 2018-09-11 at 15:06 +0100, Bruce Richardson wrote:
> On Tue, Sep 11, 2018 at 02:41:36PM +0100, Luca Boccassi wrote:
> > On Tue, 2018-09-11 at 14:32 +0100, Bruce Richardson wrote:
> > > On Tue, Sep 11, 2018 at 02:09:30PM +0100, Luca Boccassi wrote:
> > > > On Tue, 2018-09-11 at 14:06 +0100, Bruce Richardson wrote:
> > > > > On Mon, Sep 10, 2018 at 09:04:07PM +0100, Luca Boccassi
> > > > > wrote:
> > > > > > The library is called librte_pmd_lio, so rename the map
> > > > > > file
> > > > > > and
> > > > > > set
> > > > > > the name in the meson file so that the built library names
> > > > > > with
> > > > > > meson
> > > > > > and legacy makefiles are the same
> > > > > > 
> > > > > > Fixes: bad475c03fee ("net/liquidio: add to meson build")
> > > > > > Cc: stable@dpdk.org
> > > > > > 
> > > > > > Signed-off-by: Luca Boccassi <bluca@debian.org>
> > > > > 
> > > > > Rather than doing this renaming, can we instead add a symlink
> > > > > in
> > > > > the
> > > > > install phase to map the old name to the new one? I'd like to
> > > > > see
> > > > > the
> > > > > consistency of directory name, map filename and driver name
> > > > > enforced
> > > > > strictly in the build system. Having exceptions is a pain.
> > > > > 
> > > > > /Bruce
> > > > 
> > > > We could, but the pain gets shifted on packagers then - what
> > > > about
> > > > renaming the directory entirely to net/lio?
> > > 
> > > For packagers, what sort of ABI compatibility guarantees do you
> > > try
> > > and
> > > keep between releases. Is this something that just needs a one-
> > > release ABI
> > > announcement, as with other ABI changes?
> > > 
> > > /Bruce
> > 
> > Currently in Debian/Ubuntu we are using the ABI override (because
> > of
> > the sticky ABI breakage issue) so the filenames and package names
> > are
> > different on every release anyway.
> > 
> > So in theory we could change the name of the libs and packages, but
> > what I'm mostly worried about is keeping consistency and some level
> > of
> > compatibility between old and new build systems, isn't that an
> > issue?
> > 
> 
> It's a good question, and I suspect everyone will have their own
> opinion.
> 
> Personally, I take the view that moving build system involves quite a
> number of changes anyway, so we should take the opportunity to clean
> up a
> few other things at the same time. This is why I'm so keep on trying
> to
> keep everything consistent as far as possible throughout the system
> and not
> put in special cases. For many of these a) if we put in lots of name
> overrides now we'll probably never get rid of them, and b) it's more
> likely
> that future drivers will adopt the same technique to have different
> naming
> of drivers and directories.
> 
> However, if keeping sonames consistent is a major concern, then
> perhaps we
> should look to rename some directories, like you suggested before.
> 
> /Bruce

Actually I tend to agree, it would be better to make the libraries
consistent, so I'm fine with having to deal with it once in packaging.
I'll send a v2 without most of the renames.
  

Patch

diff --git a/drivers/net/liquidio/Makefile b/drivers/net/liquidio/Makefile
index f1092851a9..fc5f18ad63 100644
--- a/drivers/net/liquidio/Makefile
+++ b/drivers/net/liquidio/Makefile
@@ -15,7 +15,7 @@  LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
 LDLIBS += -lrte_bus_pci
 
-EXPORT_MAP := rte_pmd_liquidio_version.map
+EXPORT_MAP := rte_pmd_lio_version.map
 
 LIBABIVER := 1
 
diff --git a/drivers/net/liquidio/meson.build b/drivers/net/liquidio/meson.build
index 9ae48e2139..83d002f557 100644
--- a/drivers/net/liquidio/meson.build
+++ b/drivers/net/liquidio/meson.build
@@ -1,6 +1,7 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+name = 'lio'
 sources = files('base/lio_23xx_vf.c',
 	'base/lio_mbox.c',
 	'lio_ethdev.c',
diff --git a/drivers/net/liquidio/rte_pmd_liquidio_version.map b/drivers/net/liquidio/rte_pmd_lio_version.map
similarity index 100%
rename from drivers/net/liquidio/rte_pmd_liquidio_version.map
rename to drivers/net/liquidio/rte_pmd_lio_version.map