From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding :content-type; bh=9qrtmj0T25juDalGGYOSrhTmh11razvWW6Uygf6mg5U=; b=oQyfta/g8zDYENY+Ol7CqFQah8nAX16xLgyv28/FzunU2qBS00ftSdGA/MdRyqpCtK 8SHHb2vPhhGvvqoAvkIoEbHbx99+KxJbV7ujibiLchRMLfFuNFY8FzXSmgtZkr0FpdF7 MljPCAuMmxePpyfNeRnvb+39ph8Mu5302MI6LMskfSQugeOngEu+ij4Dt38GQgBFLKmB RsH041l461g5DUAAMuJG4CWWLxDNIUx0FXI92DGgqoUCmusmPad6rPrjkWk9MexeXM8q ZzY8ZRHwUL6Z77HHZtb1x5IxzIME9+fd/4D5/zFesHYVBjGTysGt/2Q3uHl+XRcOX5Hf qZhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=9qrtmj0T25juDalGGYOSrhTmh11razvWW6Uygf6mg5U=; b=hHKAVjhTJocc+GCcuqwv8QFT5UJaYCBDr7b1wvZikZAKZLZTA4Yu6IWhd9SE3/43wI mMV64+FG6EUtiodhQov5HygvzzzaOrP9nGOxDrR3fhiHV9Tcjzrrojs/omrxXAJWE+lu ICTdKBJZnlgBpNWKUStoFMKCUPCIaBZqI/ldRluUsDohhLArUJDK0rjjsrhrZnRSCuLH aqLV67kEO2GdIoRi2JkUIotDgtSuNABx9xGVNYIpL4zp99pjIenm+tMc2I/Xg+Amy/bu RiyZNzmSHNpMdBHazh77yUwsWFUB1eH9Gn692k4LLipAoacuZiR81tUJW2X6rrty8bNG DNSg== X-Gm-Message-State: AG10YORIyuiatyL4eoWP88ZubG+frKRSD6nM7c/Z2I8RQGtv2PdWO9/79Cg8gwV7T35NAWQ1 X-Received: by 10.194.116.197 with SMTP id jy5mr24572594wjb.43.1453909895275; Wed, 27 Jan 2016 07:51:35 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by smtp.gmail.com with ESMTPSA id e9sm6792983wja.25.2016.01.27.07.51.34 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 27 Jan 2016 07:51:34 -0800 (PST) From: Thomas Monjalon To: Anatoly Burakov Date: Wed, 27 Jan 2016 16:50:25 +0100 Message-ID: <3176479.ZPvIliTGUP@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1453905124-28544-1-git-send-email-anatoly.burakov@intel.com> 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-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 15:51:35 -0000 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?