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 C819043355; Fri, 17 Nov 2023 17:22:00 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3C37042D7A; Fri, 17 Nov 2023 17:21:07 +0100 (CET) Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by mails.dpdk.org (Postfix) with ESMTP id A5EBF42C24 for ; Fri, 17 Nov 2023 17:21:00 +0100 (CET) Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-1cc68c1fac2so19594575ad.0 for ; Fri, 17 Nov 2023 08:21:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1700238059; x=1700842859; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=T0fmocB3opu4AXHvVFYLFUGkMS73o4AE8HhZQ111gLM=; b=194nKXYV3dOiSFBxQJmXlJtJK0S1nJbYBCvVqPY+ZkdsEc6mV5vfelBAmvYb20vUIq a5WUHAb/akmydN9DXUhvxcACfT9CPUI1cYOzdcK9vNG5MMok88k6fbGNntkJFl6UTp0q 17AtZ66HfukHJoioWwc2YB88k72/QHI+J/Lf0S8Zmvf4QUe5ChbI3Ki4yrs2s59gj1Gq KoE4AFf6P6DRAH+wb1XijVORmBm0R/PTL5jhWPJMke7saF7NVSDSfdDFq6PQBfgh7Zme cz3/zziQ6G5LT9A4KgryUnz+pa1jGTHVqVoLUhHgA6XbQRqOOIyRSMk5Yv6JQP2//0uY usXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700238059; x=1700842859; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=T0fmocB3opu4AXHvVFYLFUGkMS73o4AE8HhZQ111gLM=; b=Z60F04cb31cHwqX8oE33FDG7h1pXdodzPzCDuoRKrAik+PDBCllCBSnISVV9OqbOUI oM/1WGos+YOHAFk/Zig0F0jcpRBceFiO+VsTIHEioZrp8nqj6+6VNTYzF25aimm5J+wm gJoC/blNxTm2ac3+VEjSdwURNnfA100B2ZkoMlpOlBXNL7JLmDNLXPW3AtplPLYWPYRi 4BYFIR2CAAz2HGaYxew/xUe7fEAqglbI63KckqxBDZSA9YsRANOFB9M4B54PB6HZyA0W /ALi2jxgy6vbKcdsKcbt/JL79jPUNtwRNQQekX+TrWS+CCeO0FFtqOVYHEUUAkLgZ4b8 /81w== X-Gm-Message-State: AOJu0YwZQz7E7ay4IQkXd6RsiwCIYmohVs1ldbKAEl6sKV+Onrfd4bNm 8RlnhZy9Da+xXnvk2En2JKVjs0SCt/yOkHQF+xagpw== X-Google-Smtp-Source: AGHT+IF0Rub++WhLxORTJCbeP8YwcFfoI+0uUZ36RxTKJKFqGraD2xVoRcWsmf4jEb1npf5jLqJJrg== X-Received: by 2002:a17:902:8f93:b0:1ca:72f9:253a with SMTP id z19-20020a1709028f9300b001ca72f9253amr65218plo.23.1700238059523; Fri, 17 Nov 2023 08:20:59 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id q15-20020a17090311cf00b001c61df93afdsm1564759plh.59.2023.11.17.08.20.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 08:20:59 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Hemant Agrawal , Sachin Saxena Subject: [PATCH v3 10/10] common/dpaxx: remove zero length array Date: Fri, 17 Nov 2023 08:18:36 -0800 Message-ID: <20231117162040.241466-11-stephen@networkplumber.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231117162040.241466-1-stephen@networkplumber.org> References: <20231111172153.57461-1-stephen@networkplumber.org> <20231117162040.241466-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 There is a place holder zero length array in this driver. But since the structure is embedded in other structures, it could not have been safely used anyway. There doesn't appear to be any uses of it in the current code. Signed-off-by: Stephen Hemminger --- drivers/common/dpaax/caamflib/desc/ipsec.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/common/dpaax/caamflib/desc/ipsec.h b/drivers/common/dpaax/caamflib/desc/ipsec.h index 95fc3ea5ba3b..9d59b93292f9 100644 --- a/drivers/common/dpaax/caamflib/desc/ipsec.h +++ b/drivers/common/dpaax/caamflib/desc/ipsec.h @@ -336,7 +336,6 @@ struct ipsec_encap_gcm { * @ip_hdr_len: optional IP Header length (in bytes) * reserved - 16b * Opt. IP Hdr Len - 16b - * @ip_hdr: optional IP Header content (only for IPsec legacy mode) */ 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]; }; static inline unsigned int @@ -776,7 +774,7 @@ cnstr_shdsc_ipsec_encap(uint32_t *descbuf, bool ps, bool swap, PROGRAM_SET_36BIT_ADDR(p); phdr = SHR_HDR(p, share, hdr, 0); __rta_copy_ipsec_encap_pdb(p, pdb, cipherdata->algtype); - COPY_DATA(p, pdb->ip_hdr, pdb->ip_hdr_len); + SET_LABEL(p, hdr); pkeyjmp = JUMP(p, keyjmp, LOCAL_JUMP, ALL_TRUE, BOTH|SHRD); if (authdata->keylen) @@ -913,7 +911,7 @@ cnstr_shdsc_ipsec_encap_des_aes_xcbc(uint32_t *descbuf, PROGRAM_CNTXT_INIT(p, descbuf, 0); phdr = SHR_HDR(p, share, hdr, 0); __rta_copy_ipsec_encap_pdb(p, pdb, cipherdata->algtype); - COPY_DATA(p, pdb->ip_hdr, pdb->ip_hdr_len); + SET_LABEL(p, hdr); pkeyjump = JUMP(p, keyjump, LOCAL_JUMP, ALL_TRUE, SHRD | SELF); /* -- 2.42.0