[BUG]: Fix segfault while sending the packets back 35/35635/1
authorDeepak S <deepak.s@linux.intel.com>
Thu, 1 Jun 2017 08:04:42 +0000 (08:04 +0000)
committerDeepak S <deepak.s@linux.intel.com>
Thu, 1 Jun 2017 08:16:49 +0000 (08:16 +0000)
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

index 2578169..0a705f6 100644 (file)
@@ -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]++;
                 }
         }