Fix source mac address when applying imix 16/70216/2
authorXavier Simonart <xavier.simonart@intel.com>
Tue, 26 May 2020 09:46:41 +0000 (11:46 +0200)
committerXavier Simonart <xavier.simonart@intel.com>
Fri, 29 May 2020 21:47:36 +0000 (23:47 +0200)
Change-Id: I8cbbe1b08af9b5472c304f2fba3635f0a084fdd8
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
VNFs/DPPD-PROX/handle_gen.c

index ac75f22..427564c 100644 (file)
@@ -712,6 +712,9 @@ static int task_gen_set_eth_ip_udp_sizes(struct task_gen *task, uint32_t n_orig_
                        template = &task->pkt_template[k];
                        template->len = pkt_sizes[j];
                                rte_memcpy(template->buf, task->pkt_template_orig[i].buf, pkt_sizes[j]);
+                       if (task->flags & TASK_OVERWRITE_SRC_MAC_WITH_PORT_MAC) {
+                               rte_memcpy(&template->buf[sizeof(prox_rte_ether_addr)], &task->src_mac, sizeof(prox_rte_ether_addr));
+                       }
                        parse_l2_l3_len(template->buf, &template->l2_len, &template->l3_len, template->len);
                        if (template->l2_len == 0)
                                continue;