projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added missing include of "collectd.h"
[collectd.git]
/
src
/
utils_dpdk.c
diff --git
a/src/utils_dpdk.c
b/src/utils_dpdk.c
index
2f37818
..
fbdcaf8
100644
(file)
--- a/
src/utils_dpdk.c
+++ b/
src/utils_dpdk.c
@@
-45,7
+45,9
@@
#define DPDK_DEFAULT_RTE_CONFIG "/var/run/.rte_config"
#define DPDK_EAL_ARGC 10
#define DPDK_DEFAULT_RTE_CONFIG "/var/run/.rte_config"
#define DPDK_EAL_ARGC 10
-// Complete trace should fit into 1024 chars
+// Complete trace should fit into 1024 chars. Trace contain some headers
+// and text together with traced data from pipe. This is the reason why
+// we need to limit DPDK_MAX_BUFFER_SIZE value.
#define DPDK_MAX_BUFFER_SIZE 896
#define DPDK_CDM_DEFAULT_TIMEOUT 10000
#define DPDK_MAX_BUFFER_SIZE 896
#define DPDK_CDM_DEFAULT_TIMEOUT 10000
@@
-731,8
+733,8
@@
static void dpdk_helper_check_pipe(dpdk_helper_ctx_t *phc) {
DEBUG("%s:dpdk_helper_check_pipe: read nbytes=%d", phc->shm_name, nbytes);
if (nbytes <= 0)
break;
DEBUG("%s:dpdk_helper_check_pipe: read nbytes=%d", phc->shm_name, nbytes);
if (nbytes <= 0)
break;
- buf[nbytes] = '\
n
';
- sstrncpy(out, buf,
(nbytes + 1
));
+ buf[nbytes] = '\
0
';
+ sstrncpy(out, buf,
sizeof(out
));
DEBUG("%s: helper process:\n%s", phc->shm_name, out);
}
}
DEBUG("%s: helper process:\n%s", phc->shm_name, out);
}
}