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 D10264338D; Tue, 21 Nov 2023 11:50:04 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 60DE140298; Tue, 21 Nov 2023 11:50:04 +0100 (CET) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2042.outbound.protection.outlook.com [40.107.20.42]) by mails.dpdk.org (Postfix) with ESMTP id E028C4025F for ; Tue, 21 Nov 2023 11:50:02 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j0rmDvDloazNtN2IeUItPn5vhYCQOdMOCIdRR2QcQeJ+gB92CQFHbu4osYf7i8yWQXwYQFFuSwrbhhUvhfMOsMqGztGdSALz6DD+ufC3EpelBNxcvYnP+jMjYO6kSmKAuL1LFqi5BGS/DwLQI+S6ci8Q0IZQN8DRWpnT80xQbYYaLKkHuLtYqp/wOWyXLU0ZWtunBLs1kouO41PY+hLa6wIWWhleRK6MNcruCv5DtfEyM0fhxTlAQQuW4RZ+kefoQYv0h81d/dHD3hqGMQ8fyx9+npS2+LIW5Ul1ZPs/WnC0yEmSsCFNMWMrXZGAxlSS70fGaLGw8yKGjH6JhCDOlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=k8cfdZWfglxxe7oh6GG5Uu5djsZQhBYsBGL5y4p9e1Y=; b=SCgttod3Fc8aD+7xctX2rX005zU4mnsbljUJQot8CXTqmLhg6HkHLFauKS5lPszOgPl1h51srhfXo0/6Z7JKpaiLLnLpiUzIEA4zVgITJhlXX8k/L7d3LLfqYtW2+nW5b+cf0fDmJHEgVmZ+TpOSh68KPVi/8fpfjeYHq2W4JCBnXcRgYLjL/i0H6lW8Rh56C63ZWKZwPfppeS663MRvMrOGicNvLyazSA5xRZKrL+FBQN9JNbBdLfOYVkpgoY3rtXOO4b2/ctP7wVlWxZwPOf8c/QgCj0/U2Br3MlmblLXs6kCLMd7Ca8ElS2QGu8qWSt2I/Ln1lJy+en/7qUKClw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=k8cfdZWfglxxe7oh6GG5Uu5djsZQhBYsBGL5y4p9e1Y=; b=GyE5fn9oVyxbau7jSKBbii4UIlJ5HjDNLYqWko+XBIw3h+l9IjGpWhsYDcA1ajKHZF+srCL4WLTtO2l+XMKp5Q52V1qWO4kc7DQj8X5dnrUW1BDBuI5SJN+5cG/QWAmMJKiajG5JUkMS064wSKP1Ak2wsZewXvHFt7yRHicDUQg= Received: from PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) by DBAPR04MB7333.eurprd04.prod.outlook.com (2603:10a6:10:1b2::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.17; Tue, 21 Nov 2023 10:49:59 +0000 Received: from PAXPR04MB9328.eurprd04.prod.outlook.com ([fe80::99b2:221d:bdda:3d6f]) by PAXPR04MB9328.eurprd04.prod.outlook.com ([fe80::99b2:221d:bdda:3d6f%5]) with mapi id 15.20.7025.017; Tue, 21 Nov 2023 10:49:59 +0000 From: Hemant Agrawal To: Stephen Hemminger , "dev@dpdk.org" CC: Sachin Saxena , Gagandeep Singh Subject: RE: [PATCH v4 10/10] common/dpaxx: remove zero length array Thread-Topic: [PATCH v4 10/10] common/dpaxx: remove zero length array Thread-Index: AQHaG9RoX5hiMbAg/Uq1yUqincr6HLCEmQJg Date: Tue, 21 Nov 2023 10:49:59 +0000 Message-ID: References: <20230113215205.125767-1-stephen@networkplumber.org> <20231120170942.197172-1-stephen@networkplumber.org> <20231120170942.197172-11-stephen@networkplumber.org> In-Reply-To: <20231120170942.197172-11-stephen@networkplumber.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PAXPR04MB9328:EE_|DBAPR04MB7333:EE_ x-ms-office365-filtering-correlation-id: 174cf815-8cb5-404f-39af-08dbea7f9b97 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 6oOEIHj5cejUMNEyuM89V3g5m5dLAFdTuWwMR8KT451LN4fSeAhkNXyN9dz2LKxpW7qQrxwoqPMb6wiqbm99AOVa8AYu1zIy0ol6J0hUxV6PZHkzrGZrDZQGS8ebhyiUMBFzsIPWcQpGHrvAR+OZak6nvUMlK6K3Oh/nGRqYx7IqAkFCwpJ1P3EyM6yJGZKeHjI2EIekBsrR8VoQX21SYl1++kxagfXCvn6qHdnvAANp2uHN+KCeVwtOI8vsyJyzo4hEcksQ1r0tZTCFaji+u/XSUAmfxF4VgdZ5/tHBB3Vh49B37gcIQmbzE7LTjdyjUapr0mcj2CLIk2/PXgf8Btl6DX96eM5M0DBIk5a3GGsnMQqz6oi3dQF6zbVHUodvd3NOPSoAcQTdtpdFfalvsZNqI+5VYCefsucH7XTZSkUs5Wi/qln8T2TVlM3a63LjFOB2Cn5/orrepWUE6lH8Te/yNbALZXeHfeBB9RUE+cxnafTKyaD/YM72RWohQBi+BpVtyOzLK36W6y/eYeBvOK2eQqzUeff7pGpNoa5DJVP4YAzIhtvzZhmjEOrXvokaEhKpbhtma3CdX0l2utMSAGmMGb3LfAws3/0HYbAEIsjjyyLSRnQX+5xaJjeQah/f x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR04MB9328.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376002)(39860400002)(366004)(136003)(396003)(346002)(230922051799003)(186009)(64100799003)(1800799012)(451199024)(7696005)(83380400001)(71200400001)(9686003)(478600001)(6506007)(38070700009)(66946007)(76116006)(110136005)(122000001)(54906003)(64756008)(66446008)(66476007)(66556008)(316002)(38100700002)(8936002)(4326008)(8676002)(55236004)(26005)(55016003)(44832011)(86362001)(5660300002)(33656002)(41300700001)(52536014)(2906002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?WpJgfN+WIDuGsephUIf2OCWPYUejfnlAJOpiI5O0PkxllxsR//+fAuZVT2Pt?= =?us-ascii?Q?7CgRRgiL9MuEdJagOuX7YTsJq2LoUoyJjikongycfmoIA3UQRYxSyNEGcSgv?= =?us-ascii?Q?JCEGCM3KntctNxcEDE8Ue5nWkR9BJfq8/ekKrVu2CeFK0WJsGiDj+b5WMlmn?= =?us-ascii?Q?HgV4+ntMhmyDupPESUV+5VcJ1pzQcVSbXYa9p5YGqxJOKecS+itl7eER70aR?= =?us-ascii?Q?wmOM7zTCIpiGyyMM3BsdnaWLj1oj6iMZ2yEUzdSbzEo15Xl/7wQ5NcPAj2nN?= =?us-ascii?Q?a/mS79adi+dXhwq/WBOBPvmvjRcpn/KOYi0A3Ov8tECk3s0wvyb4+yrRAiP0?= =?us-ascii?Q?B/bNq8Oipyo14ZYP2wELeDBBvBW/7KfwzviMMWl18IolAS+ynsnkPtn8r1T1?= =?us-ascii?Q?V42+GRr1otap26yJULTbieM+dsXgyY9Dvlutdip65gBRdfwi0DudxG8b3vdO?= =?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sJ/ptFds1qnSEfc1h3Pv84km1g07TPx?= =?us-ascii?Q?uuo/rf5uBiDmLeWfKSA7DK08TPiR+29USQBFrMm/aAfsEjeDqOByNkZ3xPBG?= =?us-ascii?Q?4usOBUQ6K+GMqEJTZk8kxIgZKiyKwL5bwhbGMu1W3BGYqyhxGF34c5pXTJam?= =?us-ascii?Q?FT+hJWbYWEsUEbzYx3B3Rh7lBGT3ptR8guW5yOERDnTO2ooLQCAt12RHswCx?= =?us-ascii?Q?b2OryOfXcfbZqM+8fkwFSeWyw2HRxpC1T03AnH/2?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9328.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 174cf815-8cb5-404f-39af-08dbea7f9b97 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Nov 2023 10:49:59.4653 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 0oFXYiX9zY18f/Lqa+HtuRWNmGDILF5BgrFVLPUFKg8bJzGpUOI2XyMp5UJOMdMqPm9XueNQpklzwGhApE/s5w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7333 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. >=20 > Signed-off-by: Stephen Hemminger > --- > drivers/common/dpaax/caamflib/desc/ipsec.h | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) >=20 > 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]; [Hemant] This should be replaced with=20 uint8_t ip_hdr[]; > }; >=20 > 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 =3D 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); > + [Hemant] Don't remove it. It will break the code. > SET_LABEL(p, hdr); > pkeyjmp =3D 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 =3D 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); > + [Hemant] Don't remove it > SET_LABEL(p, hdr); > pkeyjump =3D JUMP(p, keyjump, LOCAL_JUMP, ALL_TRUE, SHRD | > SELF); > /* > -- > 2.42.0