aboutsummaryrefslogtreecommitdiffstats
path: root/src/nSocket/nstack/nstack_socket.h
diff options
context:
space:
mode:
authoryalei wang <wylandrea@gmail.com>2018-07-18 07:59:13 +0000
committerGerrit Code Review <gerrit@fd.io>2018-07-18 07:59:13 +0000
commitbc4785071529bcfe5bac2aea852c283f4f47f8f8 (patch)
tree3f1c26ca9517113955af0bfcbfdda945509e1e09 /src/nSocket/nstack/nstack_socket.h
parent52241f47567ae07efecaf14b76f3e16fa23d171c (diff)
parent000ee67eeeaa9868a98c9d2d743db90357ba3fa0 (diff)
Merge "Update dpdk version from 16.04 to 18.02"
Diffstat (limited to 'src/nSocket/nstack/nstack_socket.h')
-rw-r--r--src/nSocket/nstack/nstack_socket.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/nSocket/nstack/nstack_socket.h b/src/nSocket/nstack/nstack_socket.h
index 3bc4a10..3bb7843 100644
--- a/src/nSocket/nstack/nstack_socket.h
+++ b/src/nSocket/nstack/nstack_socket.h
@@ -190,12 +190,18 @@ UNLOCK_CLOSE (nstack_fd_local_lock_info_t * local_lock)
#define UNLOCK_FOR_EP(local_lock) UNLOCK_CLOSE(local_lock)
-#define NSTACK_INIT_CHECK_RET(fun) \
- if (nstack_fw_init()) { \
- NSSOC_LOGERR("nstack %s call, but initial not finished yet [return]", #fun); \
- nstack_set_errno(ENOSYS); \
- return -1; \
- }
+#define NSTACK_INIT_CHECK_RET(fun, args...) \
+ do { \
+ if (NSTACK_MODULE_INITING == g_nStackInfo.fwInited) { \
+ NSSOC_LOGINF ("call kernel func %s", #fun); \
+ return nsfw_base_##fun(args); \
+ } \
+ if (nstack_fw_init()) { \
+ NSSOC_LOGERR("nstack %s call, but initial not finished yet [return]", #fun); \
+ nstack_set_errno(ENOSYS); \
+ return -1; \
+ } \
+ }while(0)
#define NSTACK_MODULE_ERROR_SET(Index)