From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id A33C92C2A for ; Wed, 28 Jun 2017 11:54:35 +0200 (CEST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Jun 2017 02:54:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,274,1496127600"; d="scan'208";a="120169746" Received: from irsmsx105.ger.corp.intel.com ([163.33.3.28]) by fmsmga006.fm.intel.com with ESMTP; 28 Jun 2017 02:54:33 -0700 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.211]) by irsmsx105.ger.corp.intel.com ([169.254.7.168]) with mapi id 14.03.0319.002; Wed, 28 Jun 2017 10:54:32 +0100 From: "Wodkowski, PawelX" To: Thomas Monjalon CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] vfio: allow to map other memory regions Thread-Index: AQHS1GA8U6OXGTO9Yk2t8ab5hUZtMaIsxaoAgA1ybxA= Date: Wed, 28 Jun 2017 09:54:32 +0000 Message-ID: References: <1495547976-96270-1-git-send-email-pawelx.wodkowski@intel.com> <1495624659-226807-1-git-send-email-pawelx.wodkowski@intel.com> <2829321.iV2IKkVC0J@xps> In-Reply-To: <2829321.iV2IKkVC0J@xps> Accept-Language: pl-PL, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] vfio: allow to map other memory regions 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: Wed, 28 Jun 2017 09:54:36 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas@monjalon.net] > Sent: Monday, June 19, 2017 11:04 PM > To: Wodkowski, PawelX > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] vfio: allow to map other memory regions >=20 > Hi, > Some comments below >=20 > 24/05/2017 13:17, Pawel Wodkowski: > > Currently it is not possible to use memory that is not owned by DPDK to > > perform DMA. This scenarion might be used in vhost applications (like > > SPDK) where guest send its own memory table. To fill this gap provide > > API to allow registering arbitrary address in VFIO container. > > > > Signed-off-by: Pawel Wodkowski > > --- > > lib/librte_eal/linuxapp/eal/Makefile | 3 + > > lib/librte_eal/linuxapp/eal/eal_vfio.c | 142 > +++++++++++++++++++++--- > > lib/librte_eal/linuxapp/eal/eal_vfio.h | 10 ++ > > lib/librte_eal/linuxapp/eal/include/rte_iommu.h | 78 +++++++++++++ > > lib/librte_eal/linuxapp/eal/rte_eal_version.map | 8 ++ > > 5 files changed, 224 insertions(+), 17 deletions(-) > > create mode 100644 lib/librte_eal/linuxapp/eal/include/rte_iommu.h >=20 > VFIO is not referenced in the doxygen of these functions. > Could we use this API for something else than VFIO? This is for any IOMMU hw/module/driver used in host which require special care about memory regions used for DMA. It is not restricted to VFIO even t= hough only VFIO is implemented. >=20 > Any API should be declared in common directory, even if it is not > implemented for FreeBSD (returning -ENOTSUP). I think those function should be NOP for FreeBSD (like RTE_VFIO_NOIOMMU do) or be conditionally compiled/included (like it is now). I decide to take se= cond way. Do you think that I should move rte_iommu.h to common directory and use #if= def there? Pawel