From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by dpdk.org (Postfix) with ESMTP id 080E11B324 for ; Mon, 30 Oct 2017 09:07:07 +0100 (CET) Received: by mail-wm0-f67.google.com with SMTP id b189so13849490wmd.4 for ; Mon, 30 Oct 2017 01:07:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=NtSdP83WjTcuGxbKq3gLceTe46gsHS4RDnJkjgiwez8=; b=B0kqmz4x506gzytNHb6TjbS2Ecvajeq6mpiY6dI1EGVqUWwIThiv5/YKyW/HMLzfs9 H0udsoaP35V0f27PP19KjwCVS6HRNJ/pJU7GDVWfZStASGm0w+cbJwMM+w6NnRnH6pCH cXOPJbM9ghT8jZ/lpENsjnek2sDD4RbIxbhKJote55UsQTuS7v1BxoFkS+5u0gv1WHJi +Be57ErlSfAHskQFuDk7Vr+b5TZzsOPk4VkQ3Iz3Ho3Y+48ABOcQsQIujBWohHC7/wSw nH2lWKxhX/U7bjj8qagHzG4DMePRhbOYwjGsd3PyTSJ2a45OhzVyt/MF8FC9b8xeVtM+ ezhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=NtSdP83WjTcuGxbKq3gLceTe46gsHS4RDnJkjgiwez8=; b=BuKZMOxzIMIn/slKdamhs9ZE56wIDR9lyxnAFq9LLLAYbPL6zjeoQ1eSUuBt3450l3 5gP+Jtsbh975c/4xVoadFKdOBNZlZqXbDZxsVZ6nVrIUBQ4s3LHdSY2yeQjcupSUJBi2 C1CQnn7V1ZrtS+fN5ei/cQ7uEsMoHeqtDD2HObG8UMjHue37UC/ZDH8uF7fxlmtytD3T dWFolBRzCzjedA7SJROJLKrKBn4tJFutMYy71HqdtyL1KBMSYK5PiXP89XlUbISAVf/r EiCeKwHYiRet+Vm2gA7ScrOqll00+j58wb7GUdLeu8ACH4jWxVCApFEfUs7/o3qVMaHn 3iUA== X-Gm-Message-State: AMCzsaWF9d61YFOBaiwD7L2eKwduz0PQ7zc6+TyxhnlrrhfnYh8eRBqN rGEKSNst9QDxx+qaVSvOsxCClg== X-Google-Smtp-Source: ABhQp+QShsb9ZexI6eIMipfsGRLNlkX9Tu/S7fd5ZwqpVleIFSB5CTeYBXZNseX6/DW34w57HiWP3Q== X-Received: by 10.80.240.68 with SMTP id u4mr10945098edl.5.1509350827390; Mon, 30 Oct 2017 01:07:07 -0700 (PDT) Received: from bidouze.vm.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id p37sm10702843eda.35.2017.10.30.01.07.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Oct 2017 01:07:06 -0700 (PDT) Date: Mon, 30 Oct 2017 09:06:54 +0100 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Jerin Jacob Cc: dev@dpdk.org, thomas@monjalon.net Message-ID: <20171030080654.GF10890@bidouze.vm.6wind.com> References: <20171028062053.6615-1-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20171028062053.6615-1-jerin.jacob@caviumnetworks.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH] bus/pci: fix vfio mode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Oct 2017 08:07:08 -0000 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 > > Signed-off-by: Jerin Jacob > --- > 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