diff options
| -rw-r--r-- | service/src/mrb.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/service/src/mrb.c b/service/src/mrb.c index 04b80e7..c053ee6 100644 --- a/service/src/mrb.c +++ b/service/src/mrb.c @@ -214,7 +214,8 @@ static struct rte_mempool * __create_pktmbuf_pool(struct mrb_main * ctx, const c char _pool_symbol[MR_SYMBOL_MAX]; snprintf(_pool_symbol, sizeof(_pool_symbol) - 1, "MZ_%s", symbol); - struct rte_mempool * pool = rte_pktmbuf_pool_create(_pool_symbol, sz_pool, sz_cache, sz_align_priv, sz_data, (int)socket_id); + struct rte_mempool * pool = + rte_pktmbuf_pool_create(_pool_symbol, sz_pool, sz_cache, sz_align_priv, sz_data, (int)socket_id); if (unlikely(pool == NULL)) { MR_WARNING("Creating pktmbuf pool %s failed : %s", symbol, MR_STR_RTEERRNO()); @@ -556,7 +557,8 @@ int mrb_buffer_leak_config(struct sc_main * sc) MESA_load_profile_uint_def(cfgfile, "buffer_leak_detect", "restart_threshold", &__restart_threshold, __restart_threshold); - MESA_load_profile_uint_def(cfgfile, "buffer_leak_detect", "retry_times", &ctx->buffer_leak_retry_times_threshold, 5); + MESA_load_profile_uint_def(cfgfile, "buffer_leak_detect", "retry_times", &ctx->buffer_leak_retry_times_threshold, + 5); ctx->buffer_leak_warn_threshold = 1 - __warn_threshold / 1000.0; ctx->buffer_leak_restart_threshold = 1 - __restart_threshold / 1000.0; @@ -636,7 +638,7 @@ cJSON * mrb_monit_loop(struct sc_main * sc) TAILQ_FOREACH(mrb_pool_iter, &ctx->pool_list, next) { unsigned int d_avail = rte_mempool_avail_count(mrb_pool_iter->direct); - unsigned int d_in_use = rte_mempool_in_use_count(mrb_pool_iter->indirect); + unsigned int d_in_use = rte_mempool_in_use_count(mrb_pool_iter->direct); unsigned int in_avail = rte_mempool_avail_count(mrb_pool_iter->indirect); unsigned int in_in_use = rte_mempool_in_use_count(mrb_pool_iter->indirect); @@ -721,8 +723,8 @@ int mrb_buffer_leak_detect(struct sc_main * sc) /* 低限 */ if (d_avail <= warn_threshold_d || in_avail <= warn_threshold_in) { - MR_WARNING("Pktmbuf pool %s is nearly empty(d_avail = %u, in_avail = %d).", mrb_pool_iter->symbol, - d_avail, in_avail); + MR_WARNING("Pktmbuf pool %s is nearly empty(d_avail = %u, in_avail = %d).", mrb_pool_iter->symbol, d_avail, + in_avail); } /* 低低限 */ @@ -740,7 +742,8 @@ int mrb_buffer_leak_detect(struct sc_main * sc) if (mrb_pool_iter->leak_check_counter >= ctx->buffer_leak_retry_times_threshold) { MR_ERROR("Pktmbuf pool %s is empty(d_avail = %u, in_avail = %d), exceed the retries threshold, " - "MRZCPD service exit. \n", mrb_pool_iter->symbol, d_avail, in_avail); + "MRZCPD service exit. \n", + mrb_pool_iter->symbol, d_avail, in_avail); exit(EXIT_FAILURE); } |
