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 D17EB43381; Mon, 20 Nov 2023 18:11:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8B04F42E6B; Mon, 20 Nov 2023 18:10:08 +0100 (CET) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by mails.dpdk.org (Postfix) with ESMTP id 4FAF242E4A for ; Mon, 20 Nov 2023 18:10:04 +0100 (CET) Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-6b87c1edfd5so3665129b3a.1 for ; Mon, 20 Nov 2023 09:10:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1700500203; x=1701105003; 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=Ew2rz4mjBuGFUWM4YPWUPH7KUB9MO4JRdBs3fFYkYIpOfqIKterEFZXI625l6AWBV9 KzOGl0/o16tf6eNK3ZM6V8Uo/xChYnfyyhrWkkxqXOTLgbok1RGb8tCw/exlkcsHz/Iu IykUI1dNhqaNUvAd+IxJSYqKEEvXcOMVWggGUkol48wJCzBBX95ZkmY9z7GOrB6MTLa+ 9VGjsZxdq3C7jn9MPgpHg/TFVNBwe8ZZWWNYEKHdJw2i5IGAGajzZ17QR1/wmNkY9ol0 A6c6poSpyn4bQ8sJtjo9hDgqRNv3kCOKS/PNs2rABhWANuE6ZalEAk3A6WuqVoeB0N8b s2uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700500203; x=1701105003; 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=IxcYxuZlndQE1ppJX/YcSASMc1iesRNhRgK0gNzsLyOeqyi2h4msqny3aMLawpWWNh 7GiA5I+AWpYbSd8LeDBWgi9oQlRjKNY+nrJDhY0jqQr8rXrrzKk8QDLicInxlU81vYqg ntFJR+UqjgGZ8Cye+rERQCj17qF00GfiEsDkE95uqWASpjtANx6s4KosruC6EBZipbYt 1dju858+OTKyn3ZQ6OYFD3ZDQNcshPam1Zm9k8MZuy5w4bstfY/y+sQw+OkyyKA/QHRL Z67xjacsmmd3PPPRLPoaIcjbOQpZSNs/jA/Nrubax9wJO62vpiEEbsg0iCdMtLqwPDPv N4XA== X-Gm-Message-State: AOJu0Yy4zPE/rIw2BpwP6Ot4vLG6D3OdWrJ+0+Aox9YaNrAUeHmOg4ME IX+u04IZ6FBfBsfCSby6chEnMbVvTSvqhLLed6E= X-Google-Smtp-Source: AGHT+IH73CwPTAnOgdeg/meZVTQiFoGgGBOGooYCtPhZZt6FEIb8q/6ZmC5U+MEwMBPz5tycSh0n4g== X-Received: by 2002:a05:6a00:3a0d:b0:68e:2478:d6c9 with SMTP id fj13-20020a056a003a0d00b0068e2478d6c9mr6014854pfb.2.1700500202939; Mon, 20 Nov 2023 09:10:02 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id p18-20020a62ab12000000b006cb7f9da229sm2894681pff.202.2023.11.20.09.10.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 09:10:02 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Hemant Agrawal , Sachin Saxena Subject: [PATCH v4 10/10] common/dpaxx: remove zero length array Date: Mon, 20 Nov 2023 09:07:05 -0800 Message-ID: <20231120170942.197172-11-stephen@networkplumber.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231120170942.197172-1-stephen@networkplumber.org> References: <20230113215205.125767-1-stephen@networkplumber.org> <20231120170942.197172-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