From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8074A41FDD for ; Thu, 31 Aug 2023 14:11:15 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 74B924029A; Thu, 31 Aug 2023 14:11:15 +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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-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 --- 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