From: Yuanhan Liu <yliu@fridaylinux.org>
To: Gaetan Rivet <gaetan.rivet@6wind.com>
Cc: dpdk stable <stable@dpdk.org>
Subject: Re: [dpdk-stable] patch 'bus/pci: use given name as generic name' has been queued to stable release 17.05.2
Date: Tue, 29 Aug 2017 15:47:28 +0800 [thread overview]
Message-ID: <20170829074728.GA9736@yliu-home> (raw)
In-Reply-To: <1503307878-16728-6-git-send-email-yliu@fridaylinux.org>
On Mon, Aug 21, 2017 at 05:30:20PM +0800, Yuanhan Liu wrote:
> Hi,
>
> FYI, your patch has been queued to stable release 17.05.2
>
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 08/24/17. So please
> shout if anyone has objections.
There is a build error:
lib/librte_eal/common/eal_common_pci.c:133:41: error: ‘struct rte_devargs’ has no member named ‘name’
dev->device.name = dev->device.devargs->name;
I usually will do a build test before sending this out. Not quite sure
why I missed that this time :/
So I will drop it in this release. Let me know if you think a backport
is needed.
Sorry for that!
--yliu
>
> ---
> >From abbdc42771b8999624afe375b4d5d8e036d7ab71 Mon Sep 17 00:00:00 2001
> From: Gaetan Rivet <gaetan.rivet@6wind.com>
> Date: Sat, 15 Jul 2017 19:56:39 +0200
> Subject: [PATCH] bus/pci: use given name as generic name
>
> [ upstream commit 23eaa9059ec24e95e32361f333ed0686f82bea74 ]
>
> When an application requests the use of a PCI device, it can currently
> interchangeably use either the longform DomBDF format (0000:00:00.0) or
> the shorter BDF format (00:00.0).
>
> When a device is inserted via the hotplug API, it must first be scanned
> and then will be identified by its name using `find_device`. The name of
> the device must match the name given by the user to be found and then
> probed.
>
> A new function sets the expected name for a scanned PCI device. It was
> previously generated from parsing the PCI address. This canonical name
> is superseded when an rte_devargs exists describing the device. In such
> case, the device takes the given name found within the rte_devargs.
>
> As the rte_devargs is linked to the rte_pci_device during scanning, it
> can be avoided during the probe. Additionally, this fixes the issue of
> the rte_devargs lookup not being done within rte_pci_probe_one.
>
> Fixes: beec692c5157 ("eal: add name field to generic device")
>
> Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
> ---
> lib/librte_eal/bsdapp/eal/eal_pci.c | 4 ++--
> lib/librte_eal/common/eal_common_pci.c | 29 ++++++++++++++++++++++++-----
> lib/librte_eal/common/eal_private.h | 5 +++++
> lib/librte_eal/linuxapp/eal/eal_pci.c | 4 ++--
> 4 files changed, 33 insertions(+), 9 deletions(-)
>
> diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal/eal_pci.c
> index e321461..97a88ec 100644
> --- a/lib/librte_eal/bsdapp/eal/eal_pci.c
> +++ b/lib/librte_eal/bsdapp/eal/eal_pci.c
> @@ -282,8 +282,7 @@ pci_scan_one(int dev_pci_fd, struct pci_conf *conf)
> /* FreeBSD has no NUMA support (yet) */
> dev->device.numa_node = 0;
>
> - rte_pci_device_name(&dev->addr, dev->name, sizeof(dev->name));
> - dev->device.name = dev->name;
> + pci_name_set(dev);
>
> /* FreeBSD has only one pass through driver */
> dev->kdrv = RTE_KDRV_NIC_UIO;
> @@ -334,6 +333,7 @@ pci_scan_one(int dev_pci_fd, struct pci_conf *conf)
> } else { /* already registered */
> dev2->kdrv = dev->kdrv;
> dev2->max_vfs = dev->max_vfs;
> + pci_name_set(dev2);
> memmove(dev2->mem_resource,
> dev->mem_resource,
> sizeof(dev->mem_resource));
> diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c
> index b749991..8f8627e 100644
> --- a/lib/librte_eal/common/eal_common_pci.c
> +++ b/lib/librte_eal/common/eal_common_pci.c
> @@ -113,6 +113,29 @@ static struct rte_devargs *pci_devargs_lookup(struct rte_pci_device *dev)
> return NULL;
> }
>
> +void
> +pci_name_set(struct rte_pci_device *dev)
> +{
> + struct rte_devargs *devargs;
> +
> + /* Each device has its internal, canonical name set. */
> + rte_pci_device_name(&dev->addr,
> + dev->name, sizeof(dev->name));
> + devargs = pci_devargs_lookup(dev);
> + dev->device.devargs = devargs;
> + /* In blacklist mode, if the device is not blacklisted, no
> + * rte_devargs exists for it.
> + */
> + if (devargs != NULL)
> + /* If an rte_devargs exists, the generic rte_device uses the
> + * given name as its namea
> + */
> + dev->device.name = dev->device.devargs->name;
> + else
> + /* Otherwise, it uses the internal, canonical form. */
> + dev->device.name = dev->name;
> +}
> +
> /* map a particular resource from a file */
> void *
> pci_map_resource(void *requested_addr, int fd, off_t offset, size_t size,
> @@ -419,11 +442,7 @@ rte_pci_probe(void)
> FOREACH_DEVICE_ON_PCIBUS(dev) {
> probed++;
>
> - /* set devargs in PCI structure */
> - devargs = pci_devargs_lookup(dev);
> - if (devargs != NULL)
> - dev->device.devargs = devargs;
> -
> + devargs = dev->device.devargs;
> /* probe all or only whitelisted devices */
> if (probe_all)
> ret = pci_probe_all_drivers(dev);
> diff --git a/lib/librte_eal/common/eal_private.h b/lib/librte_eal/common/eal_private.h
> index 6cacce0..0a1c3a7 100644
> --- a/lib/librte_eal/common/eal_private.h
> +++ b/lib/librte_eal/common/eal_private.h
> @@ -113,6 +113,11 @@ struct rte_pci_driver;
> struct rte_pci_device;
>
> /**
> + * Find the name of a PCI device.
> + */
> +void pci_name_set(struct rte_pci_device *dev);
> +
> +/**
> * Add a PCI device to the PCI Bus (append to PCI Device list). This function
> * also updates the bus references of the PCI Device (and the generic device
> * object embedded within.
> diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c
> index 595622b..816b19d 100644
> --- a/lib/librte_eal/linuxapp/eal/eal_pci.c
> +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c
> @@ -324,8 +324,7 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
> dev->device.numa_node = tmp;
> }
>
> - rte_pci_device_name(addr, dev->name, sizeof(dev->name));
> - dev->device.name = dev->name;
> + pci_name_set(dev);
>
> /* parse resources */
> snprintf(filename, sizeof(filename), "%s/resource", dirname);
> @@ -373,6 +372,7 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
> } else { /* already registered */
> dev2->kdrv = dev->kdrv;
> dev2->max_vfs = dev->max_vfs;
> + pci_name_set(dev2);
> memmove(dev2->mem_resource, dev->mem_resource,
> sizeof(dev->mem_resource));
> free(dev);
> --
> 2.7.4
next prev parent reply other threads:[~2017-08-29 7:47 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'ethdev: fix build with gcc 5.4.0' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix build with gcc 7.1' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'mbuf: fix VXLAN port in comment' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'metrics: fix name string termination' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'bus/pci: use given name as generic name' " Yuanhan Liu
2017-08-29 7:47 ` Yuanhan Liu [this message]
2017-08-29 7:59 ` Gaëtan Rivet
2017-08-21 9:30 ` [dpdk-stable] patch 'net/sfc: request MAC stats upload immediately on port start' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/i40e: fix VF Tx bytes' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/ixgbe: fix LSC interrupt' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/i40e: " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/e1000: " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/i40e: fix ethertype filter for new FW' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/ixgbe: fix Rx/Tx queue interrupt for x550 devices' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'eventdev: fix memory realloc check in port config' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/scheduler: fix slave name parsing' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/qat: fix NULL authentication hang' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix free usage for dpsec' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/aesni_mb: fix possible crypto job leak' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'doc: remove incorrect limitation on AESNI-MB PMD' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'doc: add missing algorithm in limitations for QAT' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/aesni_mb: fix zero burst dequeue' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/scheduler: fix strings not null terminated' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'app/crypto-perf: stop crypto devices after test' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'cmdline: fix dynamic tokens initialization' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'cmdline: fix dynamic tokens interface' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'app/testpmd: fix token matching in flow command' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'mempool/dpaa2: fix error code for allocation failure' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'mempool/dpaa2: fix freeing bp list' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'examples/qos_sched: fix build for less lcores' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix HMAC supported key sizes' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/aesni_mb: " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/openssl: " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/qat: " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/qat: fix SHA384-HMAC block size' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'app/crypto-perf: fix CSV output' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/armv8: fix authentication session configuration' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/armv8: fix HMAC supported key sizes' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'app/testpmd: fix flow rule copy functions' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'mbuf: fix doxygen comment of bulk alloc' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/virtio: fix MAC address read' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/virtio: fix Rx interrupt setup' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/i40e: fix link down and negotiation' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/bnxt: fix set link config' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/bnxt: check invalid L2 filter id' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/bnxt: free filter before reusing it' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/ixgbe: fix mirror rule index overflow' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/mlx5: fix inconsistent link status query' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/i40e: fix parsing QinQ pattern' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/i40e: fix PF notify when VF is not up' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'test/bonding: fix memory corruptions' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'test/bonding: fix parameters of a balance Tx' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'test/bonding: fix namespace of the RSS tests' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'test/bonding: fix device name' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/mlx5: fix missing packet type calculation' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/mlx4: fix flow creation before start' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/mlx4: fix probe failure report' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/qede: fix chip details print' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/vmxnet3: fix filtering on promiscuous disabling' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/i40e: fix Rx data segment buffer length' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/enic: fix crash when freeing 0 packet to mempool' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/ixgbe: fix mask flag on flow rule creation' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/i40e: revert fix of PF notify when VF not up' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'examples/l3fwd: fix IPv6 packet type parse' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix the return of supported API' " Yuanhan Liu
2017-08-29 9:27 ` [dpdk-stable] patch 'net/virtio: do not claim to support LRO' " Yuanhan Liu
2017-08-30 15:57 ` Stephen Hemminger
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=20170829074728.GA9736@yliu-home \
--to=yliu@fridaylinux.org \
--cc=gaetan.rivet@6wind.com \
--cc=stable@dpdk.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).