Message ID | 1417108480-28341-1-git-send-email-ssujith@cisco.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 095422E81; Thu, 27 Nov 2014 18:15:58 +0100 (CET) Received: from bgl-iport-2.cisco.com (bgl-iport-2.cisco.com [72.163.197.26]) by dpdk.org (Postfix) with ESMTP id E6B7E2A9 for <dev@dpdk.org>; Thu, 27 Nov 2014 18:15:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=2531; q=dns/txt; s=iport; t=1417108557; x=1418318157; h=from:to:cc:subject:date:message-id; bh=BoNdUZ85OBtJtRU1OdkC9wag26M2B8xxoovk3qHuF9g=; b=g/TumhT+7f+XjCSo8HQNjO7lCmoR2fFNukJwLbV4xIWiJdPGpt/PoGLk GTmb8cTBaWWquLTDvjaNiPoGf4XNPUolOsr9Q8R3uax0PlKbY8H5cd2AZ K754eXCANNh3tXCrRLDz3gFkMVcTFlR/Zsq+N9A3cuA/epxmjfmO5H+Y8 U=; X-IronPort-AV: E=Sophos;i="5.07,470,1413244800"; d="scan'208";a="47894802" Received: from vla196-nat.cisco.com (HELO bgl-core-2.cisco.com) ([72.163.197.24]) by bgl-iport-2.cisco.com with ESMTP; 27 Nov 2014 17:15:55 +0000 Received: from localhost ([10.106.186.168]) (authenticated bits=0) by bgl-core-2.cisco.com (8.14.5/8.14.5) with ESMTP id sARHFoPZ007605 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 27 Nov 2014 17:15:54 GMT From: Sujith Sankar <ssujith@cisco.com> To: dev@dpdk.org Date: Thu, 27 Nov 2014 22:44:40 +0530 Message-Id: <1417108480-28341-1-git-send-email-ssujith@cisco.com> X-Mailer: git-send-email 1.9.1 X-Authenticated-User: ssujith@cisco.com Subject: [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 <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
Sujith Sankar
Nov. 27, 2014, 5:14 p.m. UTC
Inclusion of vfio.h was giving compilation errors if kernel version is less
than 3.6.0 and if RTE_EAL_VFIO was on in config.
Replaced inclusion of vfio.h with eal_vfio.h and replaced RTE_EAL_VFIO with
VFIO_PRESENT in enicpmd code.
Signed-off-by: Sujith Sankar <ssujith@cisco.com>
---
lib/librte_pmd_enic/Makefile | 1 +
lib/librte_pmd_enic/enic_main.c | 13 +++++--------
2 files changed, 6 insertions(+), 8 deletions(-)
Comments
On 27/11/14 10:44 pm, "Sujith Sankar (ssujith)" <ssujith@cisco.com> wrote: >Inclusion of vfio.h was giving compilation errors if kernel version is >less >than 3.6.0 and if RTE_EAL_VFIO was on in config. > >Replaced inclusion of vfio.h with eal_vfio.h and replaced RTE_EAL_VFIO >with >VFIO_PRESENT in enicpmd code. eal_vfio.h is not included. The inclusion of vfio.h is removed. Sorry for the error in the description. > >Signed-off-by: Sujith Sankar <ssujith@cisco.com> >--- > lib/librte_pmd_enic/Makefile | 1 + > lib/librte_pmd_enic/enic_main.c | 13 +++++-------- > 2 files changed, 6 insertions(+), 8 deletions(-) > >diff --git a/lib/librte_pmd_enic/Makefile b/lib/librte_pmd_enic/Makefile >index d4c2f66..befc552 100644 >--- a/lib/librte_pmd_enic/Makefile >+++ b/lib/librte_pmd_enic/Makefile >@@ -39,6 +39,7 @@ LIB = librte_pmd_enic.a > > CFLAGS += -I$(RTE_SDK)/lib/librte_hash/ >-I$(RTE_SDK)/lib/librte_pmd_enic/vnic/ > CFLAGS += -I$(RTE_SDK)/lib/librte_pmd_enic/ >+CFLAGS += -I$(RTE_SDK)/lib/librte_eal/linuxapp/eal/ > CFLAGS += -O3 -Wno-deprecated > > VPATH += $(RTE_SDK)/lib/librte_pmd_enic/src >diff --git a/lib/librte_pmd_enic/enic_main.c >b/lib/librte_pmd_enic/enic_main.c >index 4b857bb..f6f00d3 100644 >--- a/lib/librte_pmd_enic/enic_main.c >+++ b/lib/librte_pmd_enic/enic_main.c >@@ -39,9 +39,6 @@ > #include <sys/mman.h> > #include <fcntl.h> > #include <libgen.h> >-#ifdef RTE_EAL_VFIO >-#include <linux/vfio.h> >-#endif > > #include <rte_pci.h> > #include <rte_memzone.h> >@@ -631,7 +628,7 @@ int enic_enable(struct enic *enic) > > vnic_dev_enable_wait(enic->vdev); > >-#ifndef RTE_EAL_VFIO >+#ifndef VFIO_PRESENT > /* Register and enable error interrupt */ > rte_intr_callback_register(&(enic->pdev->intr_handle), > enic_intr_handler, (void *)enic->rte_dev); >@@ -995,7 +992,7 @@ int enic_setup_finish(struct enic *enic) > return 0; > } > >-#ifdef RTE_EAL_VFIO >+#ifdef VFIO_PRESENT > static void enic_eventfd_init(struct enic *enic) > { > enic->eventfd = enic->pdev->intr_handle.fd; >@@ -1033,7 +1030,7 @@ int enic_get_link_status(struct enic *enic) > } > > >-#ifdef RTE_EAL_VFIO >+#ifdef VFIO_PRESENT > static int enic_create_err_intr_thread(struct enic *enic) > { > pthread_attr_t intr_attr; >@@ -1111,7 +1108,7 @@ static void enic_dev_deinit(struct enic *enic) > if (eth_dev->data->mac_addrs) > rte_free(eth_dev->data->mac_addrs); > >-#ifdef RTE_EAL_VFIO >+#ifdef VFIO_PRESENT > enic_clear_intr_mode(enic); > #endif > } >@@ -1167,7 +1164,7 @@ static int enic_dev_init(struct enic *enic) > */ > enic_get_res_counts(enic); > >-#ifdef RTE_EAL_VFIO >+#ifdef VFIO_PRESENT > /* Set interrupt mode based on resource counts and system > * capabilities > */ >-- >1.9.1 >
2014-11-27 22:44, Sujith Sankar: > Inclusion of vfio.h was giving compilation errors if kernel version is less > than 3.6.0 and if RTE_EAL_VFIO was on in config. > > Replaced inclusion of vfio.h with eal_vfio.h and replaced RTE_EAL_VFIO with > VFIO_PRESENT in enicpmd code. You should add Reported-by: Pawel Wodkowski <pawelx.wodkowski@intel.com> > Signed-off-by: Sujith Sankar <ssujith@cisco.com> [...] > CFLAGS += -I$(RTE_SDK)/lib/librte_hash/ -I$(RTE_SDK)/lib/librte_pmd_enic/vnic/ > CFLAGS += -I$(RTE_SDK)/lib/librte_pmd_enic/ > +CFLAGS += -I$(RTE_SDK)/lib/librte_eal/linuxapp/eal/ > CFLAGS += -O3 -Wno-deprecated I think -I$(RTE_SDK)/lib/librte_hash/ and -I$(RTE_SDK)/lib/librte_eal/linuxapp/eal/ are not needed. I'll fix it if you confirm.
2014-11-27 19:01, Thomas Monjalon: > 2014-11-27 22:44, Sujith Sankar: > > Inclusion of vfio.h was giving compilation errors if kernel version is less > > than 3.6.0 and if RTE_EAL_VFIO was on in config. > > > > Replaced inclusion of vfio.h with eal_vfio.h and replaced RTE_EAL_VFIO with > > VFIO_PRESENT in enicpmd code. > > You should add > Reported-by: Pawel Wodkowski <pawelx.wodkowski@intel.com> > > > Signed-off-by: Sujith Sankar <ssujith@cisco.com> > [...] > > CFLAGS += -I$(RTE_SDK)/lib/librte_hash/ -I$(RTE_SDK)/lib/librte_pmd_enic/vnic/ > > CFLAGS += -I$(RTE_SDK)/lib/librte_pmd_enic/ > > +CFLAGS += -I$(RTE_SDK)/lib/librte_eal/linuxapp/eal/ > > CFLAGS += -O3 -Wno-deprecated > > I think -I$(RTE_SDK)/lib/librte_hash/ and -I$(RTE_SDK)/lib/librte_eal/linuxapp/eal/ > are not needed. > > I'll fix it if you confirm. Applied with above comments.
Hi all, I have no comments on this issue, but I indeed see many places do have this kernel issue(before/now/future), so can solve this issue globally? Thus, we do not need to fix this case by case. One solution(not sure if it works or not): 1. features and kernel version required list. 2. When config DPDK before build, automatically check this list and if not mach, just disable this feature in config file even though user set it manually. Thus main code may not need to change. Does this works? Thanks, Michael On 11/28/2014 1:16 AM, Sujith Sankar wrote: > Inclusion of vfio.h was giving compilation errors if kernel version is less > than 3.6.0 and if RTE_EAL_VFIO was on in config. > > Replaced inclusion of vfio.h with eal_vfio.h and replaced RTE_EAL_VFIO with > VFIO_PRESENT in enicpmd code. > > Signed-off-by: Sujith Sankar <ssujith@cisco.com> > --- > lib/librte_pmd_enic/Makefile | 1 + > lib/librte_pmd_enic/enic_main.c | 13 +++++-------- > 2 files changed, 6 insertions(+), 8 deletions(-) > > diff --git a/lib/librte_pmd_enic/Makefile b/lib/librte_pmd_enic/Makefile > index d4c2f66..befc552 100644 > --- a/lib/librte_pmd_enic/Makefile > +++ b/lib/librte_pmd_enic/Makefile > @@ -39,6 +39,7 @@ LIB = librte_pmd_enic.a > > CFLAGS += -I$(RTE_SDK)/lib/librte_hash/ -I$(RTE_SDK)/lib/librte_pmd_enic/vnic/ > CFLAGS += -I$(RTE_SDK)/lib/librte_pmd_enic/ > +CFLAGS += -I$(RTE_SDK)/lib/librte_eal/linuxapp/eal/ > CFLAGS += -O3 -Wno-deprecated > > VPATH += $(RTE_SDK)/lib/librte_pmd_enic/src > diff --git a/lib/librte_pmd_enic/enic_main.c b/lib/librte_pmd_enic/enic_main.c > index 4b857bb..f6f00d3 100644 > --- a/lib/librte_pmd_enic/enic_main.c > +++ b/lib/librte_pmd_enic/enic_main.c > @@ -39,9 +39,6 @@ > #include <sys/mman.h> > #include <fcntl.h> > #include <libgen.h> > -#ifdef RTE_EAL_VFIO > -#include <linux/vfio.h> > -#endif > > #include <rte_pci.h> > #include <rte_memzone.h> > @@ -631,7 +628,7 @@ int enic_enable(struct enic *enic) > > vnic_dev_enable_wait(enic->vdev); > > -#ifndef RTE_EAL_VFIO > +#ifndef VFIO_PRESENT > /* Register and enable error interrupt */ > rte_intr_callback_register(&(enic->pdev->intr_handle), > enic_intr_handler, (void *)enic->rte_dev); > @@ -995,7 +992,7 @@ int enic_setup_finish(struct enic *enic) > return 0; > } > > -#ifdef RTE_EAL_VFIO > +#ifdef VFIO_PRESENT > static void enic_eventfd_init(struct enic *enic) > { > enic->eventfd = enic->pdev->intr_handle.fd; > @@ -1033,7 +1030,7 @@ int enic_get_link_status(struct enic *enic) > } > > > -#ifdef RTE_EAL_VFIO > +#ifdef VFIO_PRESENT > static int enic_create_err_intr_thread(struct enic *enic) > { > pthread_attr_t intr_attr; > @@ -1111,7 +1108,7 @@ static void enic_dev_deinit(struct enic *enic) > if (eth_dev->data->mac_addrs) > rte_free(eth_dev->data->mac_addrs); > > -#ifdef RTE_EAL_VFIO > +#ifdef VFIO_PRESENT > enic_clear_intr_mode(enic); > #endif > } > @@ -1167,7 +1164,7 @@ static int enic_dev_init(struct enic *enic) > */ > enic_get_res_counts(enic); > > -#ifdef RTE_EAL_VFIO > +#ifdef VFIO_PRESENT > /* Set interrupt mode based on resource counts and system > * capabilities > */
On 28/11/14 1:54 am, "Thomas Monjalon" <thomas.monjalon@6wind.com> wrote: >2014-11-27 19:01, Thomas Monjalon: >> 2014-11-27 22:44, Sujith Sankar: >> > Inclusion of vfio.h was giving compilation errors if kernel version >>is less >> > than 3.6.0 and if RTE_EAL_VFIO was on in config. >> > >> > Replaced inclusion of vfio.h with eal_vfio.h and replaced >>RTE_EAL_VFIO with >> > VFIO_PRESENT in enicpmd code. >> >> You should add >> Reported-by: Pawel Wodkowski <pawelx.wodkowski@intel.com> I shall take care of this from now on. >> >> > Signed-off-by: Sujith Sankar <ssujith@cisco.com> >> [...] >> > CFLAGS += -I$(RTE_SDK)/lib/librte_hash/ >>-I$(RTE_SDK)/lib/librte_pmd_enic/vnic/ >> > CFLAGS += -I$(RTE_SDK)/lib/librte_pmd_enic/ >> > +CFLAGS += -I$(RTE_SDK)/lib/librte_eal/linuxapp/eal/ >> > CFLAGS += -O3 -Wno-deprecated >> >> I think -I$(RTE_SDK)/lib/librte_hash/ and >>-I$(RTE_SDK)/lib/librte_eal/linuxapp/eal/ >> are not needed. >> >> I'll fix it if you confirm. You¹re right. > >Applied with above comments. Thank you Thomas ! > >-- >Thomas
2014-11-28 02:09, Qiu, Michael: > I have no comments on this issue, but I indeed see many places do have > this kernel issue(before/now/future), so can solve this issue globally? > > Thus, we do not need to fix this case by case. > > One solution(not sure if it works or not): > > 1. features and kernel version required list. > 2. When config DPDK before build, automatically check this list and if > not mach, just disable this feature in config file even though user set > it manually. > > Thus main code may not need to change. > > Does this works? If configuration system was different, we could have a list of constraint to satisfy before enabling a feature.
On Fri, Nov 28, 2014 at 02:09:40AM +0000, Qiu, Michael wrote: > Hi all, > > I have no comments on this issue, but I indeed see many places do have > this kernel issue(before/now/future), so can solve this issue globally? > > Thus, we do not need to fix this case by case. > > One solution(not sure if it works or not): > > 1. features and kernel version required list. > 2. When config DPDK before build, automatically check this list and if > not mach, just disable this feature in config file even though user set > it manually. > Instead of enumerating a kernel version, this should be designed as an enumeration of feature sets. That way you can enable DPDK features based on kernel feature availability (i.e. kernel version doesn't necessecarily imply feature set, like when a distribution backports a given feature to an older kernel. What would really make the most sense I think is to convert the configuration system to autoconf/automake, so that these tests can be preformed at config time. Neil > Thus main code may not need to change. > > Does this works? > > Thanks, > Michael > > On 11/28/2014 1:16 AM, Sujith Sankar wrote: > > Inclusion of vfio.h was giving compilation errors if kernel version is less > > than 3.6.0 and if RTE_EAL_VFIO was on in config. > > > > Replaced inclusion of vfio.h with eal_vfio.h and replaced RTE_EAL_VFIO with > > VFIO_PRESENT in enicpmd code. > > > > Signed-off-by: Sujith Sankar <ssujith@cisco.com> > > --- > > lib/librte_pmd_enic/Makefile | 1 + > > lib/librte_pmd_enic/enic_main.c | 13 +++++-------- > > 2 files changed, 6 insertions(+), 8 deletions(-) > > > > diff --git a/lib/librte_pmd_enic/Makefile b/lib/librte_pmd_enic/Makefile > > index d4c2f66..befc552 100644 > > --- a/lib/librte_pmd_enic/Makefile > > +++ b/lib/librte_pmd_enic/Makefile > > @@ -39,6 +39,7 @@ LIB = librte_pmd_enic.a > > > > CFLAGS += -I$(RTE_SDK)/lib/librte_hash/ -I$(RTE_SDK)/lib/librte_pmd_enic/vnic/ > > CFLAGS += -I$(RTE_SDK)/lib/librte_pmd_enic/ > > +CFLAGS += -I$(RTE_SDK)/lib/librte_eal/linuxapp/eal/ > > CFLAGS += -O3 -Wno-deprecated > > > > VPATH += $(RTE_SDK)/lib/librte_pmd_enic/src > > diff --git a/lib/librte_pmd_enic/enic_main.c b/lib/librte_pmd_enic/enic_main.c > > index 4b857bb..f6f00d3 100644 > > --- a/lib/librte_pmd_enic/enic_main.c > > +++ b/lib/librte_pmd_enic/enic_main.c > > @@ -39,9 +39,6 @@ > > #include <sys/mman.h> > > #include <fcntl.h> > > #include <libgen.h> > > -#ifdef RTE_EAL_VFIO > > -#include <linux/vfio.h> > > -#endif > > > > #include <rte_pci.h> > > #include <rte_memzone.h> > > @@ -631,7 +628,7 @@ int enic_enable(struct enic *enic) > > > > vnic_dev_enable_wait(enic->vdev); > > > > -#ifndef RTE_EAL_VFIO > > +#ifndef VFIO_PRESENT > > /* Register and enable error interrupt */ > > rte_intr_callback_register(&(enic->pdev->intr_handle), > > enic_intr_handler, (void *)enic->rte_dev); > > @@ -995,7 +992,7 @@ int enic_setup_finish(struct enic *enic) > > return 0; > > } > > > > -#ifdef RTE_EAL_VFIO > > +#ifdef VFIO_PRESENT > > static void enic_eventfd_init(struct enic *enic) > > { > > enic->eventfd = enic->pdev->intr_handle.fd; > > @@ -1033,7 +1030,7 @@ int enic_get_link_status(struct enic *enic) > > } > > > > > > -#ifdef RTE_EAL_VFIO > > +#ifdef VFIO_PRESENT > > static int enic_create_err_intr_thread(struct enic *enic) > > { > > pthread_attr_t intr_attr; > > @@ -1111,7 +1108,7 @@ static void enic_dev_deinit(struct enic *enic) > > if (eth_dev->data->mac_addrs) > > rte_free(eth_dev->data->mac_addrs); > > > > -#ifdef RTE_EAL_VFIO > > +#ifdef VFIO_PRESENT > > enic_clear_intr_mode(enic); > > #endif > > } > > @@ -1167,7 +1164,7 @@ static int enic_dev_init(struct enic *enic) > > */ > > enic_get_res_counts(enic); > > > > -#ifdef RTE_EAL_VFIO > > +#ifdef VFIO_PRESENT > > /* Set interrupt mode based on resource counts and system > > * capabilities > > */ > >
On 11/28/2014 10:22 PM, Thomas Monjalon wrote: > 2014-11-28 02:09, Qiu, Michael: >> I have no comments on this issue, but I indeed see many places do have >> this kernel issue(before/now/future), so can solve this issue globally? >> >> Thus, we do not need to fix this case by case. >> >> One solution(not sure if it works or not): >> >> 1. features and kernel version required list. >> 2. When config DPDK before build, automatically check this list and if >> not mach, just disable this feature in config file even though user set >> it manually. >> >> Thus main code may not need to change. >> >> Does this works? > If configuration system was different, we could have a list of constraint > to satisfy before enabling a feature. Yes, I thinks so. BTW, Is this valuable to spend time on, or can become one feature? If so, I would like to have some time to do some research on it. Thanks, Michael >
On 11/28/2014 10:56 PM, Neil Horman wrote: > On Fri, Nov 28, 2014 at 02:09:40AM +0000, Qiu, Michael wrote: >> Hi all, >> >> I have no comments on this issue, but I indeed see many places do have >> this kernel issue(before/now/future), so can solve this issue globally? >> >> Thus, we do not need to fix this case by case. >> >> One solution(not sure if it works or not): >> >> 1. features and kernel version required list. >> 2. When config DPDK before build, automatically check this list and if >> not mach, just disable this feature in config file even though user set >> it manually. >> > Instead of enumerating a kernel version, this should be designed as an > enumeration of feature sets. That way you can enable DPDK features based on > kernel feature availability (i.e. kernel version doesn't necessecarily imply > feature set, like when a distribution backports a given feature to an older > kernel. Yes, you are right, I haven't consider about this situation before. Actually, for kernel version based static available list, DPDK at least could run without risk. > What would really make the most sense I think is to convert the configuration > system to autoconf/automake, so that these tests can be preformed at config > time. Agree, Another choice is would be like the linux kernel, type 'make config' or 'make menuconfig' and post the feature list to user, this is more friendly for cross-compile in my option. Thanks, Michael > Neil > >> Thus main code may not need to change. >> >> Does this works? >> >> Thanks, >> Michael >> >> On 11/28/2014 1:16 AM, Sujith Sankar wrote: >>> Inclusion of vfio.h was giving compilation errors if kernel version is less >>> than 3.6.0 and if RTE_EAL_VFIO was on in config. >>> >>> Replaced inclusion of vfio.h with eal_vfio.h and replaced RTE_EAL_VFIO with >>> VFIO_PRESENT in enicpmd code. >>> >>> Signed-off-by: Sujith Sankar <ssujith@cisco.com> >>> --- >>> lib/librte_pmd_enic/Makefile | 1 + >>> lib/librte_pmd_enic/enic_main.c | 13 +++++-------- >>> 2 files changed, 6 insertions(+), 8 deletions(-) >>> >>> diff --git a/lib/librte_pmd_enic/Makefile b/lib/librte_pmd_enic/Makefile >>> index d4c2f66..befc552 100644 >>> --- a/lib/librte_pmd_enic/Makefile >>> +++ b/lib/librte_pmd_enic/Makefile >>> @@ -39,6 +39,7 @@ LIB = librte_pmd_enic.a >>> >>> CFLAGS += -I$(RTE_SDK)/lib/librte_hash/ -I$(RTE_SDK)/lib/librte_pmd_enic/vnic/ >>> CFLAGS += -I$(RTE_SDK)/lib/librte_pmd_enic/ >>> +CFLAGS += -I$(RTE_SDK)/lib/librte_eal/linuxapp/eal/ >>> CFLAGS += -O3 -Wno-deprecated >>> >>> VPATH += $(RTE_SDK)/lib/librte_pmd_enic/src >>> diff --git a/lib/librte_pmd_enic/enic_main.c b/lib/librte_pmd_enic/enic_main.c >>> index 4b857bb..f6f00d3 100644 >>> --- a/lib/librte_pmd_enic/enic_main.c >>> +++ b/lib/librte_pmd_enic/enic_main.c >>> @@ -39,9 +39,6 @@ >>> #include <sys/mman.h> >>> #include <fcntl.h> >>> #include <libgen.h> >>> -#ifdef RTE_EAL_VFIO >>> -#include <linux/vfio.h> >>> -#endif >>> >>> #include <rte_pci.h> >>> #include <rte_memzone.h> >>> @@ -631,7 +628,7 @@ int enic_enable(struct enic *enic) >>> >>> vnic_dev_enable_wait(enic->vdev); >>> >>> -#ifndef RTE_EAL_VFIO >>> +#ifndef VFIO_PRESENT >>> /* Register and enable error interrupt */ >>> rte_intr_callback_register(&(enic->pdev->intr_handle), >>> enic_intr_handler, (void *)enic->rte_dev); >>> @@ -995,7 +992,7 @@ int enic_setup_finish(struct enic *enic) >>> return 0; >>> } >>> >>> -#ifdef RTE_EAL_VFIO >>> +#ifdef VFIO_PRESENT >>> static void enic_eventfd_init(struct enic *enic) >>> { >>> enic->eventfd = enic->pdev->intr_handle.fd; >>> @@ -1033,7 +1030,7 @@ int enic_get_link_status(struct enic *enic) >>> } >>> >>> >>> -#ifdef RTE_EAL_VFIO >>> +#ifdef VFIO_PRESENT >>> static int enic_create_err_intr_thread(struct enic *enic) >>> { >>> pthread_attr_t intr_attr; >>> @@ -1111,7 +1108,7 @@ static void enic_dev_deinit(struct enic *enic) >>> if (eth_dev->data->mac_addrs) >>> rte_free(eth_dev->data->mac_addrs); >>> >>> -#ifdef RTE_EAL_VFIO >>> +#ifdef VFIO_PRESENT >>> enic_clear_intr_mode(enic); >>> #endif >>> } >>> @@ -1167,7 +1164,7 @@ static int enic_dev_init(struct enic *enic) >>> */ >>> enic_get_res_counts(enic); >>> >>> -#ifdef RTE_EAL_VFIO >>> +#ifdef VFIO_PRESENT >>> /* Set interrupt mode based on resource counts and system >>> * capabilities >>> */ >>
diff --git a/lib/librte_pmd_enic/Makefile b/lib/librte_pmd_enic/Makefile index d4c2f66..befc552 100644 --- a/lib/librte_pmd_enic/Makefile +++ b/lib/librte_pmd_enic/Makefile @@ -39,6 +39,7 @@ LIB = librte_pmd_enic.a CFLAGS += -I$(RTE_SDK)/lib/librte_hash/ -I$(RTE_SDK)/lib/librte_pmd_enic/vnic/ CFLAGS += -I$(RTE_SDK)/lib/librte_pmd_enic/ +CFLAGS += -I$(RTE_SDK)/lib/librte_eal/linuxapp/eal/ CFLAGS += -O3 -Wno-deprecated VPATH += $(RTE_SDK)/lib/librte_pmd_enic/src diff --git a/lib/librte_pmd_enic/enic_main.c b/lib/librte_pmd_enic/enic_main.c index 4b857bb..f6f00d3 100644 --- a/lib/librte_pmd_enic/enic_main.c +++ b/lib/librte_pmd_enic/enic_main.c @@ -39,9 +39,6 @@ #include <sys/mman.h> #include <fcntl.h> #include <libgen.h> -#ifdef RTE_EAL_VFIO -#include <linux/vfio.h> -#endif #include <rte_pci.h> #include <rte_memzone.h> @@ -631,7 +628,7 @@ int enic_enable(struct enic *enic) vnic_dev_enable_wait(enic->vdev); -#ifndef RTE_EAL_VFIO +#ifndef VFIO_PRESENT /* Register and enable error interrupt */ rte_intr_callback_register(&(enic->pdev->intr_handle), enic_intr_handler, (void *)enic->rte_dev); @@ -995,7 +992,7 @@ int enic_setup_finish(struct enic *enic) return 0; } -#ifdef RTE_EAL_VFIO +#ifdef VFIO_PRESENT static void enic_eventfd_init(struct enic *enic) { enic->eventfd = enic->pdev->intr_handle.fd; @@ -1033,7 +1030,7 @@ int enic_get_link_status(struct enic *enic) } -#ifdef RTE_EAL_VFIO +#ifdef VFIO_PRESENT static int enic_create_err_intr_thread(struct enic *enic) { pthread_attr_t intr_attr; @@ -1111,7 +1108,7 @@ static void enic_dev_deinit(struct enic *enic) if (eth_dev->data->mac_addrs) rte_free(eth_dev->data->mac_addrs); -#ifdef RTE_EAL_VFIO +#ifdef VFIO_PRESENT enic_clear_intr_mode(enic); #endif } @@ -1167,7 +1164,7 @@ static int enic_dev_init(struct enic *enic) */ enic_get_res_counts(enic); -#ifdef RTE_EAL_VFIO +#ifdef VFIO_PRESENT /* Set interrupt mode based on resource counts and system * capabilities */