lib/sock: remove spdk prefix from static functions in sock.c

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I86311908039368135f0fe2ea68e63cf351f9f79e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2297
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Seth Howell 2020-05-09 16:22:08 -07:00 committed by Jim Harris
parent 67801f6cca
commit ca87d13e56

View File

@ -58,7 +58,7 @@ static pthread_mutex_t g_map_table_mutex = PTHREAD_MUTEX_INITIALIZER;
* If the group is already in the map, take a reference. * If the group is already in the map, take a reference.
*/ */
static int static int
spdk_sock_map_insert(int placement_id, struct spdk_sock_group *group) sock_map_insert(int placement_id, struct spdk_sock_group *group)
{ {
struct spdk_sock_placement_id_entry *entry; struct spdk_sock_placement_id_entry *entry;
@ -95,7 +95,7 @@ spdk_sock_map_insert(int placement_id, struct spdk_sock_group *group)
* If the reference count is 0, remove the group. * If the reference count is 0, remove the group.
*/ */
static void static void
spdk_sock_map_release(int placement_id) sock_map_release(int placement_id)
{ {
struct spdk_sock_placement_id_entry *entry; struct spdk_sock_placement_id_entry *entry;
@ -113,7 +113,7 @@ spdk_sock_map_release(int placement_id)
/* Look up the group for a placement_id. */ /* Look up the group for a placement_id. */
static void static void
spdk_sock_map_lookup(int placement_id, struct spdk_sock_group **group) sock_map_lookup(int placement_id, struct spdk_sock_group **group)
{ {
struct spdk_sock_placement_id_entry *entry; struct spdk_sock_placement_id_entry *entry;
@ -131,7 +131,7 @@ spdk_sock_map_lookup(int placement_id, struct spdk_sock_group **group)
/* Remove the socket group from the map table */ /* Remove the socket group from the map table */
static void static void
spdk_sock_remove_sock_group_from_map_table(struct spdk_sock_group *group) sock_remove_sock_group_from_map_table(struct spdk_sock_group *group)
{ {
struct spdk_sock_placement_id_entry *entry, *tmp; struct spdk_sock_placement_id_entry *entry, *tmp;
@ -153,7 +153,7 @@ spdk_sock_get_optimal_sock_group(struct spdk_sock *sock, struct spdk_sock_group
rc = sock->net_impl->get_placement_id(sock, &placement_id); rc = sock->net_impl->get_placement_id(sock, &placement_id);
if (!rc && (placement_id != 0)) { if (!rc && (placement_id != 0)) {
spdk_sock_map_lookup(placement_id, group); sock_map_lookup(placement_id, group);
return 0; return 0;
} else { } else {
return -1; return -1;
@ -182,7 +182,7 @@ spdk_sock_get_default_opts(struct spdk_sock_opts *opts)
* opts_user The opts passed by the caller. * opts_user The opts passed by the caller.
* */ * */
static void static void
spdk_sock_init_opts(struct spdk_sock_opts *opts, struct spdk_sock_opts *opts_user) sock_init_opts(struct spdk_sock_opts *opts, struct spdk_sock_opts *opts_user)
{ {
assert(opts); assert(opts);
assert(opts_user); assert(opts_user);
@ -224,7 +224,7 @@ spdk_sock_connect_ext(const char *ip, int port, char *impl_name, struct spdk_soc
continue; continue;
} }
spdk_sock_init_opts(&opts_local, opts); sock_init_opts(&opts_local, opts);
sock = impl->connect(ip, port, &opts_local); sock = impl->connect(ip, port, &opts_local);
if (sock != NULL) { if (sock != NULL) {
/* Copy the contents, both the two structures are the same ABI version */ /* Copy the contents, both the two structures are the same ABI version */
@ -266,7 +266,7 @@ spdk_sock_listen_ext(const char *ip, int port, char *impl_name, struct spdk_sock
continue; continue;
} }
spdk_sock_init_opts(&opts_local, opts); sock_init_opts(&opts_local, opts);
sock = impl->listen(ip, port, &opts_local); sock = impl->listen(ip, port, &opts_local);
if (sock != NULL) { if (sock != NULL) {
/* Copy the contents, both the two structures are the same ABI version */ /* Copy the contents, both the two structures are the same ABI version */
@ -510,7 +510,7 @@ spdk_sock_group_add_sock(struct spdk_sock_group *group, struct spdk_sock *sock,
rc = sock->net_impl->get_placement_id(sock, &placement_id); rc = sock->net_impl->get_placement_id(sock, &placement_id);
if (!rc && (placement_id != 0)) { if (!rc && (placement_id != 0)) {
rc = spdk_sock_map_insert(placement_id, group); rc = sock_map_insert(placement_id, group);
if (rc < 0) { if (rc < 0) {
return -1; return -1;
} }
@ -559,7 +559,7 @@ spdk_sock_group_remove_sock(struct spdk_sock_group *group, struct spdk_sock *soc
rc = sock->net_impl->get_placement_id(sock, &placement_id); rc = sock->net_impl->get_placement_id(sock, &placement_id);
if (!rc && (placement_id != 0)) { if (!rc && (placement_id != 0)) {
spdk_sock_map_release(placement_id); sock_map_release(placement_id);
} }
rc = group_impl->net_impl->group_impl_remove_sock(group_impl, sock); rc = group_impl->net_impl->group_impl_remove_sock(group_impl, sock);
@ -583,9 +583,9 @@ spdk_sock_group_poll(struct spdk_sock_group *group)
} }
static int static int
spdk_sock_group_impl_poll_count(struct spdk_sock_group_impl *group_impl, sock_group_impl_poll_count(struct spdk_sock_group_impl *group_impl,
struct spdk_sock_group *group, struct spdk_sock_group *group,
int max_events) int max_events)
{ {
struct spdk_sock *socks[MAX_EVENTS_PER_POLL]; struct spdk_sock *socks[MAX_EVENTS_PER_POLL];
int num_events, i; int num_events, i;
@ -642,7 +642,7 @@ spdk_sock_group_poll_count(struct spdk_sock_group *group, int max_events)
} }
STAILQ_FOREACH_FROM(group_impl, &group->group_impls, link) { STAILQ_FOREACH_FROM(group_impl, &group->group_impls, link) {
rc = spdk_sock_group_impl_poll_count(group_impl, group, max_events); rc = sock_group_impl_poll_count(group_impl, group, max_events);
if (rc < 0) { if (rc < 0) {
num_events = -1; num_events = -1;
SPDK_ERRLOG("group_impl_poll_count for net(%s) failed\n", SPDK_ERRLOG("group_impl_poll_count for net(%s) failed\n",
@ -681,7 +681,7 @@ spdk_sock_group_close(struct spdk_sock_group **group)
} }
} }
spdk_sock_remove_sock_group_from_map_table(*group); sock_remove_sock_group_from_map_table(*group);
free(*group); free(*group);
*group = NULL; *group = NULL;