From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) by dpdk.org (Postfix) with ESMTP id C11521B1C8 for ; Mon, 8 Jan 2018 16:38:51 +0100 (CET) Received: by mail-pf0-f195.google.com with SMTP id n6so6182964pfa.4 for ; Mon, 08 Jan 2018 07:38:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mC82TE5FuUB3+54KJAVoVMBMVfIKxLZoUVAv4is0vYo=; b=VgCy3JPLzq/i1MevgFPzZhznEi3EUGe6jWX8uJszVOO3j1b3SMOg3W3JNitOk97SOh DyIQGuTLU9mVjkU86Bjs2vyodwQKAYzLANwccVYbAXCefTwXCaSArFLWHZ/WsnZwIsoG tLGf8RMCRd0gyAJ0Wu6PvOUJYaSZe3ldwoiPMEx2kTLLeqVr75Md4Rni2d4c1QxbJiKO /DJBxaBjL4MZIEUef3DVtbt36M9+LZISCk37k/hhoEUkOnHTgGwHRRmrPSS/L78Eyf3M PZs5zU3ycKnOF9Oyvz4L0u2jjVRI4bMfAqeYyHk1i8jI2cRKonJ00MQdDX8v2udYTBGx X1iA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mC82TE5FuUB3+54KJAVoVMBMVfIKxLZoUVAv4is0vYo=; b=Fr04MPf4ngjsnMJZmBdVLIDMyd2JsxfQk8VOIA2pJSN9umcLvOxZIUdhUELRWbE93b oTXFzhC507ROrcrL5AAOLq9pg8qvqECbvkdKfc7368vibZm+bg+EyWHOmIyX8Crrcm53 jKAqtU8A4CvYO3XK7NF9Vppr/k+Az5iQHzKq1oetKg8AYp0WB6WQb3b5w48rgxS6HXnh 7P1SXicMkxXY5zPsLSLfsKuCjAqs44sNmeWMt0t+nIwOTBwLZAx/CXbbg02EEcI/c0cr FnTkZW+WK8azCHBS/ctQ4Thh6axNTkvO1fwifW6qUaydDp6jc+khLAV/jBIc3qpJxzv9 gZ+A== X-Gm-Message-State: AKGB3mKbGatiygqP9MPvbHtkm4KHzdeSUI8kQjbyWR8g7FjwZP/5dw6v tch2cm+8mPbZfWbxMsvfESwyow== X-Google-Smtp-Source: ACJfBoup6g/S7FTAgxqa9s8FtpQWIl0btrmi9A8Xxhya8Bkl6sVuhDH/s+QEA/nJ9iSJdqTQjEcSvA== X-Received: by 10.99.104.194 with SMTP id d185mr5878508pgc.404.1515425930892; Mon, 08 Jan 2018 07:38:50 -0800 (PST) Received: from xeon-e3 (204-195-18-133.wavecable.com. [204.195.18.133]) by smtp.gmail.com with ESMTPSA id h81sm30867242pfh.119.2018.01.08.07.38.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 Jan 2018 07:38:50 -0800 (PST) Date: Mon, 8 Jan 2018 07:38:41 -0800 From: Stephen Hemminger To: Maxime Coquelin Cc: dev@dpdk.org, stable@dpdk.org, jianfeng.tan@intel.com, santosh.shukla@caviumnetworks.com, anatoly.burakov@intel.com, thomas@monjalon.net, peterx@redhat.com Message-ID: <20180108073841.43c15072@xeon-e3> In-Reply-To: <20180108135127.25869-1-maxime.coquelin@redhat.com> References: <20180108135127.25869-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] bus/pci: forbid VA as IOVA mode if IOMMU address width too small X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jan 2018 15:38:52 -0000 On Mon, 8 Jan 2018 14:51:27 +0100 Maxime Coquelin wrote: > +static inline bool > +pci_one_device_iommu_support_va(struct rte_pci_device *dev) > +{ > +#if defined(RTE_ARCH_PPC_64) > + return false; > +#elif defined(RTE_ARCH_X86) > + The cleaner way to handle this kind of ifdef is: #ifdef RTE_ARCH_X86 static bool pci_one_device_iommu_support_va(struct rte_pci_device *dev) { .... } #elif defined(RTE_ARCH_PPC_64) static inline bool pci_one_device_iommu_support_va(struct rte_pci_device *dev) { return false; } #endif What about AMD64? Do all ARM processors have IOMMU, I think not.