* [dpdk-dev] [PATCH] examples/l3fwd: fix compilation issue when using exact-match
@ 2015-08-07 9:08 Pablo de Lara
2015-08-07 10:07 ` Gonzalez Monroy, Sergio
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Pablo de Lara @ 2015-08-07 9:08 UTC (permalink / raw)
To: dev
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(-)
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],
--
2.4.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH] examples/l3fwd: fix compilation issue when using exact-match
2015-08-07 9:08 [dpdk-dev] [PATCH] examples/l3fwd: fix compilation issue when using exact-match Pablo de Lara
@ 2015-08-07 10:07 ` Gonzalez Monroy, Sergio
2015-08-09 9:54 ` Thomas Monjalon
2015-08-09 10:28 ` [dpdk-dev] [PATCH v2] " Pablo de Lara
2 siblings, 0 replies; 8+ messages in thread
From: Gonzalez Monroy, Sergio @ 2015-08-07 10:07 UTC (permalink / raw)
To: Pablo de Lara; +Cc: dev
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>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH] examples/l3fwd: fix compilation issue when using exact-match
2015-08-07 9:08 [dpdk-dev] [PATCH] examples/l3fwd: fix compilation issue when using exact-match Pablo de Lara
2015-08-07 10:07 ` Gonzalez Monroy, Sergio
@ 2015-08-09 9:54 ` Thomas Monjalon
2015-08-09 10:28 ` De Lara Guarch, Pablo
2015-08-09 10:28 ` [dpdk-dev] [PATCH v2] " Pablo de Lara
2 siblings, 1 reply; 8+ messages in thread
From: Thomas Monjalon @ 2015-08-09 9:54 UTC (permalink / raw)
To: Pablo de Lara; +Cc: dev
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH] examples/l3fwd: fix compilation issue when using exact-match
2015-08-09 9:54 ` Thomas Monjalon
@ 2015-08-09 10:28 ` De Lara Guarch, Pablo
0 siblings, 0 replies; 8+ messages in thread
From: De Lara Guarch, Pablo @ 2015-08-09 10:28 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [dpdk-dev] [PATCH v2] examples/l3fwd: fix compilation issue when using exact-match
2015-08-07 9:08 [dpdk-dev] [PATCH] examples/l3fwd: fix compilation issue when using exact-match Pablo de Lara
2015-08-07 10:07 ` Gonzalez Monroy, Sergio
2015-08-09 9:54 ` Thomas Monjalon
@ 2015-08-09 10:28 ` Pablo de Lara
2015-08-10 16:58 ` Thomas Monjalon
2 siblings, 1 reply; 8+ messages in thread
From: Pablo de Lara @ 2015-08-09 10:28 UTC (permalink / raw)
To: dev
From: "Pablo de Lara" <pablo.de.lara.guarch@intel.com>
L3fwd was trying to use an inexistent function "simple_ipv6_fwd_4pkts",
instead it should be "simple_ipv6_fwd_8pkts", and "simple_ipv8_fwd_4pkts"
instead of "simple_ipv4_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>
---
Changes in v2:
- Missing to fix additional type
examples/l3fwd/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index 9351322..f113778 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -1710,11 +1710,11 @@ main_loop(__attribute__((unused)) void *dummy)
& pkts_burst[j+6]->ol_flags
& pkts_burst[j+7]->ol_flags;
if (ol_flag & PKT_RX_IPV4_HDR ) {
- simple_ipv8_fwd_4pkts(&pkts_burst[j],
+ simple_ipv4_fwd_8pkts(&pkts_burst[j],
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],
--
2.4.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH v2] examples/l3fwd: fix compilation issue when using exact-match
2015-08-09 10:28 ` [dpdk-dev] [PATCH v2] " Pablo de Lara
@ 2015-08-10 16:58 ` Thomas Monjalon
2015-08-10 17:13 ` Thomas Monjalon
0 siblings, 1 reply; 8+ messages in thread
From: Thomas Monjalon @ 2015-08-10 16:58 UTC (permalink / raw)
To: Pablo de Lara; +Cc: dev
Hi Pablo,
2015-08-09 11:28, Pablo de Lara:
> From: "Pablo de Lara" <pablo.de.lara.guarch@intel.com>
>
> L3fwd was trying to use an inexistent function "simple_ipv6_fwd_4pkts",
> instead it should be "simple_ipv6_fwd_8pkts", and "simple_ipv8_fwd_4pkts"
> instead of "simple_ipv4_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>
> ---
>
> Changes in v2:
>
> - Missing to fix additional type
More fixes are needed:
make RTE_SDK=$(readlink -m ../..) RTE_TARGET=x86_64-native-linuxapp-clang \
EXTRA_CFLAGS='-DAPP_LOOKUP_METHOD=APP_LOOKUP_EXACT_MATCH'
examples/l3fwd/main.c:545:1: error: unused function 'send_packetsx4'
examples/l3fwd/main.c:1165:1: error: unused function 'rfc1812_process'
The right fix would be to remove one APP_LOOKUP_METHOD.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH v2] examples/l3fwd: fix compilation issue when using exact-match
2015-08-10 16:58 ` Thomas Monjalon
@ 2015-08-10 17:13 ` Thomas Monjalon
2015-08-10 20:39 ` Thomas Monjalon
0 siblings, 1 reply; 8+ messages in thread
From: Thomas Monjalon @ 2015-08-10 17:13 UTC (permalink / raw)
To: Pablo de Lara; +Cc: dev
2015-08-10 18:58, Thomas Monjalon:
> Hi Pablo,
>
> 2015-08-09 11:28, Pablo de Lara:
> > From: "Pablo de Lara" <pablo.de.lara.guarch@intel.com>
> >
> > L3fwd was trying to use an inexistent function "simple_ipv6_fwd_4pkts",
> > instead it should be "simple_ipv6_fwd_8pkts", and "simple_ipv8_fwd_4pkts"
> > instead of "simple_ipv4_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>
> > ---
> >
> > Changes in v2:
> >
> > - Missing to fix additional type
>
> More fixes are needed:
>
> make RTE_SDK=$(readlink -m ../..) RTE_TARGET=x86_64-native-linuxapp-clang \
> EXTRA_CFLAGS='-DAPP_LOOKUP_METHOD=APP_LOOKUP_EXACT_MATCH'
>
> examples/l3fwd/main.c:545:1: error: unused function 'send_packetsx4'
> examples/l3fwd/main.c:1165:1: error: unused function 'rfc1812_process'
>
> The right fix would be to remove one APP_LOOKUP_METHOD.
Build flags are:
- APP_LOOKUP_METHOD
- DO_RFC_1812_CHECKS
- defined(__SSE4_1__) -> ENABLE_MULTI_BUFFER_OPTIMIZE
- RTE_NEXT_ABI
Waiting a cleanup for 2.2, this fix should be OK and will be applied:
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -541,6 +541,7 @@ send_single_packet(struct rte_mbuf *m, uint8_t port)
return 0;
}
+#if (APP_LOOKUP_METHOD == APP_LOOKUP_LPM)
static inline __attribute__((always_inline)) void
send_packetsx4(struct lcore_conf *qconf, uint8_t port,
struct rte_mbuf *m[], uint32_t num)
@@ -618,6 +619,7 @@ send_packetsx4(struct lcore_conf *qconf, uint8_t port,
qconf->tx_mbufs[port].len = len;
}
+#endif /* APP_LOOKUP_LPM */
#ifdef DO_RFC_1812_CHECKS
static inline int
@@ -1138,6 +1140,8 @@ l3fwd_simple_forward(struct rte_mbuf *m, uint8_t portid, struct lcore_conf *qcon
#endif
}
+#if ((APP_LOOKUP_METHOD == APP_LOOKUP_LPM) && \
+ (ENABLE_MULTI_BUFFER_OPTIMIZE == 1))
#ifdef DO_RFC_1812_CHECKS
#define IPV4_MIN_VER_IHL 0x45
@@ -1188,6 +1192,7 @@ rfc1812_process(struct ipv4_hdr *ipv4_hdr, uint16_t *dp, uint32_t flags)
#else
#define rfc1812_process(mb, dp) do { } while (0)
#endif /* DO_RFC_1812_CHECKS */
+#endif /* APP_LOOKUP_LPM && ENABLE_MULTI_BUFFER_OPTIMIZE */
#if ((APP_LOOKUP_METHOD == APP_LOOKUP_LPM) && \
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH v2] examples/l3fwd: fix compilation issue when using exact-match
2015-08-10 17:13 ` Thomas Monjalon
@ 2015-08-10 20:39 ` Thomas Monjalon
0 siblings, 0 replies; 8+ messages in thread
From: Thomas Monjalon @ 2015-08-10 20:39 UTC (permalink / raw)
To: Pablo de Lara; +Cc: dev
2015-08-10 19:13, Thomas Monjalon:
> 2015-08-10 18:58, Thomas Monjalon:
> > Hi Pablo,
> >
> > 2015-08-09 11:28, Pablo de Lara:
> > > From: "Pablo de Lara" <pablo.de.lara.guarch@intel.com>
> > >
> > > L3fwd was trying to use an inexistent function "simple_ipv6_fwd_4pkts",
> > > instead it should be "simple_ipv6_fwd_8pkts", and "simple_ipv8_fwd_4pkts"
> > > instead of "simple_ipv4_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>
> > > ---
> > >
> > > Changes in v2:
> > >
> > > - Missing to fix additional type
> >
> > More fixes are needed:
> >
> > make RTE_SDK=$(readlink -m ../..) RTE_TARGET=x86_64-native-linuxapp-clang \
> > EXTRA_CFLAGS='-DAPP_LOOKUP_METHOD=APP_LOOKUP_EXACT_MATCH'
> >
> > examples/l3fwd/main.c:545:1: error: unused function 'send_packetsx4'
> > examples/l3fwd/main.c:1165:1: error: unused function 'rfc1812_process'
> >
> > The right fix would be to remove one APP_LOOKUP_METHOD.
>
> Build flags are:
> - APP_LOOKUP_METHOD
> - DO_RFC_1812_CHECKS
> - defined(__SSE4_1__) -> ENABLE_MULTI_BUFFER_OPTIMIZE
> - RTE_NEXT_ABI
>
> Waiting a cleanup for 2.2, this fix should be OK and will be applied:
Applied with additional fix.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-08-10 20:40 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-07 9:08 [dpdk-dev] [PATCH] examples/l3fwd: fix compilation issue when using exact-match Pablo de Lara
2015-08-07 10:07 ` Gonzalez Monroy, Sergio
2015-08-09 9:54 ` Thomas Monjalon
2015-08-09 10:28 ` De Lara Guarch, Pablo
2015-08-09 10:28 ` [dpdk-dev] [PATCH v2] " Pablo de Lara
2015-08-10 16:58 ` Thomas Monjalon
2015-08-10 17:13 ` Thomas Monjalon
2015-08-10 20:39 ` 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).