From fe7e5d84f60283b01991c4c53d1c1dad17de06d6 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Mon, 11 Dec 2017 15:47:00 -0700 Subject: [PATCH] trace: replace DPDK call with SPDK env.h wrapper Remove the DPDK dependency from the trace library. Change-Id: Id03387042b036142a9b3a0a81276d6ddf5295802 Signed-off-by: Daniel Verkamp Reviewed-on: https://review.gerrithub.io/391315 Tested-by: SPDK Automated Test System Reviewed-by: Reviewed-by: Changpeng Liu Reviewed-by: Ben Walker --- lib/trace/Makefile | 1 - lib/trace/trace.c | 5 +---- lib/trace/trace_flags.c | 3 --- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/trace/Makefile b/lib/trace/Makefile index 507ffee95..8bd9ec178 100644 --- a/lib/trace/Makefile +++ b/lib/trace/Makefile @@ -34,7 +34,6 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..) include $(SPDK_ROOT_DIR)/mk/spdk.common.mk -CFLAGS += $(ENV_CFLAGS) C_SRCS = trace.c trace_flags.c LIBNAME = trace diff --git a/lib/trace/trace.c b/lib/trace/trace.c index 6e64553f2..fdc0de804 100644 --- a/lib/trace/trace.c +++ b/lib/trace/trace.c @@ -37,9 +37,6 @@ #include "spdk/string.h" #include "spdk/trace.h" -#include -#include - static char g_shm_name[64]; static struct spdk_trace_histories *g_trace_histories; @@ -63,7 +60,7 @@ spdk_trace_record(uint16_t tpoint_id, uint16_t poller_id, uint32_t size, return; } - lcore = rte_lcore_id(); + lcore = spdk_env_get_current_core(); if (lcore >= SPDK_TRACE_MAX_LCORE) { return; } diff --git a/lib/trace/trace_flags.c b/lib/trace/trace_flags.c index 03f58a805..dede1e2d9 100644 --- a/lib/trace/trace_flags.c +++ b/lib/trace/trace_flags.c @@ -37,9 +37,6 @@ #include "spdk/trace.h" #include "spdk/log.h" -#include -#include - struct spdk_trace_flags *g_trace_flags = NULL; static struct spdk_trace_register_fn *g_reg_fn_head = NULL;