From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-f67.google.com (mail-ed1-f67.google.com [209.85.208.67]) by dpdk.org (Postfix) with ESMTP id 808A15424 for ; Wed, 14 Nov 2018 11:02:32 +0100 (CET) Received: by mail-ed1-f67.google.com with SMTP id y56so537482edd.11 for ; Wed, 14 Nov 2018 02:02:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bSmXMVN1TBEr7Jlt9wBgmUf3e7ADBy0gCTLZn/0/XPs=; b=DF3I82u5n14Wi+9sozmikOFETe7xeEwHsCwqt3MIfpEgP7V2W/05h1iy8vQkCuvIP8 8aYZ7z1C2aJG0+WBa+EeC2JGER8ayQVyPplEt9WlBV3dganZHXJCV7AElMJdqhuKuM1U IQFZnn/9DJTdlYmlLFS+/rsTXRqpknBD/LGGyysM89cpraFC+vbQjQuCqCrf21FZMrUX Hje4gCcSAtmqNuyTCWwpkknMedfO+CSnUFmYU7pIxQfyNZNZU3QVQfmvJWZkv6PaTN3A z7g6oyboHwDsMr4ElvnxoFeEb9Wy38u9UFGQ69LqEs9UHvVwENBGNuxtEpCBWZ18P+Xz VgTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bSmXMVN1TBEr7Jlt9wBgmUf3e7ADBy0gCTLZn/0/XPs=; b=qxUmDyyrqA94PzSsHOS/3d818tZ/3w0+pOYflYWBvwEJtNLvWF4fFZPoyhE89blhF/ 991HSwiGQFzuKX3ecmdCY1ysAZPEObjFfb8NnW/KgGRR8A5gPkwWSRM7+elRyt69p+zP 7vzwwu98FpCRfUi4F4ETEmEbYtd6yYYtg7EjLHeYVOFiYBdliDy99LF6xcfYaI7maCVd Qj386VNCbl2KNox8ODD5wrNDgnW8KNVNsomC5dpaM1B4XDb3MkixDPIxdV7Nf8hZlpGQ nz0FyPsXpYBfqqhP0eXFWpvVwGEk2e3RyzTPzNk53PGYEIaBRay85049ZQRoCE4cuts9 s06A== X-Gm-Message-State: AGRZ1gJqo/23r98oT+h3OESUderFVfYrlOLJa2e9I21ceOrINrXbj/K/ Zt8qZmFB6tSJk1rgOh+fVOhiAHYECG5tapJB/vI8Nw== X-Google-Smtp-Source: AJdET5e9oIPMmsfF+PFPW7JATgKg8TuYTMdja+B53iWUaNw/k3EyXi2w3zRHUeH35oIMjYxH3qcpN7hzZttY2+Z9XPE= X-Received: by 2002:a05:6402:1207:: with SMTP id c7mr1496911edw.104.1542189752307; Wed, 14 Nov 2018 02:02:32 -0800 (PST) MIME-Version: 1.0 References: <20181029125329.17729-20-bluca@debian.org> <20181108180111.25873-1-bluca@debian.org> <20181108180111.25873-11-bluca@debian.org> <1542047709.11515.6.camel@debian.org> In-Reply-To: <1542047709.11515.6.camel@debian.org> From: Alejandro Lucero Date: Wed, 14 Nov 2018 10:02:20 +0000 Message-ID: To: Luca Boccassi Cc: "Burakov, Anatoly" , dpdk stable Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-stable] patch 'bus/pci: compare kernel driver instead of interrupt handler' has been queued to LTS release 16.11.9 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2018 10:02:33 -0000 Hi Luca, On Mon, Nov 12, 2018 at 6:35 PM Luca Boccassi wrote: > On Thu, 2018-11-08 at 18:01 +0000, Luca Boccassi wrote: > > Hi, > > > > FYI, your patch has been queued to LTS release 16.11.9 > > > > Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. > > It will be pushed if I get no objections before 11/10/18. So please > > shout if anyone has objections. > > > > Also note that after the patch there's a diff of the upstream commit > > vs the patch applied > > to the branch. If the code is different (ie: not only metadata > > diffs), due for example to > > a change in context or macro names, please double check it. > > > > Thanks. > > > > Luca Boccassi > > > > --- > > From 0df09603d47c1e38140b747baa8b712e70f5df51 Mon Sep 17 00:00:00 > > 2001 > > From: Alejandro Lucero > > Date: Thu, 25 Oct 2018 11:49:28 +0100 > > Subject: [PATCH] bus/pci: compare kernel driver instead of interrupt > > handler > > > > [ upstream commit 630deed612ca382f48a3ef4b65dfc74b7cd09cf9 ] > > > > 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") > > > > Signed-off-by: Alejandro Lucero > > Acked-by: Anatoly Burakov > > --- > > lib/librte_eal/linuxapp/eal/eal_pci.c | 33 ++++++++++++------------- > > -- > > 1 file changed, 15 insertions(+), 18 deletions(-) > > > > diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c > > b/lib/librte_eal/linuxapp/eal/eal_pci.c > > index 02ec24150..85c7b3139 100644 > > --- a/lib/librte_eal/linuxapp/eal/eal_pci.c > > +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c > > @@ -36,6 +36,7 @@ > > > > #include > > #include > > +#include > > Self-facepalm: this cannot work, as ethdev depends on eal. v2 inlined > below. > > Alejandro and Anatoly, please have a quick look. Thanks! > > This patch is only necessary for PMDs which secondary support requires these pci read/write accesses. AFAIK, it is just NFP PMD having this need, and multiprocess support will be added in 19.02, so it is not a big problem to not apply this patch. > -- > Kind regards, > Luca Boccassi > > > From 1090520032150e778b6f2088f16c13e8b02fce3e Mon Sep 17 00:00:00 2001 > From: Alejandro Lucero > Date: Thu, 25 Oct 2018 11:49:28 +0100 > Subject: [PATCH] bus/pci: compare kernel driver instead of interrupt > handler > > [ upstream commit 630deed612ca382f48a3ef4b65dfc74b7cd09cf9 ] > > 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") > > Signed-off-by: Alejandro Lucero > Acked-by: Anatoly Burakov > --- > lib/librte_eal/linuxapp/eal/eal_pci.c | 35 +++++++++++++-------------- > 1 file changed, 17 insertions(+), 18 deletions(-) > > diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c > b/lib/librte_eal/linuxapp/eal/eal_pci.c > index 02ec24150..2d498d543 100644 > --- a/lib/librte_eal/linuxapp/eal/eal_pci.c > +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c > @@ -522,27 +522,27 @@ rte_eal_pci_scan(void) > return -1; > } > > +/* from rte_ethdev, but rte_eal can't depend on it, so redefine it */ > +#define ETH_NAME_MAX_LEN (32) > /* Read PCI config space. */ > int rte_eal_pci_read_config(const struct rte_pci_device *device, > void *buf, size_t len, off_t offset) > { > + char devname[ETH_NAME_MAX_LEN] = ""; > const struct rte_intr_handle *intr_handle = &device->intr_handle; > > - switch (intr_handle->type) { > - case RTE_INTR_HANDLE_UIO: > - case RTE_INTR_HANDLE_UIO_INTX: > + switch (device->kdrv) { > + case RTE_KDRV_IGB_UIO: > return pci_uio_read_config(intr_handle, buf, len, offset); > - > #ifdef VFIO_PRESENT > - case RTE_INTR_HANDLE_VFIO_MSIX: > - case RTE_INTR_HANDLE_VFIO_MSI: > - case RTE_INTR_HANDLE_VFIO_LEGACY: > + case RTE_KDRV_VFIO: > return pci_vfio_read_config(intr_handle, buf, len, offset); > #endif > default: > + rte_eal_pci_device_name(&device->addr, devname, > + ETH_NAME_MAX_LEN); > RTE_LOG(ERR, EAL, > - "Unknown handle type of fd %d\n", > - intr_handle->fd); > + "Unknown driver type for %s\n", devname); > return -1; > } > } > @@ -551,26 +551,25 @@ int rte_eal_pci_read_config(const struct > rte_pci_device *device, > int rte_eal_pci_write_config(const struct rte_pci_device *device, > const void *buf, size_t len, off_t offset) > { > + char devname[ETH_NAME_MAX_LEN] = ""; > const struct rte_intr_handle *intr_handle = &device->intr_handle; > > - switch (intr_handle->type) { > - case RTE_INTR_HANDLE_UIO: > - case RTE_INTR_HANDLE_UIO_INTX: > + switch (device->kdrv) { > + case RTE_KDRV_IGB_UIO: > return pci_uio_write_config(intr_handle, buf, len, offset); > - > #ifdef VFIO_PRESENT > - case RTE_INTR_HANDLE_VFIO_MSIX: > - case RTE_INTR_HANDLE_VFIO_MSI: > - case RTE_INTR_HANDLE_VFIO_LEGACY: > + case RTE_KDRV_VFIO: > return pci_vfio_write_config(intr_handle, buf, len, > offset); > #endif > default: > + rte_eal_pci_device_name(&device->addr, devname, > + ETH_NAME_MAX_LEN); > RTE_LOG(ERR, EAL, > - "Unknown handle type of fd %d\n", > - intr_handle->fd); > + "Unknown driver type for %s\n", devname); > return -1; > } > } > +#undef ETH_NAME_MAX_LEN > > #if defined(RTE_ARCH_X86) > static int > -- > 2.19.1 >