summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX
diff options
context:
space:
mode:
authorDeepak S <deepak.s@linux.intel.com>2018-12-18 15:06:44 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-12-18 15:06:44 +0000
commitffc6be265ca04773fb4fff09648304d156612e1c (patch)
tree1aee1609541f6d152640997ef884d7541fa1d1af /VNFs/DPPD-PROX
parenta9f8ae63f7b3b5cdc566bdaaf4521658779a86f7 (diff)
parentd338068b8f832e23b54bf72cf4994410e88c8f60 (diff)
Merge "Fix handing configuration error (missing tx port or ring in gen mode)"
Diffstat (limited to 'VNFs/DPPD-PROX')
-rw-r--r--VNFs/DPPD-PROX/handle_gen.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/VNFs/DPPD-PROX/handle_gen.c b/VNFs/DPPD-PROX/handle_gen.c
index c3be11a8..4040b334 100644
--- a/VNFs/DPPD-PROX/handle_gen.c
+++ b/VNFs/DPPD-PROX/handle_gen.c
@@ -1301,7 +1301,8 @@ static void init_task_gen(struct task_base *tbase, struct task_args *targ)
task_init_gen_load_pcap(task, targ);
}
- if ((targ->flags & DSF_KEEP_SRC_MAC) == 0 && (targ->nb_txrings || targ->nb_txports)) {
+ PROX_PANIC(((targ->nb_txrings == 0) && (targ->nb_txports == 0)), "Gen mode requires a tx ring or a tx port");
+ if ((targ->flags & DSF_KEEP_SRC_MAC) == 0) {
uint8_t *src_addr = prox_port_cfg[tbase->tx_params_hw.tx_port_queue->port].eth_addr.addr_bytes;
for (uint32_t i = 0; i < task->n_pkts; ++i) {
rte_memcpy(&task->pkt_template[i].buf[6], src_addr, 6);