From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v4] vfio: Support for no-IOMMU mode Date: Wed, 27 Jan 2016 16:50:25 +0100 Message-ID: <3176479.ZPvIliTGUP@xps13> References: <1453903474-18807-1-git-send-email-anatoly.burakov@intel.com> <1453905124-28544-1-git-send-email-anatoly.burakov@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Anatoly Burakov Return-path: Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by dpdk.org (Postfix) with ESMTP id 71A7395CB for ; Wed, 27 Jan 2016 16:51:35 +0100 (CET) Received: by mail-wm0-f54.google.com with SMTP id p63so32957311wmp.1 for ; Wed, 27 Jan 2016 07:51:35 -0800 (PST) In-Reply-To: <1453905124-28544-1-git-send-email-anatoly.burakov@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-01-27 14:32, Anatoly Burakov: > +/* 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); Is it possible (is it better) to declare these functions with vfio_dma_func_t? vfio_iommu_noiommu_dma_map is a weird name. Why not vfio_noiommu_dma_map or vfio_iommu_none_dma_map?