[dpdk-dev] examples/l3fwd: fix compilation issue when using exact-match

Message ID 1438938514-10304-1-git-send-email-pablo.de.lara.guarch@intel.com (mailing list archive)
State Superseded, archived
Headers

Commit Message

De Lara Guarch, Pablo Aug. 7, 2015, 9:08 a.m. UTC
  L3fwd was trying to use an inexistent function "simple_ipv6_fwd_4pkts",
instead it should be "simple_ipv6_fwd_8pkts".

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

Comments

Sergio Gonzalez Monroy Aug. 7, 2015, 10:07 a.m. UTC | #1
On 07/08/2015 10:08, Pablo de Lara wrote:
> L3fwd was trying to use an inexistent function "simple_ipv6_fwd_4pkts",
> instead it should be "simple_ipv6_fwd_8pkts".
>
> Fixes: 80fcb4d4 ("examples/l3fwd: increase lookup burst size to 8")
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
  
Thomas Monjalon Aug. 9, 2015, 9:54 a.m. UTC | #2
Hi Pablo,

2015-08-07 10:08, Pablo de Lara:
> L3fwd was trying to use an inexistent function "simple_ipv6_fwd_4pkts",
> instead it should be "simple_ipv6_fwd_8pkts".
> 
> Fixes: 80fcb4d4 ("examples/l3fwd: increase lookup burst size to 8")

There are 3 things wrong here.

1/ We must absolutely avoid compile-time paths:
	#if (ENABLE_MULTI_BUFFER_OPTIMIZE == 1)                                                                          
	#if (APP_LOOKUP_METHOD == APP_LOOKUP_EXACT_MATCH)
It makes test coverage too hard to track.

2/ When replacing a function, grepping it is a must have.
-simple_ipv6_fwd_4pkts(struct rte_mbuf* m[4], uint8_t portid, struct lcore_conf *qconf)
+simple_ipv6_fwd_8pkts(struct rte_mbuf *m[8], uint8_t portid, struct lcore_conf *qconf)
So this change would be straight forward:
> -						simple_ipv6_fwd_4pkts(&pkts_burst[j],
> +						simple_ipv6_fwd_8pkts(&pkts_burst[j],

3/ The above commit makes also this wrong replacement:
-                                               simple_ipv4_fwd_4pkts(&pkts_burst[j],
+                                               simple_ipv8_fwd_4pkts(&pkts_burst[j],
It is still not fixed.

Please send a v2 for this last typo. Thanks
  
De Lara Guarch, Pablo Aug. 9, 2015, 10:28 a.m. UTC | #3
Hi Thomas,

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Sunday, August 09, 2015 10:54 AM
> To: De Lara Guarch, Pablo
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] examples/l3fwd: fix compilation issue when
> using exact-match
> 
> Hi Pablo,
> 
> 2015-08-07 10:08, Pablo de Lara:
> > L3fwd was trying to use an inexistent function "simple_ipv6_fwd_4pkts",
> > instead it should be "simple_ipv6_fwd_8pkts".
> >
> > Fixes: 80fcb4d4 ("examples/l3fwd: increase lookup burst size to 8")
> 
> There are 3 things wrong here.
> 
> 1/ We must absolutely avoid compile-time paths:
> 	#if (ENABLE_MULTI_BUFFER_OPTIMIZE == 1)
> 	#if (APP_LOOKUP_METHOD == APP_LOOKUP_EXACT_MATCH)
> It makes test coverage too hard to track.
> 
> 2/ When replacing a function, grepping it is a must have.
> -simple_ipv6_fwd_4pkts(struct rte_mbuf* m[4], uint8_t portid, struct
> lcore_conf *qconf)
> +simple_ipv6_fwd_8pkts(struct rte_mbuf *m[8], uint8_t portid, struct
> lcore_conf *qconf)
> So this change would be straight forward:
> > -
> 	simple_ipv6_fwd_4pkts(&pkts_burst[j],
> > +
> 	simple_ipv6_fwd_8pkts(&pkts_burst[j],
> 
> 3/ The above commit makes also this wrong replacement:
> -                                               simple_ipv4_fwd_4pkts(&pkts_burst[j],
> +                                               simple_ipv8_fwd_4pkts(&pkts_burst[j],
> It is still not fixed.
> 
> Please send a v2 for this last typo. Thanks

Thanks for spotting it, v2 on the way!

Pablo
  

Patch

diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index 9351322..350c1cb 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -1714,7 +1714,7 @@  main_loop(__attribute__((unused)) void *dummy)
 									portid, qconf);
 					} else if (ol_flag & PKT_RX_IPV6_HDR) {
 #endif /* RTE_NEXT_ABI */
-						simple_ipv6_fwd_4pkts(&pkts_burst[j],
+						simple_ipv6_fwd_8pkts(&pkts_burst[j],
 									portid, qconf);
 					} else {
 						l3fwd_simple_forward(pkts_burst[j],