From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 6CF1D2C54 for ; Tue, 11 Jul 2017 14:09:29 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4BEFB85A05; Tue, 11 Jul 2017 12:09:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4BEFB85A05 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=maxime.coquelin@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 4BEFB85A05 Received: from [10.36.112.40] (ovpn-112-40.ams2.redhat.com [10.36.112.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 53450756C0; Tue, 11 Jul 2017 12:09:24 +0000 (UTC) To: santosh , thomas@monjalon.net, dev@dpdk.org Cc: bruce.richardson@intel.com, jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com, shreyansh.jain@nxp.com, gaetan.rivet@6wind.com, sergio.gonzalez.monroy@intel.com, anatoly.burakov@intel.com, stephen@networkplumber.org, olivier.matz@6wind.com References: <20170710114235.18970-1-santosh.shukla@caviumnetworks.com> <20170711061631.5018-1-santosh.shukla@caviumnetworks.com> <20170711061631.5018-4-santosh.shukla@caviumnetworks.com> <04b56e50-a6b2-d78e-b73a-73c9ddf72521@redhat.com> <2e16ee3f-7a37-4548-87ad-7ff825d2b938@caviumnetworks.com> From: Maxime Coquelin Message-ID: Date: Tue, 11 Jul 2017 14:09:21 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <2e16ee3f-7a37-4548-87ad-7ff825d2b938@caviumnetworks.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 11 Jul 2017 12:09:28 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH v3 03/11] bsdapp/eal_pci: get iommu class X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jul 2017 12:09:29 -0000 On 07/11/2017 12:41 PM, santosh wrote: > On Tuesday 11 July 2017 02:45 PM, Maxime Coquelin wrote: > >> >> On 07/11/2017 08:16 AM, Santosh Shukla wrote: >>> diff --git a/lib/librte_eal/common/include/rte_bus.h b/lib/librte_eal/common/include/rte_bus.h >>> index af9f0e13f..7a0cfb165 100644 >>> --- a/lib/librte_eal/common/include/rte_bus.h >>> +++ b/lib/librte_eal/common/include/rte_bus.h >>> @@ -55,6 +55,15 @@ extern "C" { >>> /** Double linked list of buses */ >>> TAILQ_HEAD(rte_bus_list, rte_bus); >>> + >>> +/** >>> + * IOVA mapping mode. >>> + */ >>> +enum rte_iova_mode { >>> + RTE_IOVA_PA = 1, >>> + RTE_IOVA_VA >>> +}; >>> + >>> /** >>> * Bus specific scan for devices attached on the bus. >>> * For each bus object, the scan would be responsible for finding devices and >>> diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h >>> index 4a485674e..c58361132 100644 >>> --- a/lib/librte_eal/common/include/rte_pci.h >>> +++ b/lib/librte_eal/common/include/rte_pci.h >>> @@ -383,6 +383,17 @@ int >>> rte_pci_match(const struct rte_pci_driver *pci_drv, >>> const struct rte_pci_device *pci_dev); >>> + >>> +/** >>> + * Get iommu class of PCI devices on the bus. >>> + * And return their preferred iova mapping mode. >>> + * >>> + * @return >>> + * - enum rte_iova_mode. >>> + */ >>> +enum rte_iova_mode >>> +rte_pci_get_iommu_class(void); >>> + >>> /** >>> * Map the PCI device resources in user space virtual memory address >>> * >> >> I would have put this in a separate patch, as not bsd specifics. >> > I'll pull that out in v4, and perhaps squash into [01/11], as both changes (RTE_PCI_DRV_ and this one) > are on same rte_pci.h file. Is it Ok with you? or you prefer separate patch for both > (RTE_PCI_DRV_ and this one)? I'm fine you squash this part in patch 1. Thanks, Maxime >> Maxime >