summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/log.h
diff options
context:
space:
mode:
authorXavier Simonart <xavier.simonart@intel.com>2020-01-03 03:09:19 +0100
committerXavier Simonart <xavier.simonart@intel.com>2020-05-29 23:41:49 +0200
commit7c4601f23c526b14a67674782b303663dfaa95af (patch)
tree51915ce3a919e03b67dbcc4c4dafa70bbd358eab /VNFs/DPPD-PROX/log.h
parentc61fccde40dc6bb4a6ecd21c9d6dc8969df33400 (diff)
Added support for IMIX through config and command line
In Prox configuration IMIX can be specified using the following syntax: imix=pkt_size,pkt_size... Up to 127 different pkt sizes can be specified. Through command line, the following syntax can be used imix core_id task_id pkt_size,pkt_size... Up to 127 packet sizes can be specified. When IMIX is enabled, PROX will loop through the list of packet sizes. PROX supports two different submodes to handle pcap files. In the 1st submode (default, no submode specified), timestamps from the pcap file are ignored. In this submode IMIX is supported as well and each packets in the pcap file will be generated with all IMIX sizes. In the second submode, called pcap in gen mode, packets are generated at the timestamp specified in the pcap file. This submode does not support IMIX. Change-Id: I53cbf1378a5364254285b81e6848350d98561184 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/log.h')
-rw-r--r--VNFs/DPPD-PROX/log.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/VNFs/DPPD-PROX/log.h b/VNFs/DPPD-PROX/log.h
index 0d2fba18..b270462e 100644
--- a/VNFs/DPPD-PROX/log.h
+++ b/VNFs/DPPD-PROX/log.h
@@ -17,6 +17,7 @@
#ifndef _LOG_H_
#define _LOG_H_
+#define PROX_LOG_PANIC -1
#define PROX_LOG_ERR 0
#define PROX_LOG_WARN 1
#define PROX_LOG_INFO 2
@@ -33,11 +34,13 @@ const char* get_warning(int i);
struct rte_mbuf;
#if PROX_MAX_LOG_LVL >= PROX_LOG_ERR
+int plog_err_or_panic(int do_panic, const char *fmt, ...) __attribute__((format(printf, 2, 3), cold));
int plog_err(const char *fmt, ...) __attribute__((format(printf, 1, 2), cold));
int plogx_err(const char *fmt, ...) __attribute__((format(printf, 1, 2), cold));
int plogd_err(const struct rte_mbuf *mbuf, const char *fmt, ...) __attribute__((format(printf, 2, 3), cold));
int plogdx_err(const struct rte_mbuf *mbuf, const char *fmt, ...) __attribute__((format(printf, 2, 3), cold));
#else
+__attribute__((format(printf, 2, 3))) static inline int plog_err_or_panic(__attribute__((unused)) int do_panic, __attribute__((unused)) const char *fmt, ...) {return 0;}
__attribute__((format(printf, 1, 2))) static inline int plog_err(__attribute__((unused)) const char *fmt, ...) {return 0;}
__attribute__((format(printf, 1, 2))) static inline int plogx_err(__attribute__((unused)) const char *fmt, ...) {return 0;}
__attribute__((format(printf, 2, 3))) static inline int plogd_err(__attribute__((unused)) const struct rte_mbuf *mbuf, __attribute__((unused)) const char *fmt, ...) {return 0;}