[dpdk-dev] [PATCH v2] lib/efd: fix write unlock during ring creation

Chaitanya Babu Talluri tallurix.chaitanya.babu at intel.com
Wed Nov 14 12:24:06 CET 2018


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 at dpdk.org

Signed-off-by: Chaitanya Babu Talluri <tallurix.chaitanya.babu at intel.com>
Acked-by: Reshma Pattan <reshma.pattan at 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



More information about the dev mailing list