From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 248AD7E79 for ; Tue, 16 Dec 2014 11:23:14 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 16 Dec 2014 02:22:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="429575926" Received: from irsmsx154.ger.corp.intel.com ([163.33.192.96]) by FMSMGA003.fm.intel.com with ESMTP; 16 Dec 2014 02:11:41 -0800 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.244]) by IRSMSX154.ger.corp.intel.com ([169.254.12.15]) with mapi id 14.03.0195.001; Tue, 16 Dec 2014 10:22:44 +0000 From: "Burakov, Anatoly" To: "Sujith Sankar (ssujith)" , Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH] enic: corrected the usage of VFIO_PRESENT Thread-Index: AQHQFeR5DfuNivKUskqdsN9BaeWDHpyRULeAgABQkYCAAGbVUA== Date: Tue, 16 Dec 2014 10:22:44 +0000 Message-ID: References: <1418372303-31565-1-git-send-email-ssujith@cisco.com> <5911790.4rCTPaIceN@xps13> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH] enic: corrected the usage of VFIO_PRESENT 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: Tue, 16 Dec 2014 10:23:15 -0000 > On 16/12/14 4:54 am, "Thomas Monjalon" > wrote: >=20 > >2014-12-12 13:48, Sujith Sankar: > >> This patch corrects the usage of the flag VFIO_PRESENT in enic driver. > > > >Please, could you explain why the flag VFIO_PRESENT was not well used? >=20 > Without including eal_vfio.h, VFIO_PRESENT is not available in enic. > Hence VFIO specific code in enic was not getting compiled and some errors > were generated during run-time. >=20 > > > >> This has uncovered a few warnings, and this patch corrects those too. > >[...] > >> --- a/lib/librte_pmd_enic/enic_main.c > >> +++ b/lib/librte_pmd_enic/enic_main.c > >> @@ -39,6 +39,7 @@ > >> #include > >> #include > >> #include > >> +#include > >> > >> #include > >> #include > >> @@ -46,6 +47,7 @@ > >> #include > >> #include > >> #include > >> +#include > > > >This header was not designed to be included by PMDs. > >It will break compilation on BSD. >=20 > Is there an alternative to make VFIO_PRESENT available in enic? Please > advise. >=20 > Thanks, > -Sujith >=20 > > > >> #include "enic_compat.h" > >> #include "enic.h" > >> @@ -561,6 +563,7 @@ enic_free_consistent(__rte_unused struct > >>rte_pci_device *hwdev, > >> /* Nothing to be done */ > >> } > >> > >> +#ifndef VFIO_PRESENT > >> static void > >> enic_intr_handler(__rte_unused struct rte_intr_handle *handle, > >> void *arg) > >> @@ -572,6 +575,7 @@ enic_intr_handler(__rte_unused struct > >>rte_intr_handle *handle, > >> > >> enic_log_q_error(enic); > >> } > >> +#endif > > > >-- > >Thomas Hi Sujith Thomas is correct, VFIO code is designed to be EAL-only (mainly because it'= s Linuxapp-specific, and PMD's are intended to be cross-platform at least w= hen it comes to compilation). Whatever it is that you're working around is = better fixed in the EAL itself rather than in the PMD. Thanks, Anatoly