From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) by dpdk.org (Postfix) with ESMTP id 4FFED9577 for ; Wed, 27 Jan 2016 10:06:15 +0100 (CET) Received: by mail-wm0-f45.google.com with SMTP id p63so15758858wmp.1 for ; Wed, 27 Jan 2016 01:06:15 -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=EauHAEWeeS3IfArTsTqw2Wn48h+sDqE6yBxt7i50uMk=; b=NoOTYsnEDJOm6oAHZ3Oo5f8KXGUILbnemM44QUTxyRYFEGZ3JHhHK5kac1nsdCp3dn xoUFXkOhe1jAKNvcUqk+rY5TT4d9iwFv4QXEPJDr7hzLqmYuDu54qlJ9992x1lQZEspd G4vmpbkwaFcSfE7hY6ZbP6knAApyhcoWZpvM0Tjd9e3JySeaBvgzJzZ6ulAtQjmywANG TvTtDzGqohcoj/8zFNX7wDERGMKBkyCtX6eHfpk52qV6uJqJRyRAZFWg9TWD20smcuW+ GLI/d35ER6u/ZUA4VD+ivB/obyX46wk26Qm34TUr60dM7rCKeHDH7JtMNT+m86y5cRlw wcVw== 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=EauHAEWeeS3IfArTsTqw2Wn48h+sDqE6yBxt7i50uMk=; b=ldcs9iUbZ3knah57wTUK/rRsyf6tHSAfKLo0A+zcN9ddFSw+6S6yjwbB4NASh5gszT lICQ1Z8+kKnrBH93ogtjDmbt3+yHEwv/heHyLau/MLgb0H+1q+prZqjeBeOSmmXHku2O it3+xEllBDgUxUbkNhDtBiLGVwu7IBwB0JmAmgJJijxA+BzHndmu8wXc9rYwjJYQxX+x GRICogOX4AX12ooeAlqHqaAH6o2HE2XfqORPskU0PiawaF/nkADyUrt5ln3OLppapc4z 1KJps6PGcxKLNPAdhHtuJ/GFi4W6fETI8n1a7a7s8nvR3vQRbO1LRt3uB4FqHtDKQs3I 6/Og== X-Gm-Message-State: AG10YOQp43PitfxqLKDDuDyEZgMD9W3LCsufQDIl4KrHe8hLE6bU9v2mKTMvQdMwHv2m4NUJ X-Received: by 10.28.158.194 with SMTP id h185mr30907137wme.48.1453885575085; Wed, 27 Jan 2016 01:06:15 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by smtp.gmail.com with ESMTPSA id az10sm5155449wjc.28.2016.01.27.01.06.13 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 27 Jan 2016 01:06:14 -0800 (PST) From: Thomas Monjalon To: Anatoly Burakov Date: Wed, 27 Jan 2016 10:05:04 +0100 Message-ID: <1584319.QMRQbZMs1h@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1452688569-14695-1-git-send-email-anatoly.burakov@intel.com> References: <1450728967-9686-1-git-send-email-anatoly.burakov@intel.com> <1452688569-14695-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 v2] 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 09:06:15 -0000 Hi Anatoly, Few small comments. The comments "function pointer typedef" or "structure to hold" don't bring new information. Please keep it short. 2016-01-13 12:36, Anatoly Burakov: > +/* function pointer typedef for DMA mapping functions */ -> DMA mapping function type It would be relevant to describe the return and the parameter. > +typedef int (*vfio_dma_func_t)(int); > + > +/* Structure to hold supported IOMMU types */ This comment seems useless. > +struct vfio_iommu_type { [...] > +/* function prototypes for different IOMMU types */ idem > +int vfio_iommu_type1_dma_map(int container_fd); > +int vfio_iommu_noiommu_dma_map(int container_fd); > + > +/* IOMMU types we support */ > +static const struct vfio_iommu_type iommu_types[] = { > + /* x86 IOMMU, otherwise known as type 1 */ > + { VFIO_TYPE1_IOMMU, "Type 1", &vfio_iommu_type1_dma_map}, > + /* IOMMU-less mode */ > + { VFIO_NOIOMMU_IOMMU, "No-IOMMU", &vfio_iommu_noiommu_dma_map}, > +}; [...] > --- /dev/null > +++ b/lib/librte_eal/linuxapp/eal/eal_pci_vfio_dma.c Why a new file for these functions?