Commit 2ecab7bd authored by Jim Harris's avatar Jim Harris Committed by Daniel Verkamp
Browse files

net: remove ability to override default net_framework



In early days of SPDK, there was an experimental userspace
TCP stack called libuns.  The SPDK iSCSI target supported
using either the default POSIX/kernel TCP stack or this
libuns TCP stack.

libuns is no longer in use, but work has started on
supporting the FD.io VPP TCP userspace stack.  Abstractions
are being put in place to allow *both* the POSIX and VPP
stacks simultaneously.

So remove the concept of a "default" net_framework that is
defined with weak symbols that can be overridden by another
object file.  While here, also remove the "clear_socket_association"
concept which was specific to libuns.

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: I8a0385ca5ae113e34a637f835d8d69f8d510433e

Reviewed-on: https://review.gerrithub.io/400328


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent ad9f0126
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -105,7 +105,6 @@ main(int argc, char **argv)
	opts.shutdown_cb = NULL;
	opts.usr1_handler = spdk_sigusr1;

	printf("Using net framework %s\n", spdk_net_framework_get_name());
	/* Blocks until the application is exiting */
	rc = spdk_app_start(&opts, spdk_startup, NULL, NULL);

+0 −6
Original line number Diff line number Diff line
@@ -283,12 +283,7 @@ error_return:
	conn->pending_task_cnt = 0;
	conn->pending_activate_event = false;

	/*
	 * Since we are potentially moving control of this socket to a different
	 *  core, suspend the connection here.
	 */
	conn->lcore = spdk_env_get_current_core();
	spdk_net_framework_clear_socket_association(conn->sock);
	__sync_fetch_and_add(&g_num_connections[conn->lcore], 1);
	conn->poller = spdk_poller_register(spdk_iscsi_conn_login_do_work, conn, 0);

@@ -569,7 +564,6 @@ spdk_iscsi_conn_stop_poller(struct spdk_iscsi_conn *conn)
		spdk_scsi_dev_free_io_channels(conn->dev);
	}
	__sync_fetch_and_sub(&g_num_connections[spdk_env_get_current_core()], 1);
	spdk_net_framework_clear_socket_association(conn->sock);
	spdk_poller_unregister(&conn->poller);
}

+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk

C_SRCS = interface.c sock.c net_framework_default.c net_rpc.c
C_SRCS = interface.c sock.c net_framework.c net_rpc.c

LIBNAME = net

+0 −13
Original line number Diff line number Diff line
@@ -33,24 +33,11 @@

#include "spdk/net.h"

__attribute__((weak))
const char *spdk_net_framework_get_name(void)
{
	return "default";
}

__attribute__((weak))
int spdk_net_framework_start(void)
{
	return 0;
}

__attribute__((weak))
void spdk_net_framework_fini(void)
{
}

__attribute__((weak))
void spdk_net_framework_clear_socket_association(struct spdk_sock *sock)
{
}
+0 −1
Original line number Diff line number Diff line
@@ -37,7 +37,6 @@
#include "CUnit/Basic.h"

#include "iscsi/conn.c"
#include "net/net_framework_default.c"

SPDK_LOG_REGISTER_COMPONENT("iscsi", SPDK_LOG_ISCSI)