From patchwork Sun Nov 6 17:16:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenzhuo Lu X-Patchwork-Id: 16961 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 891C12904; Mon, 7 Nov 2016 02:25:23 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id DE1DF231C for ; Mon, 7 Nov 2016 02:25:20 +0100 (CET) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP; 06 Nov 2016 17:25:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,604,1473145200"; d="scan'208";a="28192511" Received: from dpdk26.sh.intel.com ([10.239.128.228]) by fmsmga005.fm.intel.com with ESMTP; 06 Nov 2016 17:25:18 -0800 From: Wenzhuo Lu To: dev@dpdk.org Cc: adrien.mazarguil@6wind.com, konstantin.ananyev@intel.com, Wenzhuo Lu Date: Sun, 6 Nov 2016 12:16:14 -0500 Message-Id: <1478452574-127074-1-git-send-email-wenzhuo.lu@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dpdk-dev] [PATCH] lib/ip_frag: fix IP reassembly not working issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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 */