Commit 88669436 authored by Ziye Yang's avatar Ziye Yang Committed by Daniel Verkamp
Browse files

nvmf: remove unnecessary nvmf.h



The function call of spdk_nvmf_check_pools can be
directly put in nvmf.c.

Reason: This pool is created by nvmf subsystem,
it should be recycled by this subsystem.

Change-Id: I49e49bcb56079fc25d26b1f5078a1808c2f8e189
Signed-off-by: default avatarZiye Yang <ziye.yang@intel.com>
parent 20f9d865
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -48,7 +48,6 @@
#include "nvmf/rdma.h"
#include "nvmf/port.h"
#include "nvmf/host.h"
#include "nvmf/nvmf.h"

#include "spdk/log.h"
#include "spdk/nvme.h"
@@ -232,9 +231,5 @@ main(int argc, char **argv)

	spdk_app_fini();

	if (spdk_nvmf_check_pools() != 0) {
		rc = -1;
	}

	return rc;
}
+0 −1
Original line number Diff line number Diff line
@@ -45,7 +45,6 @@
#include <rte_cycles.h>
#include <rte_timer.h>

#include "nvmf.h"
#include "spdk/nvmf_spec.h"
#include "conn.h"
#include "rdma.h"
+6 −2
Original line number Diff line number Diff line
@@ -38,7 +38,6 @@

#include "spdk/log.h"
#include "spdk/conf.h"
#include "nvmf.h"
#include "conf.h"
#include "conn.h"
#include "controller.h"
@@ -122,7 +121,7 @@ static int spdk_nvmf_check_pool(struct rte_mempool *pool, uint32_t count)
	}
}

int
static int
spdk_nvmf_check_pools(void)
{
	struct spdk_nvmf_globals *spdk_nvmf = &g_nvmf_tgt;
@@ -273,6 +272,11 @@ nvmf_tgt_subsystem_fini(void)
	free(g_nvmf_tgt.nodebase);

	pthread_mutex_destroy(&g_nvmf_tgt.mutex);

	if (spdk_nvmf_check_pools() != 0) {
		return -1;
	}

	return 0;
}

lib/nvmf/nvmf.h

deleted100644 → 0
+0 −48
Original line number Diff line number Diff line
/*-
 *   BSD LICENSE
 *
 *   Copyright (c) Intel Corporation.
 *   All rights reserved.
 *
 *   Redistribution and use in source and binary forms, with or without
 *   modification, are permitted provided that the following conditions
 *   are met:
 *
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in
 *       the documentation and/or other materials provided with the
 *       distribution.
 *     * Neither the name of Intel Corporation nor the names of its
 *       contributors may be used to endorse or promote products derived
 *       from this software without specific prior written permission.
 *
 *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#ifndef __NVMF_H__
#define __NVMF_H__

#include <stdbool.h>
#include <stdint.h>

/**
 * \file
 *
 */

int
spdk_nvmf_check_pools(void);

#endif /* __NVMF_H__ */
+0 −2
Original line number Diff line number Diff line
@@ -34,8 +34,6 @@
#ifndef __NVMF_INTERNAL_H__
#define __NVMF_INTERNAL_H__

#include "nvmf.h"

#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
Loading