summaryrefslogtreecommitdiffstats
path: root/lib/librte_member
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@gmail.com>2018-03-07 11:22:30 +0000
committerLuca Boccassi <luca.boccassi@gmail.com>2018-03-07 11:23:17 +0000
commitc3f15def2ebe9cc255cf0e5cf32aa171f5b4326d (patch)
tree8c8fc77df57bca8c0bfe4d0e8797879e12c6d6f9 /lib/librte_member
parent169a9de21e263aa6599cdc2d87a45ae158d9f509 (diff)
New upstream version 17.11.1upstream/17.11.1
Change-Id: Ida1700b5dac8649fc563670a37278e636bea051c Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'lib/librte_member')
-rw-r--r--lib/librte_member/rte_member.c3
-rw-r--r--lib/librte_member/rte_member.h12
2 files changed, 11 insertions, 4 deletions
diff --git a/lib/librte_member/rte_member.c b/lib/librte_member/rte_member.c
index cc9ea84a..c3a238bb 100644
--- a/lib/librte_member/rte_member.c
+++ b/lib/librte_member/rte_member.c
@@ -191,8 +191,9 @@ rte_member_create(const struct rte_member_parameters *params)
return setsum;
error_unlock_exit:
+ rte_free(te);
+ rte_free(setsum);
rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK);
- rte_member_free(setsum);
return NULL;
}
diff --git a/lib/librte_member/rte_member.h b/lib/librte_member/rte_member.h
index 9b0c8f99..56dd3b3a 100644
--- a/lib/librte_member/rte_member.h
+++ b/lib/librte_member/rte_member.h
@@ -80,6 +80,9 @@ extern "C" {
#include <stdint.h>
+#include <rte_common.h>
+#include <rte_config.h>
+
/** The set ID type that stored internally in hash table based set summary. */
typedef uint16_t member_set_t;
/** Invalid set ID used to mean no match found. */
@@ -104,9 +107,12 @@ typedef uint16_t member_set_t;
extern int librte_member_logtype;
-#define RTE_MEMBER_LOG(level, fmt, args...) \
-rte_log(RTE_LOG_ ## level, librte_member_logtype, "%s(): " fmt, \
- __func__, ## args)
+#define RTE_MEMBER_LOG(level, ...) \
+ rte_log(RTE_LOG_ ## level, \
+ librte_member_logtype, \
+ RTE_FMT("%s(): " RTE_FMT_HEAD(__VA_ARGS__,), \
+ __func__, \
+ RTE_FMT_TAIL(__VA_ARGS__,)))
/** @internal setsummary structure. */
struct rte_member_setsum;