diff options
Diffstat (limited to 'README')
-rw-r--r-- | README | 68 |
1 files changed, 68 insertions, 0 deletions
@@ -0,0 +1,68 @@ +一、DMM compile + +1.compile all module: +cd build +cmake -D DMM_DPDK_INSTALL_DIR=$DPDK_INSTALL_PATH .. +make -j 8 + +Note: DPDK_INSTALL_PATH - the path in which DPDK has been installed + +libnStackAdpt.so, libnStackAPI.so, libsecurec.so will be copyed to release\lib64 folder. +declare_syscalls.h, nsocket_dmm_api.h will be copyed to release\include folder + +configure files : + release\configure + module_config.json is the stack module config file. + rd_config.json is the rd config file. + the content of these two configure files just a simple. + +2. run DMM +nStack DMM is just a library linked by APP, no need run any other. + +for example: + gcc -g -o sendmsg sendmsg.c -L./DMM/release/lib64 -lnStackAPI + sendmsg.c is a APP that create a socket and connect to the service. + run app:./sendmsg 192.168.1.10 1024 1 + + module_config.json rd_config.json should be put together with sendmsg + + module_config.json for example: + { + "default_stack_name": "kernel", /*when rd can't not be find maybe choose the defualt one*/ + "module_list": [ + { + "stack_name": "kernel", + "function_name": "kernel_stack_register", + "libname": "", /*library name, if loadtype is static, this maybe null, else must give a library name*/ + "loadtype": "static", /*library load type: static or dynamic*/ + "deploytype": "1", + "maxfd": "1024", + "minfd": "0", + "priorty": "1", + "stackid": "0", /*must be ordered and not be repeated*/ + } + ] + } + + rd_config.json for example: + { + "ip_route": [ + { + "subnet": "192.165.1.1/16", + "type": "nstack-kernel", /*output interface type, nstack-kernel: indicate that this ip should go through linux protocol, nstack-dpdk: go through stackx protocol*/ + }, + { + "subnet": "192.167.1.1/16", + "type": "nstack-kernel", + } + ] + "prot_route": [ + { + "proto_type": "11", + "type": "nstack-kernel", + }, + } + + + +
\ No newline at end of file |