From b04a6e5dacc458f81097c9b8a172dcbf16d8fd50 Mon Sep 17 00:00:00 2001
From: Deepak S <deepak.s@linux.intel.com>
Date: Thu, 1 Jun 2017 08:04:42 +0000
Subject: [PATCH] [BUG]: Fix segfault while sending the packets back

JIRA: SAMPLEVNF-18

This patch fixes segfault due to wrong use of portid while accessing
array

Change-Id: I1e8b57c27e7c26918bd61cb1d72dbe88ab269c98
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
---
 VNFs/UDP_Replay/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/VNFs/UDP_Replay/main.c b/VNFs/UDP_Replay/main.c
index 2578169d..0a705f6e 100644
--- a/VNFs/UDP_Replay/main.c
+++ b/VNFs/UDP_Replay/main.c
@@ -1243,7 +1243,7 @@ simple_ipv4_replay_8pkts(struct rte_mbuf *m[8], uint8_t portid, struct lcore_con
                 /* if not already processed as a arp/icmp pkt */
                 if (a[i]) {
                         port->transmit_single_pkt(port, m[i]);
-                        tx_pkt_count[(uint64_t)port]++;
+                        tx_pkt_count[(uint64_t)portid]++;
                 }
         }
 
-- 
2.16.6