diff options
| author | 杨威 <[email protected]> | 2020-08-28 15:39:33 +0800 |
|---|---|---|
| committer | 杨威 <[email protected]> | 2020-08-28 15:39:33 +0800 |
| commit | 680184d6aec19065996912605735d15f3926ffa6 (patch) | |
| tree | 1a5537008b35cb346ab002a8613ba333aee36664 | |
| parent | 36a7ac55f147024a8796370c8f54cde755fa84e0 (diff) | |
Update:add enable_marsio_send_burst_flush under [packet_io.internal.interface] in sapp.toml, set default as 0Feature-bind-device-for-working-thread
| -rw-r--r-- | src/packet_io/packet_io_marsio.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/packet_io/packet_io_marsio.c b/src/packet_io/packet_io_marsio.c index 12aff53..f02d7a0 100644 --- a/src/packet_io/packet_io_marsio.c +++ b/src/packet_io/packet_io_marsio.c @@ -880,13 +880,17 @@ static int marsio_dl_get_function_entry(void) printf("\033[33m[Warning]dlopen '%s' failed!\033[0m\n", "/opt/mrzcpd/lib/libmarsio.so"); return -1; } - - ptr_marsio_send_burst_flush = ( void (*)(struct mr_sendpath * sendpath, queue_id_t sid))dlsym(marsio_so_handle, "marsio_send_burst_flush"); - if(NULL == ptr_marsio_send_burst_flush){ - printf("\033[33m[Warning]dlsym function '%s' from '%s' failed!\033[0m\n", "marsio_send_burst_flush", "/opt/mrzcpd/lib/libmarsio.so"); - return -1; + static int g_enable_marsio_send_burst_flush = 0; + + MESA_load_profile_int_def((char *)"etc/sapp.toml", (char *)"packet_io.internal.interface", (char *)"enable_marsio_send_burst_flush", &g_enable_marsio_send_burst_flush, 0); + if(g_enable_marsio_send_burst_flush != 0) + { + ptr_marsio_send_burst_flush = ( void (*)(struct mr_sendpath * sendpath, queue_id_t sid))dlsym(marsio_so_handle, "marsio_send_burst_flush"); + if(NULL == ptr_marsio_send_burst_flush){ + printf("\033[33m[Warning]dlsym function '%s' from '%s' failed!\033[0m\n", "marsio_send_burst_flush", "/opt/mrzcpd/lib/libmarsio.so"); + return -1; + } } - return 0; } |
