aboutsummaryrefslogtreecommitdiffstats
path: root/test/memtank
diff options
context:
space:
mode:
Diffstat (limited to 'test/memtank')
-rw-r--r--test/memtank/Makefile26
-rw-r--r--test/memtank/test_memtank.c11
2 files changed, 10 insertions, 27 deletions
diff --git a/test/memtank/Makefile b/test/memtank/Makefile
index b8e4483..5a508c0 100644
--- a/test/memtank/Makefile
+++ b/test/memtank/Makefile
@@ -11,32 +11,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-ifeq ($(RTE_SDK),)
-$(error "Please define RTE_SDK environment variable")
-endif
-
-ifeq ($(RTE_TARGET),)
-$(error "Please define RTE_TARGET environment variable")
-endif
-
-ifeq ($(TLDK_ROOT),)
-$(error "Please define TLDK_ROOT environment variable")
-endif
-
-include $(RTE_SDK)/mk/rte.vars.mk
-
# binary name
-APP = test_memtank
+APP_NAME = test_memtank
+
+include $(TLDK_ROOT)/mk/tle.var.mk
# all source are stored in SRCS-y
SRCS-y += test_memtank.c
-CFLAGS += $(WERROR_FLAGS)
-CFLAGS += -I$(RTE_OUTPUT)/include
-
-LDLIBS += -L$(RTE_OUTPUT)/lib
-LDLIBS += -ltle_memtank
-
-EXTRA_CFLAGS += -O3
+LIB_DEPS += tle_memtank
include $(TLDK_ROOT)/mk/tle.app.mk
diff --git a/test/memtank/test_memtank.c b/test/memtank/test_memtank.c
index 6312339..899cc5a 100644
--- a/test/memtank/test_memtank.c
+++ b/test/memtank/test_memtank.c
@@ -703,7 +703,7 @@ test_memtank_cleanup(struct tle_memtank *mt, struct memstat *ms,
printf("%s(%s)\n", __func__, tname);
- RTE_LCORE_FOREACH_SLAVE(lc)
+ RTE_LCORE_FOREACH_WORKER(lc)
rte_eal_remote_launch(test_worker_cleanup, &arg[lc], lc);
/* launch on master */
@@ -711,8 +711,9 @@ test_memtank_cleanup(struct tle_memtank *mt, struct memstat *ms,
arg[lc].master.run_cycles = CLEANUP_TIME * rte_get_timer_hz();
test_memtank_master(&arg[lc]);
+ rc = 0;
ms->nb_alloc_obj = 0;
- RTE_LCORE_FOREACH_SLAVE(lc) {
+ RTE_LCORE_FOREACH_WORKER(lc) {
rc |= rte_eal_wait_lcore(lc);
ms->nb_alloc_obj += arg[lc].stats.alloc.nb_alloc -
arg[lc].stats.free.nb_free;
@@ -764,7 +765,7 @@ test_memtank_mt(const char *tname, uint32_t alloc_flags, uint32_t free_flags)
memset(arg, 0, sizeof(arg));
/* prepare args on all slaves */
- RTE_LCORE_FOREACH_SLAVE(lc) {
+ RTE_LCORE_FOREACH_WORKER(lc) {
arg[lc].mt = mt;
rc = fill_worker_args(&arg[lc].worker, alloc_flags,
free_flags, lc);
@@ -779,7 +780,7 @@ test_memtank_mt(const char *tname, uint32_t alloc_flags, uint32_t free_flags)
}
/* launch on all slaves */
- RTE_LCORE_FOREACH_SLAVE(lc)
+ RTE_LCORE_FOREACH_WORKER(lc)
rte_eal_remote_launch(test_memtank_worker, &arg[lc], lc);
/* launch on master */
@@ -794,7 +795,7 @@ test_memtank_mt(const char *tname, uint32_t alloc_flags, uint32_t free_flags)
memtank_stat_reset(&wrk_stats);
rc = 0;
- RTE_LCORE_FOREACH_SLAVE(lc) {
+ RTE_LCORE_FOREACH_WORKER(lc) {
rc |= rte_eal_wait_lcore(lc);
memtank_stat_dump(stdout, lc, &arg[lc].stats);
memtank_stat_aggr(&wrk_stats, &arg[lc].stats);