From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [RFC][PATCH] vfio: allow to map other memory regions Date: Wed, 17 May 2017 10:20:23 -0700 Message-ID: <20170517102023.3c78590e@xeon-e3> References: <1495032287-216322-1-git-send-email-pawelx.wodkowski@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Pawel Wodkowski Return-path: Received: from mail-pf0-f182.google.com (mail-pf0-f182.google.com [209.85.192.182]) by dpdk.org (Postfix) with ESMTP id 11EE32C2F for ; Wed, 17 May 2017 19:20:33 +0200 (CEST) Received: by mail-pf0-f182.google.com with SMTP id 9so10584055pfj.1 for ; Wed, 17 May 2017 10:20:33 -0700 (PDT) In-Reply-To: <1495032287-216322-1-git-send-email-pawelx.wodkowski@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, 17 May 2017 16:44:46 +0200 Pawel Wodkowski wrote: > /* IOMMU types we support */ > static const struct vfio_iommu_type iommu_types[] = { > /* x86 IOMMU, otherwise known as type 1 */ > - { RTE_VFIO_TYPE1, "Type 1", &vfio_type1_dma_map}, > + { RTE_VFIO_TYPE1, "Type 1", &vfio_type1_dma_map, &vfio_type1_dma_mem_map}, > /* ppc64 IOMMU, otherwise known as spapr */ > - { RTE_VFIO_SPAPR, "sPAPR", &vfio_spapr_dma_map}, > + { RTE_VFIO_SPAPR, "sPAPR", &vfio_spapr_dma_map, NULL}, > /* IOMMU-less mode */ > - { RTE_VFIO_NOIOMMU, "No-IOMMU", &vfio_noiommu_dma_map}, > + { RTE_VFIO_NOIOMMU, "No-IOMMU", &vfio_noiommu_dma_map, &vfio_noiommu_dma_mem_map}, > }; For complex tables like this why not use C99 style initializer.