* [PATCH 1/3] vhost: fix build for powerpc [not found] <20230831121058.725577-1-bruce.richardson@intel.com> @ 2023-08-31 12:10 ` Bruce Richardson 2023-09-01 14:59 ` Bruce Richardson 2023-09-29 14:47 ` Maxime Coquelin 2023-08-31 12:10 ` [PATCH 2/3] crypto/ipsec_mb: fix build failures due to incompatible lib Bruce Richardson 1 sibling, 2 replies; 6+ messages in thread From: Bruce Richardson @ 2023-08-31 12:10 UTC (permalink / raw) To: dev; +Cc: Bruce Richardson, maxime.coquelin, stable, Chenbo Xia, David Marchand When building on Ubuntu using the packaged powerpc compiler[1], a warning is issued about the print format of the __u64 values. ../../lib/vhost/vduse.c: In function ‘vduse_vring_setup’: ../../lib/vhost/vhost.h:676:17: error: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘__u64’ {aka ‘long unsigned int’} [-Werror=format=] 676 | "VHOST_CONFIG: (%s) " fmt, prefix, ##args) | ^~~~~~~~~~~~~~~~~~~~~ Changing the format specifier to %lx, or to use PRIx64 breaks other builds, so the safest solution is to explicitly typecast the printed values to match the format string. [1] powerpc64le-linux-gnu-gcc (Ubuntu 12.3.0-1ubuntu1~23.04) 12.3.0 Fixes: a9120db8b98b ("vhost: add VDUSE device startup") Cc: maxime.coquelin@redhat.com Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/vhost/vduse.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/vhost/vduse.c b/lib/vhost/vduse.c index 73ed424232..e2b6d35d37 100644 --- a/lib/vhost/vduse.c +++ b/lib/vhost/vduse.c @@ -162,9 +162,12 @@ vduse_vring_setup(struct virtio_net *dev, unsigned int index) VHOST_LOG_CONFIG(dev->ifname, INFO, "VQ %u info:\n", index); VHOST_LOG_CONFIG(dev->ifname, INFO, "\tnum: %u\n", vq_info.num); - VHOST_LOG_CONFIG(dev->ifname, INFO, "\tdesc_addr: %llx\n", vq_info.desc_addr); - VHOST_LOG_CONFIG(dev->ifname, INFO, "\tdriver_addr: %llx\n", vq_info.driver_addr); - VHOST_LOG_CONFIG(dev->ifname, INFO, "\tdevice_addr: %llx\n", vq_info.device_addr); + VHOST_LOG_CONFIG(dev->ifname, INFO, "\tdesc_addr: %llx\n", + (unsigned long long)vq_info.desc_addr); + VHOST_LOG_CONFIG(dev->ifname, INFO, "\tdriver_addr: %llx\n", + (unsigned long long)vq_info.driver_addr); + VHOST_LOG_CONFIG(dev->ifname, INFO, "\tdevice_addr: %llx\n", + (unsigned long long)vq_info.device_addr); VHOST_LOG_CONFIG(dev->ifname, INFO, "\tavail_idx: %u\n", vq_info.split.avail_index); VHOST_LOG_CONFIG(dev->ifname, INFO, "\tready: %u\n", vq_info.ready); -- 2.39.2 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/3] vhost: fix build for powerpc 2023-08-31 12:10 ` [PATCH 1/3] vhost: fix build for powerpc Bruce Richardson @ 2023-09-01 14:59 ` Bruce Richardson 2023-09-12 18:30 ` David Christensen 2023-09-29 14:47 ` Maxime Coquelin 1 sibling, 1 reply; 6+ messages in thread From: Bruce Richardson @ 2023-09-01 14:59 UTC (permalink / raw) To: dev, David Christensen Cc: maxime.coquelin, stable, Chenbo Xia, David Marchand +PPC maintainer On Thu, Aug 31, 2023 at 01:10:56PM +0100, Bruce Richardson wrote: > When building on Ubuntu using the packaged powerpc compiler[1], a > warning is issued about the print format of the __u64 values. > > ../../lib/vhost/vduse.c: In function ‘vduse_vring_setup’: > ../../lib/vhost/vhost.h:676:17: error: format ‘%llx’ expects argument of > type ‘long long unsigned int’, but argument 5 has type ‘__u64’ {aka > ‘long unsigned int’} [-Werror=format=] > 676 | "VHOST_CONFIG: (%s) " fmt, prefix, ##args) > | ^~~~~~~~~~~~~~~~~~~~~ > > Changing the format specifier to %lx, or to use PRIx64 breaks other > builds, so the safest solution is to explicitly typecast the printed > values to match the format string. > > [1] powerpc64le-linux-gnu-gcc (Ubuntu 12.3.0-1ubuntu1~23.04) 12.3.0 > > Fixes: a9120db8b98b ("vhost: add VDUSE device startup") > Cc: maxime.coquelin@redhat.com > Cc: stable@dpdk.org > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > --- > lib/vhost/vduse.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/lib/vhost/vduse.c b/lib/vhost/vduse.c > index 73ed424232..e2b6d35d37 100644 > --- a/lib/vhost/vduse.c > +++ b/lib/vhost/vduse.c > @@ -162,9 +162,12 @@ vduse_vring_setup(struct virtio_net *dev, unsigned int index) > > VHOST_LOG_CONFIG(dev->ifname, INFO, "VQ %u info:\n", index); > VHOST_LOG_CONFIG(dev->ifname, INFO, "\tnum: %u\n", vq_info.num); > - VHOST_LOG_CONFIG(dev->ifname, INFO, "\tdesc_addr: %llx\n", vq_info.desc_addr); > - VHOST_LOG_CONFIG(dev->ifname, INFO, "\tdriver_addr: %llx\n", vq_info.driver_addr); > - VHOST_LOG_CONFIG(dev->ifname, INFO, "\tdevice_addr: %llx\n", vq_info.device_addr); > + VHOST_LOG_CONFIG(dev->ifname, INFO, "\tdesc_addr: %llx\n", > + (unsigned long long)vq_info.desc_addr); > + VHOST_LOG_CONFIG(dev->ifname, INFO, "\tdriver_addr: %llx\n", > + (unsigned long long)vq_info.driver_addr); > + VHOST_LOG_CONFIG(dev->ifname, INFO, "\tdevice_addr: %llx\n", > + (unsigned long long)vq_info.device_addr); > VHOST_LOG_CONFIG(dev->ifname, INFO, "\tavail_idx: %u\n", vq_info.split.avail_index); > VHOST_LOG_CONFIG(dev->ifname, INFO, "\tready: %u\n", vq_info.ready); > > -- > 2.39.2 > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/3] vhost: fix build for powerpc 2023-09-01 14:59 ` Bruce Richardson @ 2023-09-12 18:30 ` David Christensen 0 siblings, 0 replies; 6+ messages in thread From: David Christensen @ 2023-09-12 18:30 UTC (permalink / raw) To: Bruce Richardson, dev; +Cc: maxime.coquelin, stable, Chenbo Xia, David Marchand On 9/1/23 7:59 AM, Bruce Richardson wrote: > +PPC maintainer > > On Thu, Aug 31, 2023 at 01:10:56PM +0100, Bruce Richardson wrote: >> When building on Ubuntu using the packaged powerpc compiler[1], a >> warning is issued about the print format of the __u64 values. >> >> ../../lib/vhost/vduse.c: In function ‘vduse_vring_setup’: >> ../../lib/vhost/vhost.h:676:17: error: format ‘%llx’ expects argument of >> type ‘long long unsigned int’, but argument 5 has type ‘__u64’ {aka >> ‘long unsigned int’} [-Werror=format=] >> 676 | "VHOST_CONFIG: (%s) " fmt, prefix, ##args) >> | ^~~~~~~~~~~~~~~~~~~~~ >> >> Changing the format specifier to %lx, or to use PRIx64 breaks other >> builds, so the safest solution is to explicitly typecast the printed >> values to match the format string. >> >> [1] powerpc64le-linux-gnu-gcc (Ubuntu 12.3.0-1ubuntu1~23.04) 12.3.0 >> >> Fixes: a9120db8b98b ("vhost: add VDUSE device startup") >> Cc: maxime.coquelin@redhat.com >> Cc: stable@dpdk.org >> >> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> >> --- Tested-by: David Christensen <drc@linux.vnet.ibm.com> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/3] vhost: fix build for powerpc 2023-08-31 12:10 ` [PATCH 1/3] vhost: fix build for powerpc Bruce Richardson 2023-09-01 14:59 ` Bruce Richardson @ 2023-09-29 14:47 ` Maxime Coquelin 1 sibling, 0 replies; 6+ messages in thread From: Maxime Coquelin @ 2023-09-29 14:47 UTC (permalink / raw) To: Bruce Richardson, dev; +Cc: stable, Chenbo Xia, David Marchand On 8/31/23 14:10, Bruce Richardson wrote: > When building on Ubuntu using the packaged powerpc compiler[1], a > warning is issued about the print format of the __u64 values. > > ../../lib/vhost/vduse.c: In function ‘vduse_vring_setup’: > ../../lib/vhost/vhost.h:676:17: error: format ‘%llx’ expects argument of > type ‘long long unsigned int’, but argument 5 has type ‘__u64’ {aka > ‘long unsigned int’} [-Werror=format=] > 676 | "VHOST_CONFIG: (%s) " fmt, prefix, ##args) > | ^~~~~~~~~~~~~~~~~~~~~ > > Changing the format specifier to %lx, or to use PRIx64 breaks other > builds, so the safest solution is to explicitly typecast the printed > values to match the format string. > > [1] powerpc64le-linux-gnu-gcc (Ubuntu 12.3.0-1ubuntu1~23.04) 12.3.0 > > Fixes: a9120db8b98b ("vhost: add VDUSE device startup") > Cc: maxime.coquelin@redhat.com > Cc: stable@dpdk.org > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > --- > lib/vhost/vduse.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/lib/vhost/vduse.c b/lib/vhost/vduse.c > index 73ed424232..e2b6d35d37 100644 > --- a/lib/vhost/vduse.c > +++ b/lib/vhost/vduse.c > @@ -162,9 +162,12 @@ vduse_vring_setup(struct virtio_net *dev, unsigned int index) > > VHOST_LOG_CONFIG(dev->ifname, INFO, "VQ %u info:\n", index); > VHOST_LOG_CONFIG(dev->ifname, INFO, "\tnum: %u\n", vq_info.num); > - VHOST_LOG_CONFIG(dev->ifname, INFO, "\tdesc_addr: %llx\n", vq_info.desc_addr); > - VHOST_LOG_CONFIG(dev->ifname, INFO, "\tdriver_addr: %llx\n", vq_info.driver_addr); > - VHOST_LOG_CONFIG(dev->ifname, INFO, "\tdevice_addr: %llx\n", vq_info.device_addr); > + VHOST_LOG_CONFIG(dev->ifname, INFO, "\tdesc_addr: %llx\n", > + (unsigned long long)vq_info.desc_addr); > + VHOST_LOG_CONFIG(dev->ifname, INFO, "\tdriver_addr: %llx\n", > + (unsigned long long)vq_info.driver_addr); > + VHOST_LOG_CONFIG(dev->ifname, INFO, "\tdevice_addr: %llx\n", > + (unsigned long long)vq_info.device_addr); > VHOST_LOG_CONFIG(dev->ifname, INFO, "\tavail_idx: %u\n", vq_info.split.avail_index); > VHOST_LOG_CONFIG(dev->ifname, INFO, "\tready: %u\n", vq_info.ready); > It is surprising PRIx64 does not work on other architectures. I don't see a better solution, so: Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com> Thanks, Maxime ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/3] crypto/ipsec_mb: fix build failures due to incompatible lib [not found] <20230831121058.725577-1-bruce.richardson@intel.com> 2023-08-31 12:10 ` [PATCH 1/3] vhost: fix build for powerpc Bruce Richardson @ 2023-08-31 12:10 ` Bruce Richardson 2023-08-31 13:18 ` Power, Ciara 1 sibling, 1 reply; 6+ messages in thread From: Bruce Richardson @ 2023-08-31 12:10 UTC (permalink / raw) To: dev Cc: Bruce Richardson, stable, Kai Ji, Pablo de Lara, Akhil Goyal, Ciara Power, Ray Kinsella, Fan Zhang When cross-compiling for PowerPC on Ubuntu, the x86 IPSec_MB library was getting found by the build system for use in the PPC build. This led to failures at compile time due to the library not being linkable. We can avoid these failures by checking the discovered library for compatibility at configuration time. This needs a version check as it is supported only from version 0.60 of meson onwards. Fixes: c75542ae4200 ("crypto/ipsec_mb: introduce IPsec_mb framework") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- drivers/crypto/ipsec_mb/meson.build | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/crypto/ipsec_mb/meson.build b/drivers/crypto/ipsec_mb/meson.build index 3057e6fd10..87bf965554 100644 --- a/drivers/crypto/ipsec_mb/meson.build +++ b/drivers/crypto/ipsec_mb/meson.build @@ -16,6 +16,11 @@ lib = cc.find_library('IPSec_MB', required: false) if not lib.found() build = false reason = 'missing dependency, "libIPSec_MB"' +# if the lib is found, check it's the right format +elif meson.version().version_compare('>=0.60') and not cc.links( + 'int main(void) {return 0;}', dependencies: lib) + build = false + reason = 'incompatible dependency, "libIPSec_MB"' else ext_deps += lib -- 2.39.2 ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH 2/3] crypto/ipsec_mb: fix build failures due to incompatible lib 2023-08-31 12:10 ` [PATCH 2/3] crypto/ipsec_mb: fix build failures due to incompatible lib Bruce Richardson @ 2023-08-31 13:18 ` Power, Ciara 0 siblings, 0 replies; 6+ messages in thread From: Power, Ciara @ 2023-08-31 13:18 UTC (permalink / raw) To: Richardson, Bruce, dev Cc: stable, Ji, Kai, De Lara Guarch, Pablo, Akhil Goyal, Ray Kinsella, Fan Zhang > -----Original Message----- > From: Richardson, Bruce <bruce.richardson@intel.com> > Sent: Thursday, August 31, 2023 1:11 PM > To: dev@dpdk.org > Cc: Richardson, Bruce <bruce.richardson@intel.com>; stable@dpdk.org; Ji, Kai > <kai.ji@intel.com>; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; > Akhil Goyal <gakhil@marvell.com>; Power, Ciara <ciara.power@intel.com>; > Ray Kinsella <mdr@ashroe.eu>; Fan Zhang <fanzhang.oss@gmail.com> > Subject: [PATCH 2/3] crypto/ipsec_mb: fix build failures due to incompatible > lib > > When cross-compiling for PowerPC on Ubuntu, the x86 IPSec_MB library was > getting found by the build system for use in the PPC build. This led to failures > at compile time due to the library not being linkable. > > We can avoid these failures by checking the discovered library for compatibility > at configuration time. This needs a version check as it is supported only from > version 0.60 of meson onwards. > > Fixes: c75542ae4200 ("crypto/ipsec_mb: introduce IPsec_mb framework") > Cc: stable@dpdk.org > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Ciara Power <ciara.power@intel.com> ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-09-29 14:47 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <20230831121058.725577-1-bruce.richardson@intel.com> 2023-08-31 12:10 ` [PATCH 1/3] vhost: fix build for powerpc Bruce Richardson 2023-09-01 14:59 ` Bruce Richardson 2023-09-12 18:30 ` David Christensen 2023-09-29 14:47 ` Maxime Coquelin 2023-08-31 12:10 ` [PATCH 2/3] crypto/ipsec_mb: fix build failures due to incompatible lib Bruce Richardson 2023-08-31 13:18 ` Power, Ciara
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).