diff --git a/include/spdk/net.h b/include/spdk/net.h index 7326d51ba..e49322302 100644 --- a/include/spdk/net.h +++ b/include/spdk/net.h @@ -51,7 +51,7 @@ struct spdk_sock; struct spdk_net_framework { const char *name; - int (*init)(void); + void (*init)(void); void (*fini)(void); STAILQ_ENTRY(spdk_net_framework) link; diff --git a/lib/sock/vpp/vpp.c b/lib/sock/vpp/vpp.c index 752250eb7..0549dce93 100644 --- a/lib/sock/vpp/vpp.c +++ b/lib/sock/vpp/vpp.c @@ -624,7 +624,7 @@ static struct spdk_net_impl g_vpp_net_impl = { SPDK_NET_IMPL_REGISTER(vpp, &g_vpp_net_impl); -static int +static void spdk_vpp_net_framework_init(void) { int rc; @@ -633,7 +633,8 @@ spdk_vpp_net_framework_init(void) app_name = spdk_sprintf_alloc("SPDK_%d", getpid()); if (app_name == NULL) { SPDK_ERRLOG("Cannot alloc memory for SPDK app name\n"); - return -ENOMEM; + spdk_net_framework_init_next(-ENOMEM); + return; } rc = vppcom_app_create(app_name); @@ -643,7 +644,7 @@ spdk_vpp_net_framework_init(void) free(app_name); - return 0; + spdk_net_framework_init_next(0); } static void