From: "Gaëtan Rivet" <gaetan.rivet@6wind.com>
To: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Cc: dev@dpdk.org, thomas@monjalon.net
Subject: Re: [dpdk-dev] [PATCH] bus/pci: fix vfio mode
Date: Mon, 30 Oct 2017 09:06:54 +0100 [thread overview]
Message-ID: <20171030080654.GF10890@bidouze.vm.6wind.com> (raw)
In-Reply-To: <20171028062053.6615-1-jerin.jacob@caviumnetworks.com>
Hi Jerin,
On Sat, Oct 28, 2017 at 11:50:52AM +0530, Jerin Jacob wrote:
> The definition of VFIO_PRESENT is "eal_vfio.h", Fail to
> include eal_vfio.h will result in disabling vfio.
>
> Fixes: 279b581c897d ("vfio: expose functions")
>
Thanks for the fix, sorry for VFIO.
I tried to let go of VFIO_PRESENT in the PCI patchset, unfortunately I did
not do a good-enough job.
Instead of reinstating the dependency on the private eal_vfio.h header,
I'd suggest replacing all VFIO_PRESENT references within the PCI bus by
RTE_EAL_VFIO, and make the pci_vfio.c compilation depend on it within
the linux Makefile. Something like:
---8<---
grep -rl VFIO_PRESENT drivers/bus/pci/linux/ |while read -r file
do sed -i 's;VFIO_PRESENT;RTE_EAL_VFIO;' $file
done
patch -p1 <<___HERE
diff --git a/drivers/bus/pci/linux/Makefile b/drivers/bus/pci/linux/Makefile
index 77c5f97..b5b9c54 100644
--- a/drivers/bus/pci/linux/Makefile
+++ b/drivers/bus/pci/linux/Makefile
@@ -31,6 +31,8 @@
SRCS += pci.c
SRCS += pci_uio.c
+ifeq (\$(CONFIG_RTE_EAL_VFIO),y)
SRCS += pci_vfio.c
+endif
CFLAGS += -D_GNU_SOURCE
___HERE
--->8---
Do you think it could work? If so, I think it would be preferable
to re-including eal_vfio.h. Private EAL headers are bound to be removed
from other subsystems at some point. I tried to start with VFIO, others
should follow.
> Cc: Gaetan Rivet <gaetan.rivet@6wind.com>
>
> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> ---
> drivers/bus/pci/linux/pci.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
> index cdf810693..d0ce0207a 100644
> --- a/drivers/bus/pci/linux/pci.c
> +++ b/drivers/bus/pci/linux/pci.c
> @@ -46,6 +46,7 @@
>
> #include "eal_private.h"
> #include "eal_filesystem.h"
> +#include "eal_vfio.h"
>
> #include "private.h"
> #include "pci_init.h"
> --
> 2.14.3
>
--
Gaëtan Rivet
6WIND
next prev parent reply other threads:[~2017-10-30 8:07 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-28 6:20 Jerin Jacob
2017-10-30 8:06 ` Gaëtan Rivet [this message]
2017-10-30 9:00 ` Ferruh Yigit
2017-10-30 9:17 ` Gaëtan Rivet
2017-10-30 9:27 ` Thomas Monjalon
2017-10-30 11:24 ` Thomas Monjalon
2017-10-30 16:57 ` Ferruh Yigit
2017-10-30 17:13 ` Gaëtan Rivet
2017-10-30 9:10 ` Jerin Jacob
2017-10-30 12:55 ` [dpdk-dev] [PATCH v2 1/2] " Gaetan Rivet
2017-10-30 12:55 ` [dpdk-dev] [PATCH v2 2/2] eal: warn user that VFIO is disabled Gaetan Rivet
2017-10-30 16:36 ` [dpdk-dev] [PATCH v3 1/2] bus/pci: fix vfio mode Gaetan Rivet
2017-10-30 16:36 ` [dpdk-dev] [PATCH v3 2/2] eal: warn user that VFIO is disabled Gaetan Rivet
2017-10-30 17:31 ` Ferruh Yigit
2017-10-30 17:26 ` [dpdk-dev] [PATCH v3 1/2] bus/pci: fix vfio mode Ferruh Yigit
2017-10-30 19:07 ` Ferruh Yigit
2017-10-30 22:32 ` [dpdk-dev] [PATCH v4] " Ferruh Yigit
2017-10-31 12:03 ` Bruce Richardson
2017-10-31 16:58 ` Ferruh Yigit
2017-10-31 18:21 ` Thomas Monjalon
2017-10-31 14:11 ` Gaëtan Rivet
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=20171030080654.GF10890@bidouze.vm.6wind.com \
--to=gaetan.rivet@6wind.com \
--cc=dev@dpdk.org \
--cc=jerin.jacob@caviumnetworks.com \
--cc=thomas@monjalon.net \
/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).