DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] cryptodev: fix for loop in rte_cryptodev_pmd_get_named_dev
@ 2017-01-11 14:09 Fan Zhang
  2017-01-11 14:29 ` Trahe, Fiona
  0 siblings, 1 reply; 3+ messages in thread
From: Fan Zhang @ 2017-01-11 14:09 UTC (permalink / raw)
  To: dev; +Cc: pablo.de.lara.guarch

Fixes: d11b0f30 ("cryptodev: introduce API and framework for crypto devices")

This patch fixes the dev value update problem in
rte_cryptodev_pmd_get_named_dev, orginally, dev won't be updated
after the initiail step in the loop.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 lib/librte_cryptodev/rte_cryptodev_pmd.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index abfe2dc..c6a5794 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -183,8 +183,9 @@ rte_cryptodev_pmd_get_named_dev(const char *name)
 	if (name == NULL)
 		return NULL;
 
-	for (i = 0, dev = &rte_cryptodev_globals->devs[i];
-			i < rte_cryptodev_globals->max_devs; i++) {
+	for (i = 0; i < rte_cryptodev_globals->max_devs; i++) {
+		dev = &rte_cryptodev_globals->devs[i];
+
 		if ((dev->attached == RTE_CRYPTODEV_ATTACHED) &&
 				(strcmp(dev->data->name, name) == 0))
 			return dev;
-- 
2.7.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] cryptodev: fix for loop in rte_cryptodev_pmd_get_named_dev
  2017-01-11 14:09 [dpdk-dev] [PATCH] cryptodev: fix for loop in rte_cryptodev_pmd_get_named_dev Fan Zhang
@ 2017-01-11 14:29 ` Trahe, Fiona
  2017-01-11 14:57   ` De Lara Guarch, Pablo
  0 siblings, 1 reply; 3+ messages in thread
From: Trahe, Fiona @ 2017-01-11 14:29 UTC (permalink / raw)
  To: Zhang, Roy Fan, dev; +Cc: De Lara Guarch, Pablo



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Fan Zhang
> Sent: Wednesday, January 11, 2017 2:10 PM
> To: dev@dpdk.org
> Cc: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Subject: [dpdk-dev] [PATCH] cryptodev: fix for loop in
> rte_cryptodev_pmd_get_named_dev
> 
> Fixes: d11b0f30 ("cryptodev: introduce API and framework for crypto
> devices")
> 
> This patch fixes the dev value update problem in
> rte_cryptodev_pmd_get_named_dev, orginally, dev won't be updated
> after the initiail step in the loop.
> 
> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] cryptodev: fix for loop in rte_cryptodev_pmd_get_named_dev
  2017-01-11 14:29 ` Trahe, Fiona
@ 2017-01-11 14:57   ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 3+ messages in thread
From: De Lara Guarch, Pablo @ 2017-01-11 14:57 UTC (permalink / raw)
  To: Trahe, Fiona, Zhang, Roy Fan, dev; +Cc: stable



> -----Original Message-----
> From: Trahe, Fiona
> Sent: Wednesday, January 11, 2017 2:29 PM
> To: Zhang, Roy Fan; dev@dpdk.org
> Cc: De Lara Guarch, Pablo
> Subject: RE: [dpdk-dev] [PATCH] cryptodev: fix for loop in
> rte_cryptodev_pmd_get_named_dev
> 
> 
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Fan Zhang
> > Sent: Wednesday, January 11, 2017 2:10 PM
> > To: dev@dpdk.org
> > Cc: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> > Subject: [dpdk-dev] [PATCH] cryptodev: fix for loop in
> > rte_cryptodev_pmd_get_named_dev
> >
> > Fixes: d11b0f30 ("cryptodev: introduce API and framework for crypto
> > devices")
> >
> > This patch fixes the dev value update problem in
> > rte_cryptodev_pmd_get_named_dev, orginally, dev won't be updated
> > after the initiail step in the loop.
> >
> > Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
> Acked-by: Fiona Trahe <fiona.trahe@intel.com>

CC'ing stable@dpdk.org.

Applied to dpdk-next-crypto.
Thanks,

Pablo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-01-11 14:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-11 14:09 [dpdk-dev] [PATCH] cryptodev: fix for loop in rte_cryptodev_pmd_get_named_dev Fan Zhang
2017-01-11 14:29 ` Trahe, Fiona
2017-01-11 14:57   ` De Lara Guarch, Pablo

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).