dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
From: "Sujith Sankar (ssujith)" <ssujith-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
To: "dev-VfR2kkLFssw@public.gmane.org" <dev-VfR2kkLFssw@public.gmane.org>
Subject: Re: [PATCH] enicpmd: compilation error during inclusion of vfio.h
Date: Thu, 27 Nov 2014 17:22:31 +0000	[thread overview]
Message-ID: <D09D5B5D.28F99%ssujith@cisco.com> (raw)
In-Reply-To: <1417108480-28341-1-git-send-email-ssujith-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>



On 27/11/14 10:44 pm, "Sujith Sankar (ssujith)" <ssujith-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> 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-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
>---
> 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
>

  parent reply	other threads:[~2014-11-27 17:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-27 17:14 [PATCH] enicpmd: compilation error during inclusion of vfio.h Sujith Sankar
     [not found] ` <1417108480-28341-1-git-send-email-ssujith-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2014-11-27 17:22   ` Sujith Sankar (ssujith) [this message]
2014-11-27 18:01   ` Thomas Monjalon
2014-11-27 20:24     ` Thomas Monjalon
2014-11-28  2:31       ` Sujith Sankar (ssujith)
2014-11-28  2:09 ` Qiu, Michael
     [not found]   ` <533710CFB86FA344BFBF2D6802E60286C9B11F-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-11-28 14:16     ` Thomas Monjalon
2014-12-02  7:10       ` Qiu, Michael
2014-11-28 14:56     ` Neil Horman
2014-12-02  7:24       ` Qiu, Michael

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D09D5B5D.28F99%ssujith@cisco.com \
    --to=ssujith-fyb4gu1cfyuavxtiumwx3w@public.gmane.org \
    --cc=dev-VfR2kkLFssw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).