summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 23fadd6)
raw | patch | inline | side by side (parent: 23fadd6)
author | Jiri Prokes <jirix.x.prokes@intel.com> | |
Wed, 25 Oct 2017 12:51:18 +0000 (05:51 -0700) | ||
committer | Jiri Prokes <jirix.x.prokes@intel.com> | |
Wed, 25 Oct 2017 13:07:20 +0000 (06:07 -0700) |
Signed-off-by: Jiri Prokes <jirix.x.prokes@intel.com>
src/collectd.conf.in | patch | blob | history | |
src/collectd.conf.pod | patch | blob | history | |
src/utils_dpdk.c | patch | blob | history | |
src/utils_dpdk.h | patch | blob | history |
diff --git a/src/collectd.conf.in b/src/collectd.conf.in
index 261abdfdead47776d678b4f48479d0e93f07f0d1..2051f3892b749d613f5dcdc6e51ab856a9137783 100644 (file)
--- a/src/collectd.conf.in
+++ b/src/collectd.conf.in
# Coremask "0x2"
# MemoryChannels "4"
# FilePrefix "rte"
+# LogLevel "7"
+# RteDriverLibPath "/usr/lib/dpdk-pmd"
# </EAL>
# SharedMemObj "dpdk_collectd_stats_0"
# EnabledPortMask 0xffff
diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod
index cf76e63991ef05ab26a93a3c17d1cf83d31d5acb..97d184a129028c80cbe72cb3757f20eca715e5c0 100644 (file)
--- a/src/collectd.conf.pod
+++ b/src/collectd.conf.pod
MemoryChannels "4"
FilePrefix "rte"
SocketMemory "1024"
+ LogLevel "7"
+ RteDriverLibPath "/usr/lib/dpdk-pmd"
</EAL>
SharedMemObj "dpdk_collectd_stats_0"
EnabledPortMask 0xffff
A string containing amount of Memory to allocate from hugepages on specific
sockets in MB. This is an optional value.
+=item B<LogLevel> I<LogLevel_number>
+
+A string containing log level number. This parameter is optional.
+If parameter is not present then default value "7" - (INFO) is used.
+Value "8" - (DEBUG) can be set to enable debug traces.
+
+=item B<RteDriverLibPath> I<Path>
+
+A string containing path to shared pmd driver lib or path to directory,
+where shared pmd driver libs are available. This parameter is optional.
+This parameter enable loading of shared pmd driver libs from defined path.
+E.g.: "/usr/lib/dpdk-pmd/librte_pmd_i40e.so"
+or "/usr/lib/dpdk-pmd"
+
=back
=over 3
diff --git a/src/utils_dpdk.c b/src/utils_dpdk.c
index 2f37818bfcc73044f2f4641eb6a88dcd5b4004ea..b6056466a0ad8336bdd8035911ff5209c1cf424f 100644 (file)
--- a/src/utils_dpdk.c
+++ b/src/utils_dpdk.c
#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
DEBUG("%s:dpdk_helper_check_pipe: read nbytes=%d", phc->shm_name, nbytes);
if (nbytes <= 0)
break;
- buf[nbytes] = '\n';
+ buf[nbytes] = '\0';
sstrncpy(out, buf, (nbytes + 1));
DEBUG("%s: helper process:\n%s", phc->shm_name, out);
}
diff --git a/src/utils_dpdk.h b/src/utils_dpdk.h
index e8d853575f538986fdaf395f424f06602a76a743..f3b7e7f726af2f2803a1307795e9cdbff704e7f0 100644 (file)
--- a/src/utils_dpdk.h
+++ b/src/utils_dpdk.h
char socket_memory[DATA_MAX_NAME_LEN];
char file_prefix[DATA_MAX_NAME_LEN];
char log_level[DATA_MAX_NAME_LEN];
- char rte_driver_lib_path[DATA_MAX_NAME_LEN];
+ char rte_driver_lib_path[PATH_MAX];
};
typedef struct dpdk_eal_config_s dpdk_eal_config_t;