From: Wenzhuo Lu Date: Sun, 6 Nov 2016 17:16:14 +0000 (-0500) Subject: ip_frag: fix IP reassembly regression X-Git-Tag: spdx-start~5350 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=91cd905af929ca11ab2b10406fc2d7413dc30e41;p=dpdk.git ip_frag: fix IP reassembly regression 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 Signed-off-by: Wenzhuo Lu --- diff --git a/lib/librte_ip_frag/rte_ip_frag.h b/lib/librte_ip_frag/rte_ip_frag.h index 69596ab48a..6708906d32 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 */