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 3DAD74339F; Thu, 23 Nov 2023 02:43:22 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D185F402BD; Thu, 23 Nov 2023 02:43:21 +0100 (CET) Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by mails.dpdk.org (Postfix) with ESMTP id 086F140041 for ; Thu, 23 Nov 2023 02:43:20 +0100 (CET) Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-6c4d06b6ddaso380986b3a.3 for ; Wed, 22 Nov 2023 17:43:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1700703799; x=1701308599; 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=5/ge5KsUtgQI9eI3Jbah57135NpM1sX1Uhel1pRDoUA=; b=wPiTIrEVEiWUR/Jo8iN8kFZzN6iiG3A4Eh2nZJrnnwQqk9Mmpv+73jq79SbU/ZeaoC P9QcCSmpjP52BWR4L4LqNHrwrPkd3iZCoSOvA2qWbf2srG7isTRmFgU1uXYGrRYOPr2J 2tT1MiYY2d9bUW4I5ACpz4ETQNZ4eCL5fDeg+3cRGLVdDTt3xDTBk0cPl+uHN3Gn4SSy NqoAjcG52GKHOAL5pG8Bb2LXfC7H8mAOFPAXSQxE9LF1hXYtjoS7+yGISz/FjBSnA/3c U86tWj5IWgSFbpKXd4V4vYUbTqX1NvTxcSzRKb8J0TmORI3UbpYuDSww6odPsNGlHGuq tYmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700703799; x=1701308599; 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=5/ge5KsUtgQI9eI3Jbah57135NpM1sX1Uhel1pRDoUA=; b=e6lK0k2GGcAbJPevFNzpecHiHmLn9HubuZ9hNT0n9CjYHAU9ciju2y1Xzb0jQgmNr9 JNOw3xWdY4bH6/t1k5QKf1SaEf81DpJ+SjEYeC+UOeHJb2qCqxTqb9N1tOEl8RqcPe6v u5SIajNBO9C31G+j2z9X+EhZGV6Pf7hCfp8vktTz8X1fm79+mOMScVt/tXGTW/lITGgR eF3wPIOtOJg3nUkusSxmqziydfegBWjEiWtdtmcFqm4lDnPv/nX9Dn0AkqpFQFTOVvV6 YhHaETL0yAEiXoefbm04prOhVBRqxiFgl7iH0JIQYqPAlyZsn4yHPTEHzt3CLN6a5kEf 3RwQ== X-Gm-Message-State: AOJu0YwvVOTVprqB0KkMMMKTtdMiaLSV9VS8sJtyOmEP50ngrxVmTJ9L fKjIhnTLZQe+TXri4KQfGXUIkE7v6eejhiN/kpM= X-Google-Smtp-Source: AGHT+IGYkfx27hewL60Eap8b8lWEti/fh375LgG2G1oDjhC3CQidgCWh3vlem/ynOWlpzu2Z4GiMuA== X-Received: by 2002:a05:6a00:234b:b0:6cb:67c3:9c6d with SMTP id j11-20020a056a00234b00b006cb67c39c6dmr4513059pfj.25.1700703799125; Wed, 22 Nov 2023 17:43:19 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id fh31-20020a056a00391f00b006cb98a269f1sm117970pfb.125.2023.11.22.17.43.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 17:43:18 -0800 (PST) Date: Wed, 22 Nov 2023 17:43:17 -0800 From: Stephen Hemminger To: Hemant Agrawal Cc: Tyler Retzlaff , "dev@dpdk.org" , Sachin Saxena , Gagandeep Singh Subject: Re: [PATCH v4 10/10] common/dpaxx: remove zero length array Message-ID: <20231122174317.6bb28172@hermes.local> In-Reply-To: References: <20230113215205.125767-1-stephen@networkplumber.org> <20231120170942.197172-1-stephen@networkplumber.org> <20231120170942.197172-11-stephen@networkplumber.org> <20231121084641.39e7b39b@hermes.local> <20231121171837.GA7518@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> 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 Wed, 22 Nov 2023 07:23:36 +0000 Hemant Agrawal wrote: > > -----Original Message----- > > From: Tyler Retzlaff > > Sent: Tuesday, November 21, 2023 10:49 PM > > 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 > > Importance: High > > > > 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? > > It is being used indirectly, e.g. dpaa_sec.h usages it for ip address description preparation for the hardware. > > struct ipsec_encap_pdb encap_pdb; > union { > struct ip ip4_hdr; > struct rte_ipv6_hdr ip6_hdr; > }; > > We need to change it, however in the interim, I will like to add "-Wno-gnu-variable-sized-type-not-at-end" for both caam_jr and dpaa_sec to avoid this warning. Ok, there are several ways to fix that. Driver specific compiler flags are the one that is least favored.