* [dpdk-dev] [PATCH] lib: fix write unlock during ring creation
@ 2018-11-13 12:55 Chaitanya Babu Talluri
2018-11-13 16:58 ` Pattan, Reshma
2018-11-14 11:24 ` [dpdk-dev] [PATCH v2] lib/efd: " Chaitanya Babu Talluri
0 siblings, 2 replies; 6+ messages in thread
From: Chaitanya Babu Talluri @ 2018-11-13 12:55 UTC (permalink / raw)
To: dev
Cc: byron.marohn, reshma.pattan, pablo.de.lara.guarch,
Chaitanya Babu Talluri, stable
In rte_efd_create() write lock has already been unlocked
before ring creation itself.
So second unlock after the ring creation has been removed
and added freeing of tail queue entry and efd table.
Fixes: 56b6ef874f80 ("efd: new Elastic Flow Distributor library")
Cc: stable@dpdk.org
Signed-off-by: Chaitanya Babu Talluri <tallurix.chaitanya.babu@intel.com>
---
lib/librte_efd/rte_efd.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/librte_efd/rte_efd.c b/lib/librte_efd/rte_efd.c
index a780e2fe8..0c7ce9612 100644
--- a/lib/librte_efd/rte_efd.c
+++ b/lib/librte_efd/rte_efd.c
@@ -687,12 +687,13 @@ rte_efd_create(const char *name, uint32_t max_num_rules, uint32_t key_len,
rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK);
snprintf(ring_name, sizeof(ring_name), "HT_%s", table->name);
- /* Create ring (Dummy slot index is not enqueued) */
+ /* Create ring (Dummy slot index is not enqueued) */
r = rte_ring_create(ring_name, rte_align32pow2(table->max_num_rules),
offline_cpu_socket, 0);
if (r == NULL) {
RTE_LOG(ERR, EFD, "memory allocation failed\n");
- goto error_unlock_exit;
+ rte_efd_free(table);
+ return NULL;
}
/* Populate free slots ring. Entry zero is reserved for key misses. */
--
2.13.6
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH] lib: fix write unlock during ring creation
2018-11-13 12:55 [dpdk-dev] [PATCH] lib: fix write unlock during ring creation Chaitanya Babu Talluri
@ 2018-11-13 16:58 ` Pattan, Reshma
2018-11-18 14:43 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2018-11-14 11:24 ` [dpdk-dev] [PATCH v2] lib/efd: " Chaitanya Babu Talluri
1 sibling, 1 reply; 6+ messages in thread
From: Pattan, Reshma @ 2018-11-13 16:58 UTC (permalink / raw)
To: Chaitanya Babu, TalluriX, dev
Cc: Marohn, Byron, De Lara Guarch, Pablo, stable
> -----Original Message-----
> From: Chaitanya Babu, TalluriX
> Sent: Tuesday, November 13, 2018 12:55 PM
> To: dev@dpdk.org
> Cc: Marohn, Byron <byron.marohn@intel.com>; Pattan, Reshma
> <reshma.pattan@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Chaitanya Babu, TalluriX
> <tallurix.chaitanya.babu@intel.com>; stable@dpdk.org
> Subject: [PATCH] lib: fix write unlock during ring creation
Heading should have lib/efd:
>
> In rte_efd_create() write lock has already been unlocked before ring creation
> itself.
> So second unlock after the ring creation has been removed and added freeing of
> tail queue entry and efd table.
Changes do not have free of tailq entry, so remove the mention of it from commit message.
> - /* Create ring (Dummy slot index is not enqueued) */
> + /* Create ring (Dummy slot index is not enqueued) */
Undo this change. Unrelated.
Other than these looks ok.
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
Thanks,
Reshma
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH] lib: fix write unlock during ring creation
2018-11-13 16:58 ` Pattan, Reshma
@ 2018-11-18 14:43 ` Thomas Monjalon
0 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2018-11-18 14:43 UTC (permalink / raw)
To: Pattan, Reshma, Chaitanya Babu, TalluriX
Cc: stable, dev, Marohn, Byron, De Lara Guarch, Pablo
13/11/2018 17:58, Pattan, Reshma:
> Heading should have lib/efd:
No, heading should have "efd:"
When in doubts, please look at the git history.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dpdk-dev] [PATCH v2] lib/efd: fix write unlock during ring creation
2018-11-13 12:55 [dpdk-dev] [PATCH] lib: fix write unlock during ring creation Chaitanya Babu Talluri
2018-11-13 16:58 ` Pattan, Reshma
@ 2018-11-14 11:24 ` Chaitanya Babu Talluri
2018-11-16 13:39 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
1 sibling, 1 reply; 6+ messages in thread
From: Chaitanya Babu Talluri @ 2018-11-14 11:24 UTC (permalink / raw)
To: dev
Cc: byron.marohn, reshma.pattan, pablo.de.lara.guarch,
Chaitanya Babu Talluri, stable
In rte_efd_create() write lock has already been unlocked
before ring creation itself.
So second unlock after the ring creation has been removed.
Fixes: 56b6ef874f80 ("efd: new Elastic Flow Distributor library")
Cc: stable@dpdk.org
Signed-off-by: Chaitanya Babu Talluri <tallurix.chaitanya.babu@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
---
v2: Updated commit message.
---
lib/librte_efd/rte_efd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/librte_efd/rte_efd.c b/lib/librte_efd/rte_efd.c
index a780e2fe8..e6e5cfda2 100644
--- a/lib/librte_efd/rte_efd.c
+++ b/lib/librte_efd/rte_efd.c
@@ -692,7 +692,8 @@ rte_efd_create(const char *name, uint32_t max_num_rules, uint32_t key_len,
offline_cpu_socket, 0);
if (r == NULL) {
RTE_LOG(ERR, EFD, "memory allocation failed\n");
- goto error_unlock_exit;
+ rte_efd_free(table);
+ return NULL;
}
/* Populate free slots ring. Entry zero is reserved for key misses. */
--
2.13.6
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH v2] lib/efd: fix write unlock during ring creation
2018-11-14 11:24 ` [dpdk-dev] [PATCH v2] lib/efd: " Chaitanya Babu Talluri
@ 2018-11-16 13:39 ` Ferruh Yigit
2018-11-18 14:46 ` Thomas Monjalon
0 siblings, 1 reply; 6+ messages in thread
From: Ferruh Yigit @ 2018-11-16 13:39 UTC (permalink / raw)
To: Chaitanya Babu Talluri, dev
Cc: byron.marohn, reshma.pattan, pablo.de.lara.guarch, stable
On 11/14/2018 11:24 AM, Chaitanya Babu Talluri wrote:
> In rte_efd_create() write lock has already been unlocked
> before ring creation itself.
> So second unlock after the ring creation has been removed.
>
> Fixes: 56b6ef874f80 ("efd: new Elastic Flow Distributor library")
> Cc: stable@dpdk.org
>
> Signed-off-by: Chaitanya Babu Talluri <tallurix.chaitanya.babu@intel.com>
> Acked-by: Reshma Pattan <reshma.pattan@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH v2] lib/efd: fix write unlock during ring creation
2018-11-16 13:39 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
@ 2018-11-18 14:46 ` Thomas Monjalon
0 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2018-11-18 14:46 UTC (permalink / raw)
To: Chaitanya Babu Talluri
Cc: dev, Ferruh Yigit, byron.marohn, reshma.pattan,
pablo.de.lara.guarch, stable
16/11/2018 14:39, Ferruh Yigit:
> On 11/14/2018 11:24 AM, Chaitanya Babu Talluri wrote:
> > In rte_efd_create() write lock has already been unlocked
> > before ring creation itself.
> > So second unlock after the ring creation has been removed.
> >
> > Fixes: 56b6ef874f80 ("efd: new Elastic Flow Distributor library")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Chaitanya Babu Talluri <tallurix.chaitanya.babu@intel.com>
> > Acked-by: Reshma Pattan <reshma.pattan@intel.com>
>
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-11-18 14:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-13 12:55 [dpdk-dev] [PATCH] lib: fix write unlock during ring creation Chaitanya Babu Talluri
2018-11-13 16:58 ` Pattan, Reshma
2018-11-18 14:43 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2018-11-14 11:24 ` [dpdk-dev] [PATCH v2] lib/efd: " Chaitanya Babu Talluri
2018-11-16 13:39 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2018-11-18 14:46 ` Thomas Monjalon
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).