DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] l3fwd: fix lookup burst size for ipv6
@ 2015-11-03 19:56 Pablo de Lara
  2015-11-03 20:13 ` [dpdk-dev] [PATCH v2] " Pablo de Lara
  0 siblings, 1 reply; 4+ messages in thread
From: Pablo de Lara @ 2015-11-03 19:56 UTC (permalink / raw)
  To: dev

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>
---
 examples/l3fwd/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index 1f3e5c6..74703b0 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]]);
-- 
2.4.3

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH v2] l3fwd: fix lookup burst size for ipv6
  2015-11-03 19:56 [dpdk-dev] [PATCH] l3fwd: fix lookup burst size for ipv6 Pablo de Lara
@ 2015-11-03 20:13 ` Pablo de Lara
  2015-11-10 13:46   ` Pattan, Reshma
  0 siblings, 1 reply; 4+ messages in thread
From: Pablo de Lara @ 2015-11-03 20:13 UTC (permalink / raw)
  To: dev

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>
---
Changes in v2:
 - Include update in release notes

 doc/guides/rel_notes/release_2_2.rst | 4 ++++
 examples/l3fwd/main.c                | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/doc/guides/rel_notes/release_2_2.rst b/doc/guides/rel_notes/release_2_2.rst
index b39a78a..0172354 100644
--- a/doc/guides/rel_notes/release_2_2.rst
+++ b/doc/guides/rel_notes/release_2_2.rst
@@ -143,6 +143,10 @@ Libraries
 Examples
 ~~~~~~~~
 
+* **l3fwd: fix lookup burst size for ipv6.**
+
+  Fixed issue where app crashes if ipv6 is used, due to a wrong
+  lookup burst size.
 
 Other
 ~~~~~
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index 1f3e5c6..74703b0 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]]);
-- 
2.4.3

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH v2] l3fwd: fix lookup burst size for ipv6
  2015-11-03 20:13 ` [dpdk-dev] [PATCH v2] " Pablo de Lara
@ 2015-11-10 13:46   ` Pattan, Reshma
  2015-12-07  2:14     ` Thomas Monjalon
  0 siblings, 1 reply; 4+ messages in thread
From: Pattan, Reshma @ 2015-11-10 13:46 UTC (permalink / raw)
  To: De Lara Guarch, Pablo, dev



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> Sent: Tuesday, November 3, 2015 8:14 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH v2] l3fwd: fix lookup burst size for 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>
> ---
> Changes in v2:
>  - Include update in release notes
> 
>  doc/guides/rel_notes/release_2_2.rst | 4 ++++
>  examples/l3fwd/main.c                | 2 +-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/doc/guides/rel_notes/release_2_2.rst
> b/doc/guides/rel_notes/release_2_2.rst
> index b39a78a..0172354 100644
> --- a/doc/guides/rel_notes/release_2_2.rst
> +++ b/doc/guides/rel_notes/release_2_2.rst
> @@ -143,6 +143,10 @@ Libraries
>  Examples
>  ~~~~~~~~
> 
> +* **l3fwd: fix lookup burst size for ipv6.**
> +
> +  Fixed issue where app crashes if ipv6 is used, due to a wrong  lookup
> + burst size.
> 
>  Other
>  ~~~~~
> diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index
> 1f3e5c6..74703b0 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]]);
> --
> 2.4.3

Acked-by: Reshma Pattan<Reshma.pattan@intel.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH v2] l3fwd: fix lookup burst size for ipv6
  2015-11-10 13:46   ` Pattan, Reshma
@ 2015-12-07  2:14     ` Thomas Monjalon
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2015-12-07  2:14 UTC (permalink / raw)
  To: De Lara Guarch, Pablo; +Cc: dev

> > 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>

Applied, thanks

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-12-07  2:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-03 19:56 [dpdk-dev] [PATCH] l3fwd: fix lookup burst size for ipv6 Pablo de Lara
2015-11-03 20:13 ` [dpdk-dev] [PATCH v2] " Pablo de Lara
2015-11-10 13:46   ` Pattan, Reshma
2015-12-07  2:14     ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).