summaryrefslogtreecommitdiff
path: root/examples/l3fwd
diff options
context:
space:
mode:
authorPablo de Lara <pablo.de.lara.guarch@intel.com>2015-11-03 20:13:48 +0000
committerThomas Monjalon <thomas.monjalon@6wind.com>2015-12-07 03:21:13 +0100
commit3edf8754d8d46394da06de6bc678bd3125b5a3c1 (patch)
treec8d37e357243dab611edf5339b0f2a900890e89c /examples/l3fwd
parent6f8cfdb1b9c3a5b95b15f1899ed254bdb0036638 (diff)
downloaddpdk-3edf8754d8d46394da06de6bc678bd3125b5a3c1.zip
dpdk-3edf8754d8d46394da06de6bc678bd3125b5a3c1.tar.gz
dpdk-3edf8754d8d46394da06de6bc678bd3125b5a3c1.tar.xz
examples/l3fwd: fix crash with IPv6
Lookup burst size was changed for exact match from 4 to 8, for both ipv4 and ipv6, but actually only 4 keys were being looked up for ipv6, instead of 8, causing random segmentation faults. Fixes: 80fcb4d4 ("examples/l3fwd: increase lookup burst size to 8") Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Reshma Pattan <reshma.pattan@intel.com>
Diffstat (limited to 'examples/l3fwd')
-rw-r--r--examples/l3fwd/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index 9a7fd8c..91a0f58 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -1005,7 +1005,7 @@ simple_ipv6_fwd_8pkts(struct rte_mbuf *m[8], uint8_t portid, struct lcore_conf *
const void *key_array[8] = {&key[0], &key[1], &key[2], &key[3],
&key[4], &key[5], &key[6], &key[7]};
- rte_hash_lookup_multi(qconf->ipv6_lookup_struct, &key_array[0], 4, ret);
+ rte_hash_lookup_multi(qconf->ipv6_lookup_struct, &key_array[0], 8, ret);
dst_port[0] = (uint8_t) ((ret[0] < 0) ? portid:ipv6_l3fwd_out_if[ret[0]]);
dst_port[1] = (uint8_t) ((ret[1] < 0) ? portid:ipv6_l3fwd_out_if[ret[1]]);
dst_port[2] = (uint8_t) ((ret[2] < 0) ? portid:ipv6_l3fwd_out_if[ret[2]]);