From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 69D1295CD for ; Wed, 27 Jan 2016 17:01:19 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP; 27 Jan 2016 08:01:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,355,1449561600"; d="scan'208";a="869897714" Received: from irsmsx151.ger.corp.intel.com ([163.33.192.59]) by orsmga001.jf.intel.com with ESMTP; 27 Jan 2016 08:01:17 -0800 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.100]) by IRSMSX151.ger.corp.intel.com ([169.254.4.108]) with mapi id 14.03.0248.002; Wed, 27 Jan 2016 16:01:16 +0000 From: "Burakov, Anatoly" To: Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH v4] vfio: Support for no-IOMMU mode Thread-Index: AQHRWQ+gWvjUvggVi0GCaGskRGjU1Z8PgsCAgAACISA= Date: Wed, 27 Jan 2016 16:01:16 +0000 Message-ID: References: <1453903474-18807-1-git-send-email-anatoly.burakov@intel.com> <1453905124-28544-1-git-send-email-anatoly.burakov@intel.com> <3176479.ZPvIliTGUP@xps13> In-Reply-To: <3176479.ZPvIliTGUP@xps13> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v4] vfio: Support for no-IOMMU mode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2016 16:01:19 -0000 Hi Thomas, > > +/* DMA mapping function prototype. > > + * Takes VFIO container fd as a parameter. > > + * Returns 0 on success, -1 on error. > > + * */ > > +typedef int (*vfio_dma_func_t)(int); > > + > > +struct vfio_iommu_type { > > + int type_id; > > + const char *name; > > + vfio_dma_func_t dma_map_func; > > +}; > > + > > +int vfio_iommu_type1_dma_map(int); > > +int vfio_iommu_noiommu_dma_map(int); >=20 > Is it possible (is it better) to declare these functions with vfio_dma_fu= nc_t? Yeah, sure. Or maybe the other way around - maybe we could do away with the= typedef. I'll go for the former though. > vfio_iommu_noiommu_dma_map is a weird name. > Why not vfio_noiommu_dma_map or vfio_iommu_none_dma_map? Well, the NOIOMMU type is named VFIO_IOMMU_NOIOMMU in the VFIO headers. So = it's consistent with the IOMMU type name. Although vfio_noiommu_dma_map see= ms reasonable. Thanks, Anatoly