From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by dpdk.org (Postfix) with ESMTP id D12B419F5 for ; Sun, 10 Jul 2016 19:36:59 +0200 (CEST) Received: by mail-wm0-f48.google.com with SMTP id o80so23860224wme.1 for ; Sun, 10 Jul 2016 10:36:59 -0700 (PDT) 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:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=7i/bKz24e0pumS3bTstgIxiJc2g4lD0EY8POJSbwtR8=; b=fBncZcpkQ0vRB/ZL0M4eQgYGnrDKfdUG2MULliyQcPWZ9d0CH1x0uItgvjh5UQp22g x00dRiEKC/1dEMjJMAf8ojK/ySLUPNQlj8pJYeijSYn3Q1LpfcUjnvKskzgm0eLclry3 CWbw3xS914p8UWlMbGstrcX3mT0Ia20sGGYkAkYn92GXj49Czs54Low7lTZ/WoY5VAA7 KhjqVKoaqJ+NkawtvNhMhOi9MHif8QJbQkTgRTskj33DFsPCVMXYFE+QpBQyEKgmthBI GB9tc6puYZy3q1A0KjRZNDxMaj/BP2jkd550Ta2jUQvh9GbN4X2ERGlbNrbgOo06yepR 3FTw== 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:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=7i/bKz24e0pumS3bTstgIxiJc2g4lD0EY8POJSbwtR8=; b=ZV2jmBgXVZ32i8ewfeODAPZKgmZxbObaetKPK4KY5IkC/bjvkYgYC1fkYsxPH+MHV6 6R9G7tJSa2ghekXB19nVWu7O/nEFy6fADFYFwPjttL4nGD1c9qMM6Y0uqg9+ljsfJPKp TF9+T1g7NwEXM9K5eVSfZ5XtFG2qbqbA5rd//FFWH2atqhqGv50OcAeKqn6PLozo2tDf WPA1sBCdyFECd7SBEOkgbZWRUHGpeFsYqKYv7bNAgNqryq3wa9m6WCTDDwJ8A5w0/aOZ vPqPEuRl1AL8bM0J2l/lJosdw5u0zH4rTd+oh0VsVMVUI99KQxz6ruFnYcQr0Pz/BcpY pKsw== X-Gm-Message-State: ALyK8tIz5LetJbebOniM41zwfJ/4rn6Xi6QJIwhpyOuXVUNMvc7PRiDU5tbHIaZn8m7cn98n X-Received: by 10.28.191.193 with SMTP id o62mr8083281wmi.64.1468172219580; Sun, 10 Jul 2016 10:36:59 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id b84sm15632631wmb.6.2016.07.10.10.36.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Jul 2016 10:36:58 -0700 (PDT) From: Thomas Monjalon To: Jan Viktorin Cc: dev@dpdk.org, Anatoly Burakov , David Marchand , Keith Wiles , Santosh Shukla , Stephen Hemminger , Shreyansh Jain Date: Sun, 10 Jul 2016 19:36:57 +0200 Message-ID: <2658506.JKWTbPl3g7@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1467645411-15494-7-git-send-email-viktorin@rehivetech.com> References: <1467645411-15494-1-git-send-email-viktorin@rehivetech.com> <1467645411-15494-7-git-send-email-viktorin@rehivetech.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Subject: Re: [dpdk-dev] [PATCH v3 06/16] vfio: generalize pci_vfio_has_supported_extensions 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: Sun, 10 Jul 2016 17:37:00 -0000 There is a small error in this patch: 2016-07-04 17:16, Jan Viktorin: > The pci_vfio_has_supported_extensions is not PCI-specific and it is a= private > function of the eal_pci_vfio.c. We just rename the function and make = it > available even for non-PCI devices. |...] |> --- a/lib/librte_eal/linuxapp/eal/eal_vfio.c > +++ b/lib/librte_eal/linuxapp/eal/eal_vfio.c > @@ -62,6 +62,39 @@ vfio_set_iommu_type(int vfio_container_fd) { > } > =20 > int > +vfio_has_supported_extensions(int vfio_container_fd) { > +=09int ret; > +=09unsigned idx, n_extensions =3D 0; > +=09for (idx =3D 0; idx < RTE_DIM(iommu_types); idx++) { > +=09=09const struct vfio_iommu_type *t =3D &iommu_types[idx]; > + > +=09=09ret =3D ioctl(vfio_container_fd, VFIO_CHECK_EXTENSION, > +=09=09=09=09t->type_id); > +=09=09if (ret < 0) { > +=09=09=09RTE_LOG(ERR, EAL, " could not get IOMMU type, " > +=09=09=09=09"error %i (%s)\n", errno, > +=09=09=09=09strerror(errno)); > +=09=09=09close(vfio_container_fd); lib/librte_eal/linuxapp/eal/eal_vfio.c:77:4: error: implicit declaration of function =E2=80=98close=E2=80=99 It is fixed in patch 8 with "#include ".