* [dpdk-dev] [PATCH] cryptodev: fix pmd allocation on multi-process
@ 2019-08-07 8:39 Julien Meunier
2019-09-19 14:54 ` Akhil Goyal
0 siblings, 1 reply; 3+ messages in thread
From: Julien Meunier @ 2019-08-07 8:39 UTC (permalink / raw)
To: Pablo de Lara, Declan Doherty, Anatoly Burakov; +Cc: dev, stable
Primary process is responsible to initialize the data struct of each
crypto devices.
Secondary process should not override this data during the
initialization.
Fixes: d11b0f30df88 ("cryptodev: introduce API and framework for crypto devices")
Cc: stable@dpdk.org
Signed-off-by: Julien Meunier <julien.meunier@nokia.com>
---
lib/librte_cryptodev/rte_cryptodev.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 43bc335..b16ef7b 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -725,12 +725,14 @@ rte_cryptodev_pmd_allocate(const char *name, int socket_id)
cryptodev->data = *cryptodev_data;
- strlcpy(cryptodev->data->name, name,
- RTE_CRYPTODEV_NAME_MAX_LEN);
+ if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
+ strlcpy(cryptodev->data->name, name,
+ RTE_CRYPTODEV_NAME_MAX_LEN);
- cryptodev->data->dev_id = dev_id;
- cryptodev->data->socket_id = socket_id;
- cryptodev->data->dev_started = 0;
+ cryptodev->data->dev_id = dev_id;
+ cryptodev->data->socket_id = socket_id;
+ cryptodev->data->dev_started = 0;
+ }
/* init user callbacks */
TAILQ_INIT(&(cryptodev->link_intr_cbs));
--
2.10.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] cryptodev: fix pmd allocation on multi-process
2019-08-07 8:39 [dpdk-dev] [PATCH] cryptodev: fix pmd allocation on multi-process Julien Meunier
@ 2019-09-19 14:54 ` Akhil Goyal
2019-10-03 14:19 ` Akhil Goyal
0 siblings, 1 reply; 3+ messages in thread
From: Akhil Goyal @ 2019-09-19 14:54 UTC (permalink / raw)
To: Julien Meunier, Pablo de Lara, Declan Doherty, Anatoly Burakov
Cc: dev, stable
> Primary process is responsible to initialize the data struct of each
> crypto devices.
>
> Secondary process should not override this data during the
> initialization.
>
> Fixes: d11b0f30df88 ("cryptodev: introduce API and framework for crypto
> devices")
> Cc: stable@dpdk.org
>
> Signed-off-by: Julien Meunier <julien.meunier@nokia.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] cryptodev: fix pmd allocation on multi-process
2019-09-19 14:54 ` Akhil Goyal
@ 2019-10-03 14:19 ` Akhil Goyal
0 siblings, 0 replies; 3+ messages in thread
From: Akhil Goyal @ 2019-10-03 14:19 UTC (permalink / raw)
To: Akhil Goyal, Julien Meunier, Pablo de Lara, Declan Doherty,
Anatoly Burakov
Cc: dev, stable
>
>
> > Primary process is responsible to initialize the data struct of each
> > crypto devices.
> >
> > Secondary process should not override this data during the
> > initialization.
> >
> > Fixes: d11b0f30df88 ("cryptodev: introduce API and framework for crypto
> > devices")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Julien Meunier <julien.meunier@nokia.com>
> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Applied to dpdk-next-crypto
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-10-03 14:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-07 8:39 [dpdk-dev] [PATCH] cryptodev: fix pmd allocation on multi-process Julien Meunier
2019-09-19 14:54 ` Akhil Goyal
2019-10-03 14:19 ` Akhil Goyal
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).