env: Eliminate remaining usage of rte_memzone

This was only used for debugging. Everywhere else
used the spdk_memzone abstraction.

Change-Id: I8a828ea3c7abccb66c8a027cb13de43c560ff7a1
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Ben Walker 2016-10-03 14:26:07 -07:00 committed by Daniel Verkamp
parent 7f5b671db7
commit 535827c559
7 changed files with 22 additions and 6 deletions

View File

@ -36,10 +36,10 @@
#include <stdlib.h> #include <stdlib.h>
#include <rte_config.h> #include <rte_config.h>
#include <rte_memzone.h>
#include <rte_eal.h> #include <rte_eal.h>
#include <rte_lcore.h> #include <rte_lcore.h>
#include "spdk/env.h"
#include "spdk/event.h" #include "spdk/event.h"
#include "iscsi/iscsi.h" #include "iscsi/iscsi.h"
#include "spdk/log.h" #include "spdk/log.h"
@ -85,7 +85,7 @@ static void
spdk_startup(spdk_event_t event) spdk_startup(spdk_event_t event)
{ {
if (getenv("MEMZONE_DUMP") != NULL) { if (getenv("MEMZONE_DUMP") != NULL) {
rte_memzone_dump(stdout); spdk_memzone_dump(stdout);
fflush(stdout); fflush(stdout);
} }
} }

View File

@ -39,7 +39,6 @@
#include <signal.h> #include <signal.h>
#include <rte_config.h> #include <rte_config.h>
#include <rte_memzone.h>
#include <rte_lcore.h> #include <rte_lcore.h>
#include "nvmf_tgt.h" #include "nvmf_tgt.h"
@ -337,7 +336,7 @@ spdk_nvmf_startup(spdk_event_t event)
SPDK_NOTICELOG("Acceptor running on core %u\n", g_spdk_nvmf_tgt_conf.acceptor_lcore); SPDK_NOTICELOG("Acceptor running on core %u\n", g_spdk_nvmf_tgt_conf.acceptor_lcore);
if (getenv("MEMZONE_DUMP") != NULL) { if (getenv("MEMZONE_DUMP") != NULL) {
rte_memzone_dump(stdout); spdk_memzone_dump(stdout);
fflush(stdout); fflush(stdout);
} }

View File

@ -45,6 +45,7 @@ extern "C" {
#include <stdbool.h> #include <stdbool.h>
#include <stddef.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>
#include <stdio.h>
struct spdk_pci_device; struct spdk_pci_device;
@ -85,6 +86,12 @@ spdk_memzone_lookup(const char *name);
int int
spdk_memzone_free(const char *name); spdk_memzone_free(const char *name);
/**
* Dump debug information about all memzones.
*/
void
spdk_memzone_dump(FILE *f);
struct spdk_mempool; struct spdk_mempool;
/** /**

6
lib/env/env.c vendored
View File

@ -97,6 +97,12 @@ spdk_memzone_free(const char *name)
return -1; return -1;
} }
void
spdk_memzone_dump(FILE *f)
{
rte_memzone_dump(f);
}
struct spdk_mempool * struct spdk_mempool *
spdk_mempool_create(const char *name, size_t count, spdk_mempool_create(const char *name, size_t count,
size_t ele_size, size_t cache_size) size_t ele_size, size_t cache_size)

View File

@ -54,7 +54,6 @@
#include <rte_common.h> #include <rte_common.h>
#include <rte_log.h> #include <rte_log.h>
#include <rte_memcpy.h> #include <rte_memcpy.h>
#include <rte_memzone.h>
#include <rte_tailq.h> #include <rte_tailq.h>
#include <rte_eal.h> #include <rte_eal.h>
#include <rte_per_lcore.h> #include <rte_per_lcore.h>

View File

@ -36,7 +36,6 @@
#include <rte_common.h> #include <rte_common.h>
#include <rte_log.h> #include <rte_log.h>
#include <rte_memcpy.h> #include <rte_memcpy.h>
#include <rte_memzone.h>
#include <rte_tailq.h> #include <rte_tailq.h>
#include <rte_eal.h> #include <rte_eal.h>
#include <rte_per_lcore.h> #include <rte_per_lcore.h>

View File

@ -76,6 +76,12 @@ spdk_memzone_lookup(const char *name)
return NULL; return NULL;
} }
void
spdk_memzone_dump(FILE *f)
{
return;
}
int int
spdk_memzone_free(const char *name) spdk_memzone_free(const char *name)
{ {