iscsi: make globals static where possible
Change-Id: Ibd226babd873ad7cc10cf531abd90e3db24005b9 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
b8e5fbe688
commit
d96fe93bb8
@ -67,7 +67,7 @@
|
|||||||
offsetof(struct spdk_iscsi_conn, portal));
|
offsetof(struct spdk_iscsi_conn, portal));
|
||||||
|
|
||||||
#define MICROSECOND_TO_TSC(x) ((x) * rte_get_timer_hz()/1000000)
|
#define MICROSECOND_TO_TSC(x) ((x) * rte_get_timer_hz()/1000000)
|
||||||
int64_t g_conn_idle_interval_in_tsc = -1;
|
static int64_t g_conn_idle_interval_in_tsc = -1;
|
||||||
|
|
||||||
#define DEFAULT_CONNECTIONS_PER_LCORE 4
|
#define DEFAULT_CONNECTIONS_PER_LCORE 4
|
||||||
#define SPDK_MAX_POLLERS_PER_CORE 4096
|
#define SPDK_MAX_POLLERS_PER_CORE 4096
|
||||||
@ -75,11 +75,11 @@ static int g_connections_per_lcore = DEFAULT_CONNECTIONS_PER_LCORE;
|
|||||||
static rte_atomic32_t g_num_connections[RTE_MAX_LCORE];
|
static rte_atomic32_t g_num_connections[RTE_MAX_LCORE];
|
||||||
|
|
||||||
struct spdk_iscsi_conn *g_conns_array;
|
struct spdk_iscsi_conn *g_conns_array;
|
||||||
char g_shm_name[64];
|
static char g_shm_name[64];
|
||||||
|
|
||||||
pthread_mutex_t g_conns_mutex;
|
static pthread_mutex_t g_conns_mutex;
|
||||||
|
|
||||||
struct rte_timer g_shutdown_timer;
|
static struct rte_timer g_shutdown_timer;
|
||||||
|
|
||||||
static uint32_t spdk_iscsi_conn_allocate_reactor(uint64_t cpumask);
|
static uint32_t spdk_iscsi_conn_allocate_reactor(uint64_t cpumask);
|
||||||
static void __add_idle_conn(spdk_event_t event);
|
static void __add_idle_conn(spdk_event_t event);
|
||||||
|
@ -136,13 +136,13 @@ spdk_iscsi_config_dump_section(FILE *fp)
|
|||||||
|
|
||||||
|
|
||||||
/* Portal groups */
|
/* Portal groups */
|
||||||
const char *portal_group_section = \
|
static const char *portal_group_section = \
|
||||||
"\n"
|
"\n"
|
||||||
"# Users must change the PortalGroup section(s) to match the IP addresses\n"
|
"# Users must change the PortalGroup section(s) to match the IP addresses\n"
|
||||||
"# for their environment.\n"
|
"# for their environment.\n"
|
||||||
"# PortalGroup sections define which TCP ports the iSCSI server will use\n"
|
"# PortalGroup sections define which TCP ports the iSCSI server will use\n"
|
||||||
"# to listen for incoming connections. These are also used to determine\n"
|
"# to listen for incoming connections. These are also used to determine\n"
|
||||||
"# which targets are accessible over each portal group.\n";
|
"# which targets are accessible over each portal group.\n";
|
||||||
|
|
||||||
#define PORTAL_GROUP_TMPL \
|
#define PORTAL_GROUP_TMPL \
|
||||||
"[PortalGroup%d]\n" \
|
"[PortalGroup%d]\n" \
|
||||||
@ -173,13 +173,13 @@ spdk_iscsi_config_dump_portal_groups(FILE *fp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Initiator Groups */
|
/* Initiator Groups */
|
||||||
const char *initiator_group_section = \
|
static const char *initiator_group_section = \
|
||||||
"\n"
|
"\n"
|
||||||
"# Users must change the InitiatorGroup section(s) to match the IP\n"
|
"# Users must change the InitiatorGroup section(s) to match the IP\n"
|
||||||
"# addresses and initiator configuration in their environment.\n"
|
"# addresses and initiator configuration in their environment.\n"
|
||||||
"# Netmask can be used to specify a single IP address or a range of IP addresses\n"
|
"# Netmask can be used to specify a single IP address or a range of IP addresses\n"
|
||||||
"# Netmask 192.168.1.20 <== single IP address\n"
|
"# Netmask 192.168.1.20 <== single IP address\n"
|
||||||
"# Netmask 192.168.1.0/24 <== IP range 192.168.1.*\n";
|
"# Netmask 192.168.1.0/24 <== IP range 192.168.1.*\n";
|
||||||
|
|
||||||
#define INITIATOR_GROUP_TMPL \
|
#define INITIATOR_GROUP_TMPL \
|
||||||
"[InitiatorGroup%d]\n" \
|
"[InitiatorGroup%d]\n" \
|
||||||
@ -220,11 +220,11 @@ spdk_iscsi_config_dump_initiator_groups(FILE *fp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Target nodes */
|
/* Target nodes */
|
||||||
const char *target_nodes_section = \
|
static const char *target_nodes_section = \
|
||||||
"\n"
|
"\n"
|
||||||
"# Users should change the TargetNode section(s) below to match the\n"
|
"# Users should change the TargetNode section(s) below to match the\n"
|
||||||
"# desired iSCSI target node configuration.\n"
|
"# desired iSCSI target node configuration.\n"
|
||||||
"# TargetName, Mapping, LUN0 are minimum required\n";
|
"# TargetName, Mapping, LUN0 are minimum required\n";
|
||||||
|
|
||||||
#define TARGET_NODE_TMPL \
|
#define TARGET_NODE_TMPL \
|
||||||
"[TargetNode%d]\n" \
|
"[TargetNode%d]\n" \
|
||||||
|
Loading…
Reference in New Issue
Block a user