* [dpdk-stable] [PATCH] crypto/scheduler: fix multicore rings re-use
@ 2018-05-14 6:52 Kirill Rybalchenko
2018-05-14 10:01 ` Zhang, Roy Fan
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Kirill Rybalchenko @ 2018-05-14 6:52 UTC (permalink / raw)
To: dev; +Cc: stable, kirill.rybalchenko, roy.fan.zhang
When scheduler mode changed from multicore to roundrobin and
back to multicore, scheduler tries to create memory rings with
the same name and fails. The fix allows to lookup and re-use
previously allocated memory rings.
Fixes: 4c07e0552f0a ("crypto/scheduler: add multicore scheduling mode")
Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
---
drivers/crypto/scheduler/scheduler_multicore.c | 28 ++++++++++++++++++--------
1 file changed, 20 insertions(+), 8 deletions(-)
diff --git a/drivers/crypto/scheduler/scheduler_multicore.c b/drivers/crypto/scheduler/scheduler_multicore.c
index b2ce44c..206bf86 100644
--- a/drivers/crypto/scheduler/scheduler_multicore.c
+++ b/drivers/crypto/scheduler/scheduler_multicore.c
@@ -346,18 +346,30 @@ scheduler_create_private_ctx(struct rte_cryptodev *dev)
char r_name[16];
snprintf(r_name, sizeof(r_name), MC_SCHED_ENQ_RING_NAME_PREFIX "%u", i);
- mc_ctx->sched_enq_ring[i] = rte_ring_create(r_name, PER_SLAVE_BUFF_SIZE,
- rte_socket_id(), RING_F_SC_DEQ | RING_F_SP_ENQ);
+ mc_ctx->sched_enq_ring[i] = rte_ring_lookup(r_name);
if (!mc_ctx->sched_enq_ring[i]) {
- CS_LOG_ERR("Cannot create ring for worker %u", i);
- return -1;
+ mc_ctx->sched_enq_ring[i] = rte_ring_create(r_name,
+ PER_SLAVE_BUFF_SIZE,
+ rte_socket_id(),
+ RING_F_SC_DEQ | RING_F_SP_ENQ);
+ if (!mc_ctx->sched_enq_ring[i]) {
+ CS_LOG_ERR("Cannot create ring for worker %u",
+ i);
+ return -1;
+ }
}
snprintf(r_name, sizeof(r_name), MC_SCHED_DEQ_RING_NAME_PREFIX "%u", i);
- mc_ctx->sched_deq_ring[i] = rte_ring_create(r_name, PER_SLAVE_BUFF_SIZE,
- rte_socket_id(), RING_F_SC_DEQ | RING_F_SP_ENQ);
+ mc_ctx->sched_deq_ring[i] = rte_ring_lookup(r_name);
if (!mc_ctx->sched_deq_ring[i]) {
- CS_LOG_ERR("Cannot create ring for worker %u", i);
- return -1;
+ mc_ctx->sched_deq_ring[i] = rte_ring_create(r_name,
+ PER_SLAVE_BUFF_SIZE,
+ rte_socket_id(),
+ RING_F_SC_DEQ | RING_F_SP_ENQ);
+ if (!mc_ctx->sched_deq_ring[i]) {
+ CS_LOG_ERR("Cannot create ring for worker %u",
+ i);
+ return -1;
+ }
}
}
--
2.5.5
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-stable] [PATCH] crypto/scheduler: fix multicore rings re-use
2018-05-14 6:52 [dpdk-stable] [PATCH] crypto/scheduler: fix multicore rings re-use Kirill Rybalchenko
@ 2018-05-14 10:01 ` Zhang, Roy Fan
2018-05-16 8:44 ` De Lara Guarch, Pablo
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Zhang, Roy Fan @ 2018-05-14 10:01 UTC (permalink / raw)
To: Rybalchenko, Kirill, dev; +Cc: stable
Thanks a lot!
> -----Original Message-----
> From: Rybalchenko, Kirill
> Sent: Monday, May 14, 2018 7:53 AM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Rybalchenko, Kirill <kirill.rybalchenko@intel.com>;
> Zhang, Roy Fan <roy.fan.zhang@intel.com>
> Subject: [PATCH] crypto/scheduler: fix multicore rings re-use
>
> When scheduler mode changed from multicore to roundrobin and back to
> multicore, scheduler tries to create memory rings with the same name and
> fails. The fix allows to lookup and re-use previously allocated memory rings.
>
> Fixes: 4c07e0552f0a ("crypto/scheduler: add multicore scheduling mode")
>
> Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-stable] [PATCH] crypto/scheduler: fix multicore rings re-use
2018-05-14 6:52 [dpdk-stable] [PATCH] crypto/scheduler: fix multicore rings re-use Kirill Rybalchenko
2018-05-14 10:01 ` Zhang, Roy Fan
@ 2018-05-16 8:44 ` De Lara Guarch, Pablo
2018-05-16 12:57 ` [dpdk-stable] [dpdk-dev] " Pattan, Reshma
2018-05-16 14:24 ` [dpdk-stable] [PATCH v2] " Kirill Rybalchenko
3 siblings, 0 replies; 8+ messages in thread
From: De Lara Guarch, Pablo @ 2018-05-16 8:44 UTC (permalink / raw)
To: Rybalchenko, Kirill, dev; +Cc: stable, Rybalchenko, Kirill, Zhang, Roy Fan
> -----Original Message-----
> From: stable [mailto:stable-bounces@dpdk.org] On Behalf Of Kirill Rybalchenko
> Sent: Monday, May 14, 2018 7:53 AM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Rybalchenko, Kirill <kirill.rybalchenko@intel.com>; Zhang,
> Roy Fan <roy.fan.zhang@intel.com>
> Subject: [dpdk-stable] [PATCH] crypto/scheduler: fix multicore rings re-use
>
> When scheduler mode changed from multicore to roundrobin and back to
> multicore, scheduler tries to create memory rings with the same name and fails.
> The fix allows to lookup and re-use previously allocated memory rings.
>
> Fixes: 4c07e0552f0a ("crypto/scheduler: add multicore scheduling mode")
>
> Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Missing Cc: stable@dpdk.org in commit message.
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH] crypto/scheduler: fix multicore rings re-use
2018-05-14 6:52 [dpdk-stable] [PATCH] crypto/scheduler: fix multicore rings re-use Kirill Rybalchenko
2018-05-14 10:01 ` Zhang, Roy Fan
2018-05-16 8:44 ` De Lara Guarch, Pablo
@ 2018-05-16 12:57 ` Pattan, Reshma
2018-05-16 14:24 ` [dpdk-stable] [PATCH v2] " Kirill Rybalchenko
3 siblings, 0 replies; 8+ messages in thread
From: Pattan, Reshma @ 2018-05-16 12:57 UTC (permalink / raw)
To: Rybalchenko, Kirill, dev; +Cc: stable, Rybalchenko, Kirill, Zhang, Roy Fan
Hi Kirill
Not able to apply this patch cleanly either on dpdk.org or crypto next tree. Can you check if you have to rebase it?
Thanks,
Reshma
^ permalink raw reply [flat|nested] 8+ messages in thread
* [dpdk-stable] [PATCH v2] crypto/scheduler: fix multicore rings re-use
2018-05-14 6:52 [dpdk-stable] [PATCH] crypto/scheduler: fix multicore rings re-use Kirill Rybalchenko
` (2 preceding siblings ...)
2018-05-16 12:57 ` [dpdk-stable] [dpdk-dev] " Pattan, Reshma
@ 2018-05-16 14:24 ` Kirill Rybalchenko
2018-05-16 15:43 ` De Lara Guarch, Pablo
2018-05-17 11:24 ` [dpdk-stable] [dpdk-dev] " Pattan, Reshma
3 siblings, 2 replies; 8+ messages in thread
From: Kirill Rybalchenko @ 2018-05-16 14:24 UTC (permalink / raw)
To: dev; +Cc: stable, kirill.rybalchenko, roy.fan.zhang
When scheduler mode changed from multicore to roundrobin and
back to multicore, scheduler tries to create memory rings with
the same name and fails. The fix allows to lookup and re-use
previously allocated memory rings.
Fixes: 4c07e0552f0a ("crypto/scheduler: add multicore scheduling mode")
Cc: stable@dpdk.org
v2:
Rebase to head of dpdk-dev master branch
Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
---
drivers/crypto/scheduler/scheduler_multicore.c | 28 ++++++++++++++++++--------
1 file changed, 20 insertions(+), 8 deletions(-)
diff --git a/drivers/crypto/scheduler/scheduler_multicore.c b/drivers/crypto/scheduler/scheduler_multicore.c
index 644426e..555c405 100644
--- a/drivers/crypto/scheduler/scheduler_multicore.c
+++ b/drivers/crypto/scheduler/scheduler_multicore.c
@@ -348,18 +348,30 @@ scheduler_create_private_ctx(struct rte_cryptodev *dev)
char r_name[16];
snprintf(r_name, sizeof(r_name), MC_SCHED_ENQ_RING_NAME_PREFIX "%u", i);
- mc_ctx->sched_enq_ring[i] = rte_ring_create(r_name, PER_SLAVE_BUFF_SIZE,
- rte_socket_id(), RING_F_SC_DEQ | RING_F_SP_ENQ);
+ mc_ctx->sched_enq_ring[i] = rte_ring_lookup(r_name);
if (!mc_ctx->sched_enq_ring[i]) {
- CS_LOG_ERR("Cannot create ring for worker %u", i);
- goto exit;
+ mc_ctx->sched_enq_ring[i] = rte_ring_create(r_name,
+ PER_SLAVE_BUFF_SIZE,
+ rte_socket_id(),
+ RING_F_SC_DEQ | RING_F_SP_ENQ);
+ if (!mc_ctx->sched_enq_ring[i]) {
+ CS_LOG_ERR("Cannot create ring for worker %u",
+ i);
+ goto exit;
+ }
}
snprintf(r_name, sizeof(r_name), MC_SCHED_DEQ_RING_NAME_PREFIX "%u", i);
- mc_ctx->sched_deq_ring[i] = rte_ring_create(r_name, PER_SLAVE_BUFF_SIZE,
- rte_socket_id(), RING_F_SC_DEQ | RING_F_SP_ENQ);
+ mc_ctx->sched_deq_ring[i] = rte_ring_lookup(r_name);
if (!mc_ctx->sched_deq_ring[i]) {
- CS_LOG_ERR("Cannot create ring for worker %u", i);
- goto exit;
+ mc_ctx->sched_deq_ring[i] = rte_ring_create(r_name,
+ PER_SLAVE_BUFF_SIZE,
+ rte_socket_id(),
+ RING_F_SC_DEQ | RING_F_SP_ENQ);
+ if (!mc_ctx->sched_deq_ring[i]) {
+ CS_LOG_ERR("Cannot create ring for worker %u",
+ i);
+ goto exit;
+ }
}
}
--
2.5.5
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-stable] [PATCH v2] crypto/scheduler: fix multicore rings re-use
2018-05-16 14:24 ` [dpdk-stable] [PATCH v2] " Kirill Rybalchenko
@ 2018-05-16 15:43 ` De Lara Guarch, Pablo
2018-05-17 11:24 ` [dpdk-stable] [dpdk-dev] " Pattan, Reshma
1 sibling, 0 replies; 8+ messages in thread
From: De Lara Guarch, Pablo @ 2018-05-16 15:43 UTC (permalink / raw)
To: Rybalchenko, Kirill, dev; +Cc: stable, Rybalchenko, Kirill, Zhang, Roy Fan
> -----Original Message-----
> From: stable [mailto:stable-bounces@dpdk.org] On Behalf Of Kirill Rybalchenko
> Sent: Wednesday, May 16, 2018 3:25 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Rybalchenko, Kirill <kirill.rybalchenko@intel.com>; Zhang,
> Roy Fan <roy.fan.zhang@intel.com>
> Subject: [dpdk-stable] [PATCH v2] crypto/scheduler: fix multicore rings re-use
>
> When scheduler mode changed from multicore to roundrobin and back to
> multicore, scheduler tries to create memory rings with the same name and fails.
> The fix allows to lookup and re-use previously allocated memory rings.
>
> Fixes: 4c07e0552f0a ("crypto/scheduler: add multicore scheduling mode")
> Cc: stable@dpdk.org
>
> v2:
> Rebase to head of dpdk-dev master branch
The changelog should go after the three dashes, so it is not a part of the commit
when merged.
>
> Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
You forgot to include the two previous acks (if you send another revision, add them).
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Pablo
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH v2] crypto/scheduler: fix multicore rings re-use
2018-05-16 14:24 ` [dpdk-stable] [PATCH v2] " Kirill Rybalchenko
2018-05-16 15:43 ` De Lara Guarch, Pablo
@ 2018-05-17 11:24 ` Pattan, Reshma
2018-05-17 16:15 ` De Lara Guarch, Pablo
1 sibling, 1 reply; 8+ messages in thread
From: Pattan, Reshma @ 2018-05-17 11:24 UTC (permalink / raw)
To: Rybalchenko, Kirill, dev; +Cc: stable, Rybalchenko, Kirill, Zhang, Roy Fan
Hi,
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Kirill Rybalchenko
> Sent: Wednesday, May 16, 2018 3:25 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Rybalchenko, Kirill <kirill.rybalchenko@intel.com>;
> Zhang, Roy Fan <roy.fan.zhang@intel.com>
> Subject: [dpdk-dev] [PATCH v2] crypto/scheduler: fix multicore rings re-use
>
> When scheduler mode changed from multicore to roundrobin and back to
> multicore, scheduler tries to create memory rings with the same name and
> fails. The fix allows to lookup and re-use previously allocated memory rings.
>
> Fixes: 4c07e0552f0a ("crypto/scheduler: add multicore scheduling mode")
> Cc: stable@dpdk.org
>
> v2:
> Rebase to head of dpdk-dev master branch
>
> Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Tested-by: Reshma Pattan <reshma.pattan@intel.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH v2] crypto/scheduler: fix multicore rings re-use
2018-05-17 11:24 ` [dpdk-stable] [dpdk-dev] " Pattan, Reshma
@ 2018-05-17 16:15 ` De Lara Guarch, Pablo
0 siblings, 0 replies; 8+ messages in thread
From: De Lara Guarch, Pablo @ 2018-05-17 16:15 UTC (permalink / raw)
To: Pattan, Reshma, Rybalchenko, Kirill, dev
Cc: stable, Rybalchenko, Kirill, Zhang, Roy Fan
> -----Original Message-----
> From: stable [mailto:stable-bounces@dpdk.org] On Behalf Of Pattan, Reshma
> Sent: Thursday, May 17, 2018 12:24 PM
> To: Rybalchenko, Kirill <kirill.rybalchenko@intel.com>; dev@dpdk.org
> Cc: stable@dpdk.org; Rybalchenko, Kirill <kirill.rybalchenko@intel.com>; Zhang,
> Roy Fan <roy.fan.zhang@intel.com>
> Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v2] crypto/scheduler: fix multicore
> rings re-use
>
> Hi,
>
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Kirill
> > Rybalchenko
> > Sent: Wednesday, May 16, 2018 3:25 PM
> > To: dev@dpdk.org
> > Cc: stable@dpdk.org; Rybalchenko, Kirill
> > <kirill.rybalchenko@intel.com>; Zhang, Roy Fan
> > <roy.fan.zhang@intel.com>
> > Subject: [dpdk-dev] [PATCH v2] crypto/scheduler: fix multicore rings
> > re-use
> >
> > When scheduler mode changed from multicore to roundrobin and back to
> > multicore, scheduler tries to create memory rings with the same name
> > and fails. The fix allows to lookup and re-use previously allocated memory
> rings.
> >
> > Fixes: 4c07e0552f0a ("crypto/scheduler: add multicore scheduling
> > mode")
> > Cc: stable@dpdk.org
> >
> > v2:
> > Rebase to head of dpdk-dev master branch
Removed this changelog.
> >
> > Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
>
> Tested-by: Reshma Pattan <reshma.pattan@intel.com>
Applied to dpdk-next-crypto.
Thanks,
Pablo
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2018-05-17 16:15 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-14 6:52 [dpdk-stable] [PATCH] crypto/scheduler: fix multicore rings re-use Kirill Rybalchenko
2018-05-14 10:01 ` Zhang, Roy Fan
2018-05-16 8:44 ` De Lara Guarch, Pablo
2018-05-16 12:57 ` [dpdk-stable] [dpdk-dev] " Pattan, Reshma
2018-05-16 14:24 ` [dpdk-stable] [PATCH v2] " Kirill Rybalchenko
2018-05-16 15:43 ` De Lara Guarch, Pablo
2018-05-17 11:24 ` [dpdk-stable] [dpdk-dev] " Pattan, Reshma
2018-05-17 16:15 ` 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).