From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 2C1D8DE0 for ; Tue, 2 Dec 2014 08:24:43 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP; 01 Dec 2014 23:24:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,691,1406617200"; d="scan'208";a="492115914" Received: from kmsmsx153.gar.corp.intel.com ([172.21.73.88]) by orsmga003.jf.intel.com with ESMTP; 01 Dec 2014 23:21:29 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.110.15) by KMSMSX153.gar.corp.intel.com (172.21.73.88) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 2 Dec 2014 15:24:40 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.110]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.182]) with mapi id 14.03.0195.001; Tue, 2 Dec 2014 15:24:39 +0800 From: "Qiu, Michael" To: Neil Horman Thread-Topic: [dpdk-dev] [PATCH] enicpmd: compilation error during inclusion of vfio.h Thread-Index: AQHQCmXcD1kyoaMpW0moBIYzz5u9IQ== Date: Tue, 2 Dec 2014 07:24:38 +0000 Message-ID: <533710CFB86FA344BFBF2D6802E60286C9BF12@SHSMSX101.ccr.corp.intel.com> References: <1417108480-28341-1-git-send-email-ssujith@cisco.com> <533710CFB86FA344BFBF2D6802E60286C9B11F@SHSMSX101.ccr.corp.intel.com> <20141128145606.GA7736@localhost.localdomain> 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 Cc: "dev@dpdk.org" 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: Tue, 02 Dec 2014 07:24:46 -0000 On 11/28/2014 10:56 PM, Neil Horman wrote:=0A= > On Fri, Nov 28, 2014 at 02:09:40AM +0000, Qiu, Michael wrote:=0A= >> 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= > Instead of enumerating a kernel version, this should be designed as an=0A= > enumeration of feature sets. That way you can enable DPDK features based= on=0A= > kernel feature availability (i.e. kernel version doesn't necessecarily im= ply=0A= > feature set, like when a distribution backports a given feature to an old= er=0A= > kernel.=0A= =0A= Yes, you are right, I haven't consider about this situation before.=0A= Actually, for kernel version based static available list, DPDK at least=0A= could run without risk.=0A= =0A= > What would really make the most sense I think is to convert the configura= tion=0A= > system to autoconf/automake, so that these tests can be preformed at conf= ig=0A= > time.=0A= =0A= Agree,=0A= Another choice is would be like the linux kernel, type 'make config' or=0A= 'make menuconfig' and post the feature list to user, this is more=0A= friendly for cross-compile in my option.=0A= =0A= Thanks,=0A= Michael=0A= > Neil=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 = less=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 = with=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/Makefil= e=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_= enic/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= _main.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= =0A=