diff options
author | charan makkina <charan795m@gmail.com> | 2018-11-21 15:17:39 +0530 |
---|---|---|
committer | charan makkina <charan795m@gmail.com> | 2018-11-26 10:32:58 +0530 |
commit | 960e7c662a8981a563f692f4dcdd221f1cfd3783 (patch) | |
tree | a4f750e036487ff053020d64f973c2027b43ba32 | |
parent | 95be8358d7426b815fbd1224fe71b4486a56aaac (diff) |
Fix: stack_register function name should be same.
Change-Id: Ib091993ca2ba4df1dab00ace93e0d1dfa4145807
Signed-off-by: charan makkina <charan795m@gmail.com>
-rw-r--r-- | demo/nginx_proxy/demo-1/module_config.json | 3 | ||||
-rw-r--r-- | demo/nginx_proxy/demo-2/module_config.json | 3 | ||||
-rw-r--r-- | release/configure/module_config.json | 2 | ||||
-rw-r--r-- | src/nSocket/nstack/nstack_info_parse.c | 20 | ||||
-rw-r--r-- | src/nSocket/nstack/nstack_module.h | 5 | ||||
-rw-r--r-- | stacks/lwip_stack/app_conf/module_config.json | 2 | ||||
-rw-r--r-- | stacks/lwip_stack/src/sbr/sbr_socket.c | 2 | ||||
-rw-r--r-- | stacks/rsocket/config/module_config.json | 2 | ||||
-rw-r--r-- | stacks/vpp/adapt/dmm_vcl_adpt.c | 2 | ||||
-rw-r--r-- | stacks/vpp/configure/module_config.json | 2 |
10 files changed, 18 insertions, 25 deletions
diff --git a/demo/nginx_proxy/demo-1/module_config.json b/demo/nginx_proxy/demo-1/module_config.json index 5861153..24f5cf8 100644 --- a/demo/nginx_proxy/demo-1/module_config.json +++ b/demo/nginx_proxy/demo-1/module_config.json @@ -3,7 +3,6 @@ "module_list": [ { "stack_name": "kernel", - "function_name": "kernel_stack_register", "libname": "./", "loadtype": "static", "deploytype": "1", @@ -14,7 +13,6 @@ }, { "stack_name": "lwip", - "function_name": "nstack_stack_register", "libname": "liblwip_dpdk.so", "loadtype": "dynmic", "deploytype": "3", @@ -25,7 +23,6 @@ }, { "stack_name": "vpp_hoststack", - "function_name": "vpphs_stack_register", "libname": "./libdmm_vcl.so", "loadtype": "dynmic", "deploytype": "4", diff --git a/demo/nginx_proxy/demo-2/module_config.json b/demo/nginx_proxy/demo-2/module_config.json index 5861153..24f5cf8 100644 --- a/demo/nginx_proxy/demo-2/module_config.json +++ b/demo/nginx_proxy/demo-2/module_config.json @@ -3,7 +3,6 @@ "module_list": [ { "stack_name": "kernel", - "function_name": "kernel_stack_register", "libname": "./", "loadtype": "static", "deploytype": "1", @@ -14,7 +13,6 @@ }, { "stack_name": "lwip", - "function_name": "nstack_stack_register", "libname": "liblwip_dpdk.so", "loadtype": "dynmic", "deploytype": "3", @@ -25,7 +23,6 @@ }, { "stack_name": "vpp_hoststack", - "function_name": "vpphs_stack_register", "libname": "./libdmm_vcl.so", "loadtype": "dynmic", "deploytype": "4", diff --git a/release/configure/module_config.json b/release/configure/module_config.json index 4532d1a..aebbf39 100644 --- a/release/configure/module_config.json +++ b/release/configure/module_config.json @@ -3,7 +3,6 @@ "module_list": [ { "stack_name": "kernel", /*stack name*/ - "function_name": "kernel_stack_register", /*function name*/ "libname": "./", /*library name, if loadtype is static, this maybe null, else must give a library name*/ "loadtype": "static", /*library load type: static or dynamic*/ @@ -19,7 +18,6 @@ *this is not a real stack, just an example for multiple stack configurations* { "stack_name": "stackx", - "function_name": "stackx_register", "libname": "libstackx.so", "loadtype": "dynmic", "deploytype": "3", diff --git a/src/nSocket/nstack/nstack_info_parse.c b/src/nSocket/nstack/nstack_info_parse.c index 04abb4e..84538cc 100644 --- a/src/nSocket/nstack/nstack_info_parse.c +++ b/src/nSocket/nstack/nstack_info_parse.c @@ -85,6 +85,7 @@ nstack_parse_module_cfg_json (char *param) int ret = NSTACK_RETURN_FAIL; int index = 0; int icnt = 0; + int ret_val; if (!obj) { @@ -125,10 +126,21 @@ nstack_parse_module_cfg_json (char *param) NSTACK_JSON_PARSE_STRING (module_obj, "stack_name", MODULE_NAME_MAX, &(g_nstack_module_desc[icnt].modName[0]), index); - NSTACK_JSON_PARSE_STRING (module_obj, "function_name", - MODULE_NAME_MAX, - &(g_nstack_module_desc - [icnt].register_fn_name[0]), index); + STRCPY_S (&(g_nstack_module_desc[icnt].register_fn_name[0]), + sizeof (& + (g_nstack_module_desc[icnt].register_fn_name[0])), + &(g_nstack_module_desc[icnt].modName[0])); + ret_val = + STRCAT_S (&(g_nstack_module_desc[icnt].register_fn_name[0]), + sizeof (& + (g_nstack_module_desc[icnt].register_fn_name + [0])), "_stack_register"); + if (EOK != ret_val) + { + NSFW_LOGERR ("register_fn_name STRCAT_S failed]ret_val=%d", + ret_val); + return -1; + } NSTACK_JSON_PARSE_STRING (module_obj, "libname", MODULE_NAME_MAX, &(g_nstack_module_desc[icnt].libPath[0]), index); diff --git a/src/nSocket/nstack/nstack_module.h b/src/nSocket/nstack/nstack_module.h index ec81ac1..40a2ef8 100644 --- a/src/nSocket/nstack/nstack_module.h +++ b/src/nSocket/nstack/nstack_module.h @@ -38,11 +38,6 @@ extern "C"{ #define NSTACK_MAX_MODULE_NUM 8 #define NSTACK_PRO_MODULE 1 -#define MIN_SOCK_FOR_STACKX 0 - -#define MOD_PRI_FOR_STACKX 1 -#define REG_FUN_FOR_STACKX "nstack_stack_register" - #define NSTACK_EP_FREE_NEED_REF 1 /*when epoll information free, need to wait that stack would not notify event */ #define NSTACK_EP_FREE_NONEED_REF 0 diff --git a/stacks/lwip_stack/app_conf/module_config.json b/stacks/lwip_stack/app_conf/module_config.json index 6a2f5fb..3531fb1 100644 --- a/stacks/lwip_stack/app_conf/module_config.json +++ b/stacks/lwip_stack/app_conf/module_config.json @@ -3,7 +3,6 @@ "module_list": [ { "stack_name": "kernel", - "function_name": "kernel_stack_register", "libname": "./", "loadtype": "static", "deploytype": "1", @@ -14,7 +13,6 @@ }, { "stack_name": "lwip", - "function_name": "nstack_stack_register", "libname": "liblwip_dpdk.so", "loadtype": "dynmic", "deploytype": "3", diff --git a/stacks/lwip_stack/src/sbr/sbr_socket.c b/stacks/lwip_stack/src/sbr/sbr_socket.c index 6f867ab..69481b5 100644 --- a/stacks/lwip_stack/src/sbr/sbr_socket.c +++ b/stacks/lwip_stack/src/sbr/sbr_socket.c @@ -1249,7 +1249,7 @@ SBR_INTERCEPT (void, fork_free_fd, (int s, pid_t p, pid_t c)) * *****************************************************************************/ int -nstack_stack_register (nstack_proc_cb * ops, nstack_event_cb * val) +lwip_stack_register (nstack_proc_cb * ops, nstack_event_cb * val) { if (!ops || !val || !val->handle) { diff --git a/stacks/rsocket/config/module_config.json b/stacks/rsocket/config/module_config.json index 2df82cd..2ca6b6f 100644 --- a/stacks/rsocket/config/module_config.json +++ b/stacks/rsocket/config/module_config.json @@ -3,7 +3,6 @@ "module_list": [ { "stack_name": "kernel", /*stack name*/ - "function_name": "kernel_stack_register", /*function name*/ "libname": "./", /*library name, if loadtype is static, this maybe null, else must give a library name*/ "loadtype": "static", /*library load type: static or dynamic*/ @@ -17,7 +16,6 @@ }, { "stack_name": "rsocket", - "function_name": "rsocket_stack_register", "libname": "libdmm_rsocket.so", "loadtype": "dynmic", "deploytype": "1", diff --git a/stacks/vpp/adapt/dmm_vcl_adpt.c b/stacks/vpp/adapt/dmm_vcl_adpt.c index d4974e2..56f9033 100644 --- a/stacks/vpp/adapt/dmm_vcl_adpt.c +++ b/stacks/vpp/adapt/dmm_vcl_adpt.c @@ -143,7 +143,7 @@ dmm_vpphs_init () } int -vpphs_stack_register (nstack_proc_cb * ops, nstack_event_cb * val) +vpp_hoststack_stack_register (nstack_proc_cb * ops, nstack_event_cb * val) { #undef NSTACK_MK_DECL diff --git a/stacks/vpp/configure/module_config.json b/stacks/vpp/configure/module_config.json index 49b7ca9..46c9c85 100644 --- a/stacks/vpp/configure/module_config.json +++ b/stacks/vpp/configure/module_config.json @@ -3,7 +3,6 @@ "module_list": [ { "stack_name": "kernel", /*stack name*/ - "function_name": "kernel_stack_register", /*function name*/ "libname": "./", /*library name, if loadtype is static, this maybe null, else must give a library name*/ "loadtype": "static", /*library load type: static or dynamic*/ @@ -17,7 +16,6 @@ }, { "stack_name": "vpp_hoststack", - "function_name": "vpphs_stack_register", "libname": "../lib64/libdmm_vcl.so", "loadtype": "dynmic", "deploytype": "4", |