From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3138B43391; Tue, 21 Nov 2023 18:18:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C31DB42E8E; Tue, 21 Nov 2023 18:18:40 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id A905640DCD for ; Tue, 21 Nov 2023 18:18:38 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id D51E520B74C0; Tue, 21 Nov 2023 09:18:37 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com D51E520B74C0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1700587117; bh=f+uV6aAYMFanfDcTGIFQfejksDCcfY3RDrsYj7t8qKA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PjvK4RNZj2xUkSYCWZoqdc00YTxsZH0VtKhgNJ4bFogmzFDgjwT+WqL03Wa1nurZs xx9McRW+E+3pzIF5v+eg+NeCx8h2KLn+Vi1pbnzWE8uErs/j0e0i9ivHNd0EaqlHnD SNMLtpFO6+tq7S0jcTCDD0YGc208a0GaP6SRN+iE= Date: Tue, 21 Nov 2023 09:18:37 -0800 From: Tyler Retzlaff To: Stephen Hemminger Cc: Hemant Agrawal , "dev@dpdk.org" , Sachin Saxena , Gagandeep Singh Subject: Re: [PATCH v4 10/10] common/dpaxx: remove zero length array Message-ID: <20231121171837.GA7518@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <20230113215205.125767-1-stephen@networkplumber.org> <20231120170942.197172-1-stephen@networkplumber.org> <20231120170942.197172-11-stephen@networkplumber.org> <20231121084641.39e7b39b@hermes.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231121084641.39e7b39b@hermes.local> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Tue, Nov 21, 2023 at 08:46:41AM -0800, Stephen Hemminger wrote: > On Tue, 21 Nov 2023 10:49:59 +0000 > Hemant Agrawal wrote: > > > > struct ipsec_encap_pdb { > > > uint32_t options; > > > @@ -350,7 +349,6 @@ struct ipsec_encap_pdb { > > > }; > > > uint32_t spi; > > > uint32_t ip_hdr_len; > > > - uint8_t ip_hdr[0]; > > [Hemant] This should be replaced with > > uint8_t ip_hdr[]; > > > }; > > > > > That won't work because the structure is embedded in > another struct and then clang will correctly report an error. Hemant if the field is not referenced what's the harm in removing it?