From: Thomas Monjalon <thomas@monjalon.net>
To: gaetan.rivet@6wind.com
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 1/2] bus/pci: rename devargs parameter id to addr
Date: Wed, 3 Oct 2018 21:40:38 +0200 [thread overview]
Message-ID: <20181003194039.7202-1-thomas@monjalon.net> (raw)
We could match devices by their PCI id (vendor id, device id, etc).
But for now, only matching by PCI address is implemented.
The devargs parameter "id" is renamed "addr" to reflect its real meaning.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
drivers/bus/pci/pci_params.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/bus/pci/pci_params.c b/drivers/bus/pci/pci_params.c
index 7630d4845..77b722ba9 100644
--- a/drivers/bus/pci/pci_params.c
+++ b/drivers/bus/pci/pci_params.c
@@ -12,12 +12,12 @@
#include "private.h"
enum pci_params {
- RTE_PCI_PARAMS_ID,
+ RTE_PCI_PARAMS_ADDR,
RTE_PCI_PARAMS_MAX,
};
static const char * const pci_params_keys[] = {
- [RTE_PCI_PARAMS_ID] = "id",
+ [RTE_PCI_PARAMS_ADDR] = "addr",
[RTE_PCI_PARAMS_MAX] = NULL,
};
@@ -47,7 +47,7 @@ pci_dev_match(const struct rte_device *dev,
return 0;
pdev = RTE_DEV_TO_PCI_CONST(dev);
/* if any field does not match. */
- if (rte_kvargs_process(kvlist, "id",
+ if (rte_kvargs_process(kvlist, pci_params_keys[RTE_PCI_PARAMS_ADDR],
&pci_addr_kv_cmp,
(void *)(intptr_t)&pdev->addr))
return 1;
--
2.19.0
next reply other threads:[~2018-10-03 19:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-03 19:40 Thomas Monjalon [this message]
2018-10-03 19:40 ` [dpdk-dev] [PATCH 2/2] devargs: rename enum items with singular form Thomas Monjalon
2018-10-10 6:49 ` Andrew Rybchenko
2018-10-10 6:48 ` [dpdk-dev] [PATCH 1/2] bus/pci: rename devargs parameter id to addr Andrew Rybchenko
2018-10-11 12:02 ` Thomas Monjalon
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=20181003194039.7202-1-thomas@monjalon.net \
--to=thomas@monjalon.net \
--cc=dev@dpdk.org \
--cc=gaetan.rivet@6wind.com \
/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).