From patchwork Thu Aug 31 12:10:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 130973 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 724CC41FDD; Thu, 31 Aug 2023 14:11:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6084540294; Thu, 31 Aug 2023 14:11:14 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 5FE654028C; Thu, 31 Aug 2023 14:11:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1693483873; x=1725019873; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=MIosQbs1lRbFZdf+vtKScvZzjSFXtBhb0xvLhQkm+fo=; b=PVl788CezzLS6PcJGFDg2cDd3Noiwg8APnbPgVFfcP5RE7o17pGW2vcg Z5mUwqyRCH957gjcka3JmppJgQvbYIB0NyDL5o9Mg+WQUZADht/XSMtEI Pb+gI2SDepxIHXKJgYQX9yisGH6j86ZHvWBloH1A1RNdbFpyO8icry0Y1 wSlAoW1CL6nlq0bIyGSNNMbLPMjKk65uFmPxjXjSXatD85DW2X066Sv0D 05UU6TUVtDVm2/S07RQ+97dRd9Qcq9N9RIUpJPFP6q+yp4vvLcYord9Cw ziAeW+LUjefu6EcqsqYO+9DM7489BTKQTpU+PNbTw6MfdmVhM4DbERu5f w==; X-IronPort-AV: E=McAfee;i="6600,9927,10818"; a="373320661" X-IronPort-AV: E=Sophos;i="6.02,216,1688454000"; d="scan'208";a="373320661" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Aug 2023 05:11:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10818"; a="1070238810" X-IronPort-AV: E=Sophos;i="6.02,216,1688454000"; d="scan'208";a="1070238810" Received: from silpixa00401385.ir.intel.com ([10.237.214.14]) by fmsmga005.fm.intel.com with ESMTP; 31 Aug 2023 05:11:11 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , maxime.coquelin@redhat.com, stable@dpdk.org, Chenbo Xia , David Marchand Subject: [PATCH 1/3] vhost: fix build for powerpc Date: Thu, 31 Aug 2023 13:10:56 +0100 Message-Id: <20230831121058.725577-2-bruce.richardson@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230831121058.725577-1-bruce.richardson@intel.com> References: <20230831121058.725577-1-bruce.richardson@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 Tested-by: David Christensen Acked-by: Maxime Coquelin --- 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); From patchwork Thu Aug 31 12:10:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 130974 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 57A4441FDD; Thu, 31 Aug 2023 14:11:30 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0696440299; Thu, 31 Aug 2023 14:11:28 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id A6E6340293; Thu, 31 Aug 2023 14:11:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1693483886; x=1725019886; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=TzUf+AsTXV4a4UU+n60cTM7BgW3pcl5CUYEU0i50M70=; b=Xc48u/J+8aPh5I2WC8OlPXpIeTK5ik4SLhRUv8s4/MSaYjisPs5u4Ktp j0QDF4XnKOV9fU/+K4ftESf4z/IG9YRQp5TfIT9jCyr01+NMB0dQP31Pd JlyWh8yEtHMmd4GK+nTvl3n5hFvOHbovRFP9bM1QvdtCXWFFZZWYpuqeF foejz3vyh9Te/ueuarM5LotmibShXbKmciqS1KUGBhcFco8GChEwkJWAr PXTYel/dWn1rpotvG3985oBzmxMDvWy86+vkhBxPdYY5gewM5Xmpek+tK K9/rZkQB98j6H0marZxqUGMwj+o5vPmRrS6oksjQfyeMXdCZ/x+sjinWN g==; X-IronPort-AV: E=McAfee;i="6600,9927,10818"; a="373320714" X-IronPort-AV: E=Sophos;i="6.02,216,1688454000"; d="scan'208";a="373320714" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Aug 2023 05:11:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10818"; a="1070238932" X-IronPort-AV: E=Sophos;i="6.02,216,1688454000"; d="scan'208";a="1070238932" Received: from silpixa00401385.ir.intel.com ([10.237.214.14]) by fmsmga005.fm.intel.com with ESMTP; 31 Aug 2023 05:11:22 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , stable@dpdk.org, Kai Ji , Pablo de Lara , Akhil Goyal , Ciara Power , Ray Kinsella , Fan Zhang Subject: [PATCH 2/3] crypto/ipsec_mb: fix build failures due to incompatible lib Date: Thu, 31 Aug 2023 13:10:57 +0100 Message-Id: <20230831121058.725577-3-bruce.richardson@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230831121058.725577-1-bruce.richardson@intel.com> References: <20230831121058.725577-1-bruce.richardson@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 Acked-by: Ciara Power --- 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 From patchwork Thu Aug 31 12:10:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 130975 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5743E41FDD; Thu, 31 Aug 2023 14:11:38 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3C1F74029E; Thu, 31 Aug 2023 14:11:30 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id C844240296 for ; Thu, 31 Aug 2023 14:11:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1693483889; x=1725019889; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mPAygClXex7SYJfHRQ3Lf37tuwtk2A8jvWUTgjlR84Q=; b=LeiUIrvMSWa/GeKFE4dE2PfixTl7gr44OapJ7yodKm4QTsE1xc4f5GKb fACQSD8VT4Iro1fPTBbUASmNocNE+jZcEwOGlBn567r9sT6UQNFDPFD8/ I0WHwAfXymM443ofEToXMoRvQWB+36jn/dSUuBLLmptFJaFg/my7ElHZz U34psuu5kXU4nwU5S0FMdvLAyk0UVW5mMFFGPw0V1VwelQKmdW4P0U6Xj K9MJNyA0C+xI0wpOE/7tpiHL2F6d10Rlm5Jhhz6v6EuVJ8ouprN1a7gpU 3XtBsd0Xw8TmyztPkt7Q8u3AcO3lgIBFABAgOrpNjAdq9wAYIaeVliMdk Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10818"; a="373320741" X-IronPort-AV: E=Sophos;i="6.02,216,1688454000"; d="scan'208";a="373320741" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Aug 2023 05:11:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10818"; a="1070238964" X-IronPort-AV: E=Sophos;i="6.02,216,1688454000"; d="scan'208";a="1070238964" Received: from silpixa00401385.ir.intel.com ([10.237.214.14]) by fmsmga005.fm.intel.com with ESMTP; 31 Aug 2023 05:11:27 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [PATCH 3/3] devtools: enable testing ppc builds on ubuntu Date: Thu, 31 Aug 2023 13:10:58 +0100 Message-Id: <20230831121058.725577-4-bruce.richardson@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230831121058.725577-1-bruce.richardson@intel.com> References: <20230831121058.725577-1-bruce.richardson@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org When running PPC builds with the packaged Ubuntu compiler, a different cross-file needs to be used. Adjust the test-meson-builds script to take account of this, so that developers can easier pick up on errors. Signed-off-by: Bruce Richardson Acked-by: Tyler Retzlaff --- devtools/test-meson-builds.sh | 3 +++ 1 file changed, 3 insertions(+) -- 2.39.2 diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index c41659d28b..605a855999 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -282,6 +282,9 @@ build build-loongarch64-generic-gcc $f ABI $use_shared # IBM POWER f=$srcdir/config/ppc/ppc64le-power8-linux-gcc +if grep -q 'NAME="Ubuntu"' /etc/os-release ; then + f=$f-ubuntu +fi build build-ppc64-power8-gcc $f ABI $use_shared # generic RISC-V