projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Run all changed files 68 8.c/1*.h through format.sh web util
[collectd.git]
/
src
/
dpdkstat.c
diff --git
a/src/dpdkstat.c
b/src/dpdkstat.c
index
c95ba0c
..
ae93e53
100644
(file)
--- a/
src/dpdkstat.c
+++ b/
src/dpdkstat.c
@@
-32,8
+32,8
@@
#include "collectd.h"
#include "collectd.h"
-#include "common.h"
-#include "utils
_
dpdk.h"
+#include "
utils/common/
common.h"
+#include "utils
/dpdk/
dpdk.h"
#include <rte_config.h>
#include <rte_ethdev.h>
#include <rte_config.h>
#include <rte_ethdev.h>
@@
-125,9
+125,8
@@
static int dpdk_stats_preinit(void) {
int ret = dpdk_helper_init(g_shm_name, sizeof(dpdk_stats_ctx_t), &g_hc);
if (ret != 0) {
int ret = dpdk_helper_init(g_shm_name, sizeof(dpdk_stats_ctx_t), &g_hc);
if (ret != 0) {
- char errbuf[ERR_BUF_SIZE];
ERROR("%s: failed to initialize %s helper(error: %s)", DPDK_STATS_PLUGIN,
ERROR("%s: failed to initialize %s helper(error: %s)", DPDK_STATS_PLUGIN,
- g_shm_name,
sstrerror(errno, errbuf, sizeof(errbuf))
);
+ g_shm_name,
STRERRNO
);
return ret;
}
return ret;
}
@@
-396,9
+395,9
@@
static int dpdk_stats_counters_dispatch(dpdk_helper_ctx_t *phc) {
char dev_name[64];
if (ctx->config.port_name[i][0] != 0) {
char dev_name[64];
if (ctx->config.port_name[i][0] != 0) {
- snprintf(dev_name, sizeof(dev_name), "%s", ctx->config.port_name[i]);
+ s
s
nprintf(dev_name, sizeof(dev_name), "%s", ctx->config.port_name[i]);
} else {
} else {
- snprintf(dev_name, sizeof(dev_name), "port.%d", i);
+ s
s
nprintf(dev_name, sizeof(dev_name), "port.%d", i);
}
DEBUG(" === Dispatch stats for port %d (name=%s; stats_count=%d)", i,
}
DEBUG(" === Dispatch stats for port %d (name=%s; stats_count=%d)", i,
@@
-430,7
+429,7
@@
static int dpdk_stats_reinit_helper() {
size_t data_size = sizeof(dpdk_stats_ctx_t) +
(ctx->stats_count * DPDK_STATS_CTX_GET_XSTAT_SIZE);
size_t data_size = sizeof(dpdk_stats_ctx_t) +
(ctx->stats_count * DPDK_STATS_CTX_GET_XSTAT_SIZE);
- DEBUG("%s:%d helper reinit (new_size=%
zu
)", __FUNCTION__, __LINE__,
+ DEBUG("%s:%d helper reinit (new_size=%
" PRIsz "
)", __FUNCTION__, __LINE__,
data_size);
dpdk_stats_ctx_t tmp_ctx;
data_size);
dpdk_stats_ctx_t tmp_ctx;
@@
-446,9
+445,8
@@
static int dpdk_stats_reinit_helper() {
int ret;
ret = dpdk_helper_init(g_shm_name, data_size, &g_hc);
if (ret != 0) {
int ret;
ret = dpdk_helper_init(g_shm_name, data_size, &g_hc);
if (ret != 0) {
- char errbuf[ERR_BUF_SIZE];
ERROR("%s: failed to initialize %s helper(error: %s)", DPDK_STATS_PLUGIN,
ERROR("%s: failed to initialize %s helper(error: %s)", DPDK_STATS_PLUGIN,
- g_shm_name,
sstrerror(errno, errbuf, sizeof(errbuf))
);
+ g_shm_name,
STRERRNO
);
return ret;
}
return ret;
}