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: Jim Harris <james.r.harris@intel.com> Change-Id: I8a0385ca5ae113e34a637f835d8d69f8d510433e Reviewed-on: https://review.gerrithub.io/400328 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
ad9f01264f
commit
2ecab7bd6a
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
}
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user