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 2865043391; Tue, 21 Nov 2023 18:01:47 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A869942E8E; Tue, 21 Nov 2023 18:01:46 +0100 (CET) Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by mails.dpdk.org (Postfix) with ESMTP id 3913F40DCD for ; Tue, 21 Nov 2023 18:01:45 +0100 (CET) Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-1ce5e65ba37so31073225ad.1 for ; Tue, 21 Nov 2023 09:01:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1700586104; x=1701190904; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=1YD03QKKEPn3F/nyCMME8e6mD0gTybB0cJQXrZ2TUKo=; b=BtHhh/a2SjsEBTgImjcsf9RT9cTSPTspjf82nsFAOX0I2q/Jr8aHHr5L88jtrBC7Oj nM2Cf3NcKRbGy4m8qpbiompXeuurrp4S2+swSMTNuQqK+yflPuJBZQyyufD7IzXtvjMp 71kwYdpYH0bju5nuKE54bf8CAJtcny9sV/m5oo9it0P5H+6E2gbZCNKaGkC72ianTOu0 vSknEieXrbHUq+5eEmtXV0XhH5fMiUAIKEl9qOMGSIYtZ0+BuMKYZ9nID70pZywA/9ay P9aBb1AJCzdOoJArjS+idr5VjfIaDCOXTJXDlni+jbuN/bE0OxytgAhp3qGN8m+fFcRY GbDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700586104; x=1701190904; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1YD03QKKEPn3F/nyCMME8e6mD0gTybB0cJQXrZ2TUKo=; b=nkcgiUg6fDyDNYZWVuZOJLYzlPvctV+g7SGMjXFMkqC1JB/A7ejXBF0ddgZwQC6taf hUk6EjEjOgHgVlZfFY+RkarVm1k7I4gXW5RTO9OS8fVn5ggWLdzbLXL5OncXt5zYTaEY TU99EVMadwN4sP+LbbBKPUDwzMUM+MahBiDzrNz3j32KJydvc7TRQ23Tk7Fm9P3SqOND +YooezD1km4MQ4u7emZv3CVQZohW+8XFz5/gosrIDuCnYma2QTqyrn5MPFR7B/Rx3WEr ZkkQQ4NRE5xvdh1HRAb8S6dSyofwpareGP7JyhTp6cD05yWrUURj48o+z+qEVeaJ/zxS 4ZzQ== X-Gm-Message-State: AOJu0Yz71SWU4LYAaohd3XiyX536gdl4QwWDqTqBz0rOEwRq3KreLwTP SxZoDj9L3h71vIR1ARfFV+/XUA== X-Google-Smtp-Source: AGHT+IHPGOGv2uv6VrYMR81SBD0dy2tGC2emCwve7UObraRVnKL036aVCqT32b3f6fF44QkodK7UZg== X-Received: by 2002:a17:902:650a:b0:1cf:7439:690c with SMTP id b10-20020a170902650a00b001cf7439690cmr1436713plk.11.1700586104226; Tue, 21 Nov 2023 09:01:44 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id r8-20020a170902be0800b001c613b4aa33sm8076968pls.287.2023.11.21.09.01.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 09:01:43 -0800 (PST) Date: Tue, 21 Nov 2023 09:01:41 -0800 From: Stephen Hemminger To: Hemant Agrawal Cc: "dev@dpdk.org" , Sachin Saxena , Gagandeep Singh Subject: Re: [PATCH v4 10/10] common/dpaxx: remove zero length array Message-ID: <20231121090141.7f1333ab@hermes.local> In-Reply-To: <20231121084641.39e7b39b@hermes.local> 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-Transfer-Encoding: 7bit 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, 21 Nov 2023 08:46:41 -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. [2155/2868] Compiling C object drivers..._jr.a.p/crypto_caam_jr_caam_jr_uio.c.o In file included from ../drivers/crypto/caam_jr/caam_jr_uio.c:23: ../drivers/crypto/caam_jr/caam_jr_pvt.h:139:25: warning: field 'encap_pdb' with variable sized type 'struct ipsec_encap_pdb' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end] struct ipsec_encap_pdb encap_pdb; ^ 1 warning generated. [2160/2868] Compiling C object drivers...m_jr.a.p/crypto_caam_jr_caam_jr_hw.c.o In file included from ../drivers/crypto/caam_jr/caam_jr_hw.c:16: ../drivers/crypto/caam_jr/caam_jr_pvt.h:139:25: warning: field 'encap_pdb' with variable sized type 'struct ipsec_encap_pdb' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end] struct ipsec_encap_pdb encap_pdb; ^ 1 warning generated. [2174/2868] Compiling C object drivers....p/crypto_dpaa_sec_dpaa_sec_raw_dp.c.o In file included from ../drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c:17: ../drivers/crypto/dpaa_sec/dpaa_sec.h:190:27: warning: field 'encap_pdb' with variable sized type 'struct ipsec_encap_pdb' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end] struct ipsec_encap_pdb encap_pdb; ^ 1 warning generated. [2176/2868] Compiling C object drivers...caam_jr.a.p/crypto_caam_jr_caam_jr.c.o In file included from ../drivers/crypto/caam_jr/caam_jr.c:23: ../drivers/crypto/caam_jr/caam_jr_pvt.h:139:25: warning: field 'encap_pdb' with variable sized type 'struct ipsec_encap_pdb' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end] struct ipsec_encap_pdb encap_pdb; ^ 1 warning generated. [2246/2868] Compiling C object drivers...a_sec.a.p/crypto_dpaa_sec_dpaa_sec.c.o In file included from ../drivers/crypto/dpaa_sec/dpaa_sec.c:43: ../drivers/crypto/dpaa_sec/dpaa_sec.h:190:27: warning: field 'encap_pdb' with variable sized type 'struct ipsec_encap_pdb' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end] struct ipsec_encap_pdb encap_pdb; ^ 1 warning generated.