nvmf: remove unimplemented AuthFile config

This enables SPDK_NVMF_BUILD_ETC to be moved out of the library as well,
since only authfile was using it before

Change-Id: I10d1145881f9a0358d7effe2d2d9851899413e1b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Daniel Verkamp 2016-06-08 13:42:42 -07:00 committed by Benjamin Walker
parent d3bbbfeea2
commit 1bb4fac463
7 changed files with 5 additions and 29 deletions

View File

@ -55,6 +55,7 @@
struct rte_mempool *request_mempool; struct rte_mempool *request_mempool;
#define SPDK_NVMF_BUILD_ETC "/usr/local/etc/nvmf"
#define SPDK_NVMF_DEFAULT_CONFIG SPDK_NVMF_BUILD_ETC "/nvmf.conf" #define SPDK_NVMF_DEFAULT_CONFIG SPDK_NVMF_BUILD_ETC "/nvmf.conf"
static void static void

View File

@ -36,9 +36,6 @@
# Users can optionally change this to fit their environment. # Users can optionally change this to fit their environment.
NodeBase "iqn.2013-06.com.intel.ch.spdk" NodeBase "iqn.2013-06.com.intel.ch.spdk"
# files
AuthFile /usr/local/etc/nvmf/auth.conf
# Set the optional in-capsule data byte length for I/O queue capsule size. # Set the optional in-capsule data byte length for I/O queue capsule size.
# Accepted values must be divisible by 16 and less than or equal to # Accepted values must be divisible by 16 and less than or equal to
# the default maximum transfer length NVMF_MAX_RECV_DATA_TRANSFER_SIZE. # the default maximum transfer length NVMF_MAX_RECV_DATA_TRANSFER_SIZE.

View File

@ -47,7 +47,6 @@ static int
spdk_nvmf_parse_nvmf_tgt(void) spdk_nvmf_parse_nvmf_tgt(void)
{ {
struct spdk_conf_section *sp; struct spdk_conf_section *sp;
char *authfile;
char *nodebase; char *nodebase;
int max_in_capsule_data; int max_in_capsule_data;
int max_sessions_per_subsystem; int max_sessions_per_subsystem;
@ -63,11 +62,6 @@ spdk_nvmf_parse_nvmf_tgt(void)
return -1; return -1;
} }
authfile = spdk_conf_section_get_val(sp, "AuthFile");
if (authfile == NULL) {
authfile = SPDK_NVMF_DEFAULT_AUTHFILE;
}
nodebase = spdk_conf_section_get_val(sp, "NodeBase"); nodebase = spdk_conf_section_get_val(sp, "NodeBase");
if (nodebase == NULL) { if (nodebase == NULL) {
nodebase = SPDK_NVMF_DEFAULT_NODEBASE; nodebase = SPDK_NVMF_DEFAULT_NODEBASE;
@ -96,7 +90,7 @@ spdk_nvmf_parse_nvmf_tgt(void)
max_recv_seg_len = SPDK_NVMF_MAX_RECV_DATA_TRANSFER_SIZE; max_recv_seg_len = SPDK_NVMF_MAX_RECV_DATA_TRANSFER_SIZE;
listen_port = SPDK_NVMF_DEFAULT_SIN_PORT; listen_port = SPDK_NVMF_DEFAULT_SIN_PORT;
rc = nvmf_tgt_init(authfile, nodebase, max_in_capsule_data, max_sessions_per_subsystem, rc = nvmf_tgt_init(nodebase, max_in_capsule_data, max_sessions_per_subsystem,
max_queue_depth, max_conn_per_sess, max_recv_seg_len, listen_port); max_queue_depth, max_conn_per_sess, max_recv_seg_len, listen_port);
return rc; return rc;

View File

@ -209,22 +209,15 @@ spdk_nvmf_check_pools(void)
} }
int int
nvmf_tgt_init(char *authfile, char *nodebase, int max_in_capsule_data, nvmf_tgt_init(char *nodebase, int max_in_capsule_data,
int max_sessions_per_subsystem, int max_sessions_per_subsystem,
int max_queue_depth, int max_conn_per_sess, int max_recv_seg_len, int listen_port) int max_queue_depth, int max_conn_per_sess, int max_recv_seg_len, int listen_port)
{ {
int rc; int rc;
g_nvmf_tgt.authfile = strdup(authfile);
if (!g_nvmf_tgt.authfile) {
SPDK_ERRLOG("No authfile provided\n");
return -EINVAL;
}
SPDK_TRACELOG(SPDK_TRACE_DEBUG, "AuthFile: %s\n", g_nvmf_tgt.authfile);
g_nvmf_tgt.nodebase = strdup(nodebase); g_nvmf_tgt.nodebase = strdup(nodebase);
if (!g_nvmf_tgt.nodebase) { if (!g_nvmf_tgt.nodebase) {
SPDK_ERRLOG("No authfile provided\n"); SPDK_ERRLOG("No NodeBase provided\n");
return -EINVAL; return -EINVAL;
} }
SPDK_TRACELOG(SPDK_TRACE_DEBUG, "NodeBase: %s\n", g_nvmf_tgt.nodebase); SPDK_TRACELOG(SPDK_TRACE_DEBUG, "NodeBase: %s\n", g_nvmf_tgt.nodebase);
@ -348,7 +341,6 @@ nvmf_tgt_subsystem_fini(void)
nvmf_shutdown(); nvmf_shutdown();
nvmf_initiator_group_array_destroy(); nvmf_initiator_group_array_destroy();
spdk_nvmf_port_destroy_all(); spdk_nvmf_port_destroy_all();
free(g_nvmf_tgt.authfile);
free(g_nvmf_tgt.nodebase); free(g_nvmf_tgt.nodebase);
pthread_mutex_destroy(&g_nvmf_tgt.mutex); pthread_mutex_destroy(&g_nvmf_tgt.mutex);

View File

@ -42,12 +42,8 @@
* *
*/ */
#define SPDK_NVMF_BUILD_ETC "/usr/local/etc/nvmf"
int int
nvmf_tgt_init(char *authfile, char *nodebase, int max_in_capsule_data, int max_sessions, nvmf_tgt_init(char *nodebase, int max_in_capsule_data, int max_sessions,
int max_queue_depth, int max_conn_per_sess, int max_recv_seg_len, int listen_port); int max_queue_depth, int max_conn_per_sess, int max_recv_seg_len, int listen_port);
int int

View File

@ -58,7 +58,6 @@
#define SPDK_NVMF_MAX_RECV_DATA_TRANSFER_SIZE LARGE_BB_MAX_SIZE #define SPDK_NVMF_MAX_RECV_DATA_TRANSFER_SIZE LARGE_BB_MAX_SIZE
#define SPDK_NVMF_DEFAULT_NUM_SESSIONS_PER_LCORE 1 #define SPDK_NVMF_DEFAULT_NUM_SESSIONS_PER_LCORE 1
#define SPDK_NVMF_DEFAULT_AUTHFILE SPDK_NVMF_BUILD_ETC "/auth.conf"
#define SPDK_NVMF_DEFAULT_NODEBASE "iqn.2013-10.com.intel.spdk" #define SPDK_NVMF_DEFAULT_NODEBASE "iqn.2013-10.com.intel.spdk"
#define SPDK_NVMF_DEFAULT_IN_CAPSULE_DATA_SIZE 1024 #define SPDK_NVMF_DEFAULT_IN_CAPSULE_DATA_SIZE 1024
#define SPDK_NVMF_DEFAULT_MAX_SESSIONS_PER_SUBSYSTEM 1 #define SPDK_NVMF_DEFAULT_MAX_SESSIONS_PER_SUBSYSTEM 1
@ -159,8 +158,6 @@ struct __attribute__((packed)) nvme_read_cdw13 {
}; };
struct spdk_nvmf_globals { struct spdk_nvmf_globals {
char *authfile;
char *nodebase; char *nodebase;
pthread_mutex_t mutex; pthread_mutex_t mutex;

View File

@ -7,7 +7,6 @@
[Nvmf] [Nvmf]
NodeBase "iqn.2013-06.com.intel.ch.spdk" NodeBase "iqn.2013-06.com.intel.ch.spdk"
AuthFile /usr/local/etc/nvmf/auth.conf
MaxConnectionsPerSession 4 MaxConnectionsPerSession 4
[Port1] [Port1]