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 AC3AE1518 for ; Fri, 28 Nov 2014 03:10:18 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 27 Nov 2014 18:09:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,473,1413270000"; d="scan'208";a="629433797" Received: from pgsmsx103.gar.corp.intel.com ([10.221.44.82]) by fmsmga001.fm.intel.com with ESMTP; 27 Nov 2014 18:09:43 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by PGSMSX103.gar.corp.intel.com (10.221.44.82) with Microsoft SMTP Server (TLS) id 14.3.195.1; Fri, 28 Nov 2014 10:09:42 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.110]) by shsmsx102.ccr.corp.intel.com ([169.254.2.216]) with mapi id 14.03.0195.001; Fri, 28 Nov 2014 10:09:41 +0800 From: "Qiu, Michael" To: Sujith Sankar , "dev@dpdk.org" , "thomas.monjalon@6wind.com" , "Richardson, Bruce" Thread-Topic: [dpdk-dev] [PATCH] enicpmd: compilation error during inclusion of vfio.h Thread-Index: AQHQCmXcD1kyoaMpW0moBIYzz5u9IQ== Date: Fri, 28 Nov 2014 02:09:40 +0000 Message-ID: <533710CFB86FA344BFBF2D6802E60286C9B11F@SHSMSX101.ccr.corp.intel.com> References: <1417108480-28341-1-git-send-email-ssujith@cisco.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] enicpmd: compilation error during inclusion of vfio.h 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: Fri, 28 Nov 2014 02:10:19 -0000 Hi all,=0A= =0A= I have no comments on this issue, but I indeed see many places do have=0A= this kernel issue(before/now/future), so can solve this issue globally?=0A= =0A= Thus, we do not need to fix this case by case.=0A= =0A= One solution(not sure if it works or not):=0A= =0A= 1. features and kernel version required list.=0A= 2. When config DPDK before build, automatically check this list and if=0A= not mach, just disable this feature in config file even though user set=0A= it manually.=0A= =0A= Thus main code may not need to change.=0A= =0A= Does this works?=0A= =0A= Thanks,=0A= Michael=0A= =0A= On 11/28/2014 1:16 AM, Sujith Sankar wrote:=0A= > Inclusion of vfio.h was giving compilation errors if kernel version is le= ss=0A= > than 3.6.0 and if RTE_EAL_VFIO was on in config.=0A= >=0A= > Replaced inclusion of vfio.h with eal_vfio.h and replaced RTE_EAL_VFIO wi= th=0A= > VFIO_PRESENT in enicpmd code.=0A= >=0A= > Signed-off-by: Sujith Sankar =0A= > ---=0A= > lib/librte_pmd_enic/Makefile | 1 +=0A= > lib/librte_pmd_enic/enic_main.c | 13 +++++--------=0A= > 2 files changed, 6 insertions(+), 8 deletions(-)=0A= >=0A= > diff --git a/lib/librte_pmd_enic/Makefile b/lib/librte_pmd_enic/Makefile= =0A= > index d4c2f66..befc552 100644=0A= > --- a/lib/librte_pmd_enic/Makefile=0A= > +++ b/lib/librte_pmd_enic/Makefile=0A= > @@ -39,6 +39,7 @@ LIB =3D librte_pmd_enic.a=0A= > =0A= > CFLAGS +=3D -I$(RTE_SDK)/lib/librte_hash/ -I$(RTE_SDK)/lib/librte_pmd_en= ic/vnic/=0A= > CFLAGS +=3D -I$(RTE_SDK)/lib/librte_pmd_enic/=0A= > +CFLAGS +=3D -I$(RTE_SDK)/lib/librte_eal/linuxapp/eal/=0A= > CFLAGS +=3D -O3 -Wno-deprecated=0A= > =0A= > VPATH +=3D $(RTE_SDK)/lib/librte_pmd_enic/src=0A= > diff --git a/lib/librte_pmd_enic/enic_main.c b/lib/librte_pmd_enic/enic_m= ain.c=0A= > index 4b857bb..f6f00d3 100644=0A= > --- a/lib/librte_pmd_enic/enic_main.c=0A= > +++ b/lib/librte_pmd_enic/enic_main.c=0A= > @@ -39,9 +39,6 @@=0A= > #include =0A= > #include =0A= > #include =0A= > -#ifdef RTE_EAL_VFIO=0A= > -#include =0A= > -#endif=0A= > =0A= > #include =0A= > #include =0A= > @@ -631,7 +628,7 @@ int enic_enable(struct enic *enic)=0A= > =0A= > vnic_dev_enable_wait(enic->vdev);=0A= > =0A= > -#ifndef RTE_EAL_VFIO=0A= > +#ifndef VFIO_PRESENT=0A= > /* Register and enable error interrupt */=0A= > rte_intr_callback_register(&(enic->pdev->intr_handle),=0A= > enic_intr_handler, (void *)enic->rte_dev);=0A= > @@ -995,7 +992,7 @@ int enic_setup_finish(struct enic *enic)=0A= > return 0;=0A= > }=0A= > =0A= > -#ifdef RTE_EAL_VFIO=0A= > +#ifdef VFIO_PRESENT=0A= > static void enic_eventfd_init(struct enic *enic)=0A= > {=0A= > enic->eventfd =3D enic->pdev->intr_handle.fd;=0A= > @@ -1033,7 +1030,7 @@ int enic_get_link_status(struct enic *enic)=0A= > }=0A= > =0A= > =0A= > -#ifdef RTE_EAL_VFIO=0A= > +#ifdef VFIO_PRESENT=0A= > static int enic_create_err_intr_thread(struct enic *enic)=0A= > {=0A= > pthread_attr_t intr_attr;=0A= > @@ -1111,7 +1108,7 @@ static void enic_dev_deinit(struct enic *enic)=0A= > if (eth_dev->data->mac_addrs)=0A= > rte_free(eth_dev->data->mac_addrs);=0A= > =0A= > -#ifdef RTE_EAL_VFIO=0A= > +#ifdef VFIO_PRESENT=0A= > enic_clear_intr_mode(enic);=0A= > #endif=0A= > }=0A= > @@ -1167,7 +1164,7 @@ static int enic_dev_init(struct enic *enic)=0A= > */=0A= > enic_get_res_counts(enic);=0A= > =0A= > -#ifdef RTE_EAL_VFIO=0A= > +#ifdef VFIO_PRESENT=0A= > /* Set interrupt mode based on resource counts and system=0A= > * capabilities=0A= > */=0A= =0A=