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 <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/391315
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Daniel Verkamp 2017-12-11 15:47:00 -07:00
parent 33376dd136
commit fe7e5d84f6
3 changed files with 1 additions and 8 deletions

View File

@ -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

View File

@ -37,9 +37,6 @@
#include "spdk/string.h"
#include "spdk/trace.h"
#include <rte_config.h>
#include <rte_lcore.h>
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;
}

View File

@ -37,9 +37,6 @@
#include "spdk/trace.h"
#include "spdk/log.h"
#include <rte_config.h>
#include <rte_lcore.h>
struct spdk_trace_flags *g_trace_flags = NULL;
static struct spdk_trace_register_fn *g_reg_fn_head = NULL;