aboutsummaryrefslogtreecommitdiff
path: root/helper
diff options
context:
space:
mode:
authorMatias Elo <matias.elo@nokia.com>2020-07-03 15:24:11 +0300
committerMatias Elo <matias.elo@nokia.com>2020-07-03 15:24:11 +0300
commit9d3342c4bb0c2fd1d19937eb42cb743deb5578cc (patch)
tree6afce6f6021a7a9206cbaecc40b5c79901916d15 /helper
parentbd75b10924e6df74089d27482dd68bdef33eaf83 (diff)
parent518bb7cf5c8f35c198f40015d999cce7de0c4365 (diff)
Merge branch 'master' of https://github.com/OpenDataPlane/odp into odp-dpdk
Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Diffstat (limited to 'helper')
-rw-r--r--helper/Makefile.am2
-rw-r--r--helper/cuckootable.c8
-rw-r--r--helper/iplookuptable.c2
3 files changed, 8 insertions, 4 deletions
diff --git a/helper/Makefile.am b/helper/Makefile.am
index 762f80602..8347ff96d 100644
--- a/helper/Makefile.am
+++ b/helper/Makefile.am
@@ -62,6 +62,6 @@ __LIB__libodphelper_la_SOURCES += \
linux/thread.c
endif
-__LIB__libodphelper_la_LIBADD = $(PTHREAD_LIBS) $(LIB)/libodp-linux.la
+__LIB__libodphelper_la_LIBADD = $(PTHREAD_LIBS)
lib_LTLIBRARIES = $(LIB)/libodphelper.la
diff --git a/helper/cuckootable.c b/helper/cuckootable.c
index 237c2f297..47dd90b6c 100644
--- a/helper/cuckootable.c
+++ b/helper/cuckootable.c
@@ -260,7 +260,11 @@ odph_cuckoo_table_create(
pool = odp_pool_lookup(pool_name);
if (pool != ODP_POOL_INVALID)
- odp_pool_destroy(pool);
+ if (odp_pool_destroy(pool)) {
+ odp_shm_free(shm_tbl);
+ ODPH_DBG("failed to destroy pre-existing pool\n");
+ return NULL;
+ }
odp_pool_param_init(&param);
param.type = ODP_POOL_BUFFER;
@@ -285,7 +289,7 @@ odph_cuckoo_table_create(
queue = odp_queue_create(queue_name, &qparam);
if (queue == ODP_QUEUE_INVALID) {
ODPH_DBG("failed to create free_slots queue\n");
- odp_pool_destroy(pool);
+ (void)odp_pool_destroy(pool);
odp_shm_free(shm_tbl);
return NULL;
}
diff --git a/helper/iplookuptable.c b/helper/iplookuptable.c
index c02ee5415..eacfcf5f8 100644
--- a/helper/iplookuptable.c
+++ b/helper/iplookuptable.c
@@ -150,7 +150,7 @@ cache_destroy(odph_iplookup_table_impl *impl)
sprintf(
pool_name, "%s_%d_%d",
impl->name, i, count);
- odp_pool_destroy(odp_pool_lookup(pool_name));
+ (void)odp_pool_destroy(odp_pool_lookup(pool_name));
}
}
}