DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] lib/ip_frag: fix IP reassembly not working issue
@ 2016-11-06 17:16 Wenzhuo Lu
  2016-11-07 20:27 ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Wenzhuo Lu @ 2016-11-06 17:16 UTC (permalink / raw)
  To: dev; +Cc: adrien.mazarguil, konstantin.ananyev, Wenzhuo Lu

After changing pkt[0] to pkt[], the example IP reassembly is not
working.
It's weird because this change is fine. There should be no
difference between them.
As a workaround, revert this change.

Fixes: 347a1e037fd3 (lib: use C99 syntax for zero-size arrays)

Reported-by: Huilong Xu <huilongx.xu@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 lib/librte_ip_frag/rte_ip_frag.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_ip_frag/rte_ip_frag.h b/lib/librte_ip_frag/rte_ip_frag.h
index 69596ab..6708906 100644
--- a/lib/librte_ip_frag/rte_ip_frag.h
+++ b/lib/librte_ip_frag/rte_ip_frag.h
@@ -124,7 +124,7 @@ struct rte_ip_frag_tbl {
 	struct ip_frag_pkt *last;         /**< last used entry. */
 	struct ip_pkt_list lru;           /**< LRU list for table entries. */
 	struct ip_frag_tbl_stat stat;     /**< statistics counters. */
-	struct ip_frag_pkt pkt[];         /**< hash table. */
+	__extension__ struct ip_frag_pkt pkt[0]; /**< hash table. */
 };
 
 /** IPv6 fragment extension header */
-- 
1.9.3

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

* Re: [dpdk-dev] [PATCH] lib/ip_frag: fix IP reassembly not working issue
  2016-11-06 17:16 [dpdk-dev] [PATCH] lib/ip_frag: fix IP reassembly not working issue Wenzhuo Lu
@ 2016-11-07 20:27 ` Thomas Monjalon
  2016-11-08  0:55   ` Lu, Wenzhuo
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Monjalon @ 2016-11-07 20:27 UTC (permalink / raw)
  To: Wenzhuo Lu; +Cc: dev, adrien.mazarguil, konstantin.ananyev

2016-11-06 12:16, Wenzhuo Lu:
> After changing pkt[0] to pkt[], the example IP reassembly is not
> working.
> It's weird because this change is fine. There should be no
> difference between them.
> As a workaround, revert this change.
> 
> Fixes: 347a1e037fd3 (lib: use C99 syntax for zero-size arrays)
> 
> Reported-by: Huilong Xu <huilongx.xu@intel.com>
> Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>

Applied, thanks

Please keep us informed if you understand the issue.

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

* Re: [dpdk-dev] [PATCH] lib/ip_frag: fix IP reassembly not working issue
  2016-11-07 20:27 ` Thomas Monjalon
@ 2016-11-08  0:55   ` Lu, Wenzhuo
  0 siblings, 0 replies; 3+ messages in thread
From: Lu, Wenzhuo @ 2016-11-08  0:55 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, adrien.mazarguil, Ananyev, Konstantin

Hi Thomas,


> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Tuesday, November 8, 2016 4:28 AM
> To: Lu, Wenzhuo
> Cc: dev@dpdk.org; adrien.mazarguil@6wind.com; Ananyev, Konstantin
> Subject: Re: [dpdk-dev] [PATCH] lib/ip_frag: fix IP reassembly not working issue
> 
> 2016-11-06 12:16, Wenzhuo Lu:
> > After changing pkt[0] to pkt[], the example IP reassembly is not
> > working.
> > It's weird because this change is fine. There should be no difference
> > between them.
> > As a workaround, revert this change.
> >
> > Fixes: 347a1e037fd3 (lib: use C99 syntax for zero-size arrays)
> >
> > Reported-by: Huilong Xu <huilongx.xu@intel.com>
> > Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
> 
> Applied, thanks
> 
> Please keep us informed if you understand the issue.
Just FYI,
It's so weird, I have to work around it first.
1, I don't think there's any wrong with the code.
2, I cannot reproduce this issue on my machine, but Huilong can reproduce it on different machines. As Adrien said, it may be a compile issue. I guess it's a compiler issue. Maybe gcc 4.8.5 has its own problem. (I'm using gcc 4.8.3 which is fine.)

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

end of thread, other threads:[~2016-11-08  0:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-06 17:16 [dpdk-dev] [PATCH] lib/ip_frag: fix IP reassembly not working issue Wenzhuo Lu
2016-11-07 20:27 ` Thomas Monjalon
2016-11-08  0:55   ` Lu, Wenzhuo

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