From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] bus/pci: use device driver name instead of handler type Date: Mon, 29 Oct 2018 01:05:38 +0100 Message-ID: <3242136.KigKuMniXL@xps> References: <1540464568-42054-1-git-send-email-alejandro.lucero@netronome.com> <073701fc-1189-19f8-a635-4e92e52f948b@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, "Burakov, Anatoly" To: Alejandro Lucero Return-path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id A2C534CE4 for ; Mon, 29 Oct 2018 01:05:34 +0100 (CET) In-Reply-To: <073701fc-1189-19f8-a635-4e92e52f948b@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 26/10/2018 16:03, Burakov, Anatoly: > On 25-Oct-18 11:49 AM, Alejandro Lucero wrote: > > Invoking the right pci read/write functions is based on interrupt > > handler type. However, this is not configured for secondary processes > > precluding to use those functions. > > > > This patch fixes the issue using the driver name the device is bound > > to instead. > > > > Fixes: 632b2d1deeed ("eal: provide functions to access PCI config") > > > > v2: > > - Use #ifdef for VFIO functions > > > > Signed-off-by: Alejandro Lucero > > --- > > drivers/bus/pci/linux/pci.c | 32 ++++++++++++++------------------ > > 1 file changed, 14 insertions(+), 18 deletions(-) > > > > diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c > > index 5cf78d7..59a2086 100644 > > --- a/drivers/bus/pci/linux/pci.c > > +++ b/drivers/bus/pci/linux/pci.c > > @@ -673,23 +673,21 @@ enum rte_iova_mode > > int rte_pci_read_config(const struct rte_pci_device *device, > > void *buf, size_t len, off_t offset) > > { > > + char devname[RTE_DEV_NAME_MAX_LEN] = {0}; > > Probably "" instead of {0} is better. Same in other case. > > Otherwise, LGTM > > Acked-by: Anatoly Burakov Applied with above change, thanks. Title fixed: bus/pci: compare kernel driver instead of interrupt handler