From: Nipun Gupta <nipun.gupta@nxp.com>
To: ktraynor@redhat.com
Cc: stable@dpdk.org, Hemant Agrawal <hemant.agrawal@nxp.com>
Subject: [dpdk-stable] [PATCH 18.11 4/5] bus/dpaa: fix dpaa_sec blacklist
Date: Tue, 17 Dec 2019 15:00:44 +0530 [thread overview]
Message-ID: <20191217093045.12659-4-nipun.gupta@nxp.com> (raw)
In-Reply-To: <20191217093045.12659-1-nipun.gupta@nxp.com>
From: Hemant Agrawal <hemant.agrawal@nxp.com>
The black list of dpaa_sec devices fails.
EAL: failed to parse device "dpaa:dpaa_sec-1"
This patch address following issues:
- bus usages dpaa-sec while the driver usage dpaa_sec
- bus usages numbers from 0 to MAX_SEC - while driver
probe usages sec number form max-fman_device +1
Fixes: 6e0752205bb2 ("bus/dpaa: support device blacklisting")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Reviewed-by: Sachin Saxena <sachin.saxena@nxp.com>
---
doc/guides/cryptodevs/dpaa_sec.rst | 6 +++---
drivers/bus/dpaa/dpaa_bus.c | 4 ++--
drivers/crypto/dpaa_sec/dpaa_sec.c | 3 +--
3 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/doc/guides/cryptodevs/dpaa_sec.rst b/doc/guides/cryptodevs/dpaa_sec.rst
index 897a4fe80..4874a09ae 100644
--- a/doc/guides/cryptodevs/dpaa_sec.rst
+++ b/doc/guides/cryptodevs/dpaa_sec.rst
@@ -85,11 +85,11 @@ For blacklisting a DPAA device, following commands can be used.
.. code-block:: console
- <dpdk app> <EAL args> -b "dpaa_bus:dpaa-secX" -- ...
- e.g. "dpaa_bus:dpaa-sec0"
+ <dpdk app> <EAL args> -b "dpaa:dpaa_sec-X" -- ...
+ e.g. "dpaa:dpaa_sec-1"
or to disable all 4 SEC devices
- -b "dpaa_sec:dpaa-sec0" -b "dpaa_sec:dpaa-sec1" -b "dpaa_sec:dpaa-sec2" -b "dpaa_sec:dpaa-sec3"
+ -b "dpaa:dpaa_sec-1" -b "dpaa:dpaa_sec-2" -b "dpaa:dpaa_sec-3" -b "dpaa:dpaa_sec-4"
Limitations
-----------
diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index c7da96f8d..25a63ab93 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -218,7 +218,7 @@ dpaa_create_device_list(void)
* allocated for dev->name/
*/
memset(dev->name, 0, RTE_ETH_NAME_MAX_LEN);
- sprintf(dev->name, "dpaa-sec%d", i);
+ sprintf(dev->name, "dpaa_sec-%d", i+1);
DPAA_BUS_LOG(INFO, "%s cryptodev added", dev->name);
dev->device.name = dev->name;
dev->device.devargs = dpaa_devargs_lookup(dev);
@@ -416,7 +416,7 @@ rte_dpaa_bus_parse(const char *name, void *out_name)
for (i = 0; i < RTE_LIBRTE_DPAA_MAX_CRYPTODEV; i++) {
char sec_name[16];
- snprintf(sec_name, 16, "dpaa-sec%d", i);
+ snprintf(sec_name, 16, "dpaa_sec-%d", i+1);
if (strcmp(sec_name, sep) == 0) {
if (out_name)
strcpy(out_name, sep);
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 742e24c52..901c7ab26 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -2391,8 +2391,7 @@ cryptodev_dpaa_sec_probe(struct rte_dpaa_driver *dpaa_drv __rte_unused,
int retval;
- snprintf(cryptodev_name, sizeof(cryptodev_name), "dpaa_sec-%d",
- dpaa_dev->id.dev_id);
+ snprintf(cryptodev_name, sizeof(cryptodev_name), "%s", dpaa_dev->name);
cryptodev = rte_cryptodev_pmd_allocate(cryptodev_name, rte_socket_id());
if (cryptodev == NULL)
--
2.17.1
next prev parent reply other threads:[~2019-12-17 9:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-17 9:30 [dpdk-stable] [PATCH 18.11 1/5] net/dpaa2: add retry and timeout in packet enqueue API Nipun Gupta
2019-12-17 9:30 ` [dpdk-stable] [PATCH 18.11 2/5] raw/dpaa2_cmdif: " Nipun Gupta
2019-12-17 9:30 ` [dpdk-stable] [PATCH 18.11 3/5] net/dpaa2: set port in mbuf Nipun Gupta
2019-12-17 9:30 ` Nipun Gupta [this message]
2019-12-17 9:30 ` [dpdk-stable] [PATCH 18.11 5/5] test/crypto: fix session init failure for wireless case Nipun Gupta
2019-12-17 14:08 ` [dpdk-stable] [PATCH 18.11 1/5] net/dpaa2: add retry and timeout in packet enqueue API Kevin Traynor
2019-12-18 5:02 ` Nipun Gupta
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=20191217093045.12659-4-nipun.gupta@nxp.com \
--to=nipun.gupta@nxp.com \
--cc=hemant.agrawal@nxp.com \
--cc=ktraynor@redhat.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).