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 B991E439A7; Tue, 23 Jan 2024 12:19:00 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3983840DDB; Tue, 23 Jan 2024 12:19:00 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2053.outbound.protection.outlook.com [40.107.237.53]) by mails.dpdk.org (Postfix) with ESMTP id 41632402B0 for ; Tue, 23 Jan 2024 12:18:58 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C5eA3E7PknDOYRmnzwOGeeAkr2hiwMpViuxmR2h65n8lGy8+Kn/dhrhK3t7or5YqldfXZRIGRn0JKl+ABWsXvk6nxxMebOuUM9fNaHlqr690JCWcnRaR2XCJVILtgTp9q/8PQdFClkNrXiYvAkXFiI755tvnn3jHkMisFMLHDVOYScDZhwjmNaaQIsOf8Iyo59fwJPjJKk3HhD/FPtp+27igSz3Th4awti3i9hNDhszkxj92W99uKi6o2YGdZCVZNJkBTXNxh/zmWyLcblmCVWEDbTUqmFtRst3EbON4+2pBmxD/zcVbkeHCt3/DsTfhM9aqLo0V1RLCkj9yQPvxnA== 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=XBc0OCcrWEmMFH4g+4P3VAPwlRPzVixUqr7G3DmDQ7I=; b=VdmtaVMJeFOnDA5JP21PysWzp4m4bxqx3a7MMCGKTAMHUF/QBMHH6iY3ExtCGwGJl+ZdVnEfTgPPaOduV9JpWAkPxWhwUGW7j9KuKAGx72dUCORGDsgyMP+mgRFZVNbAq6gltKkx5dk0ZfuDIjBj1iRS3Fm1XafvGiuGPMFmue47L9BtxVIlzvaDdrphJHn0pSVBUnGyV0il6QIRD5A3MSP83jbpdNVYojY4o0UmVC+T6P2ya0fi48rr8yuR5+msE/kVlC/299Rmrl/pMurqpMhIQVvwBc5wVFRKmIzkNQbcsRLCPw1/4Shq+zuvBsPaXCXIGhNVeUVmO1avk4c4gA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XBc0OCcrWEmMFH4g+4P3VAPwlRPzVixUqr7G3DmDQ7I=; b=gw9t/W/EXwBOhGF2uHZa7L489JCfPjfElgoe26/xworpiUBq3ou9dBoRrUGtHpftrDgzK2tBkpyIbbrQZsiNBtrSwVo0p9mT8wTn3dh0grLadExAvX1/H6RH7WNQCy4CySJCcL5LdTaU5s952oKETjppSduTENdeimNajK12Od3wh/681NqwGgvW2gqWv6nnFdzmWSo+fAV+FeLkH32cQ1Yt+4I8PYNnPTGYhtAxK/MuCcrDEHPgPuqeO/BVoQNGQNLgggJPoSzL2K2YounWIkh3rlX3UCnvkml1sx38OMluOx2DajfWopiXH4Bxnz/an/Yy9q8mCql6yOq//LOZsg== Received: from IA1PR12MB8311.namprd12.prod.outlook.com (2603:10b6:208:3fa::12) by CH3PR12MB7545.namprd12.prod.outlook.com (2603:10b6:610:146::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.37; Tue, 23 Jan 2024 11:18:55 +0000 Received: from IA1PR12MB8311.namprd12.prod.outlook.com ([fe80::708b:e498:d9c4:94]) by IA1PR12MB8311.namprd12.prod.outlook.com ([fe80::708b:e498:d9c4:94%4]) with mapi id 15.20.7202.031; Tue, 23 Jan 2024 11:18:55 +0000 From: Dariusz Sosnowski To: "NBU-Contact-Thomas Monjalon (EXTERNAL)" , Stephen Hemminger CC: "dev@dpdk.org" , Tyler Retzlaff , Slava Ovsiienko , Ori Kam , Suanming Mou , Matan Azrad Subject: RE: [PATCH v5 07/10] net/mlx5: replace zero length array with flex array Thread-Topic: [PATCH v5 07/10] net/mlx5: replace zero length array with flex array Thread-Index: AQHaIm25hHYWXFAqLUujhN3nB7+LprDnfIsAgAAMZQCAAAN7sA== Date: Tue, 23 Jan 2024 11:18:55 +0000 Message-ID: References: <20230113215205.125767-1-stephen@networkplumber.org> <20231129024221.57653-8-stephen@networkplumber.org> <1758963.QkHrqEjB74@thomas> <2240162.72vocr9iq0@thomas> In-Reply-To: <2240162.72vocr9iq0@thomas> 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=nvidia.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: IA1PR12MB8311:EE_|CH3PR12MB7545:EE_ x-ms-office365-filtering-correlation-id: 9fbd3bdc-2892-4ffa-a54c-08dc1c05165a x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: uFQ5MnsKjAhTTJegejdbgXqGBYKVWPEzwwYypkMTfW6+Aeumsh8r6d94ycj0hFbuU3Jot6MVhpKaInz+lLHUugzrAm6TZyZu6GyaxuPe3qDL39488J5VthsKM/2ZaAsFo5ltMw1hRnedGu9+RiJJOjIKLtmkwasfs86IITUXQ/GCwR7WikZGmwnbnkGvSbBTsICS/cSlYR+hcododxFk93OLOf2eSXk/W5IkZ8i7Gd2AfTR0Vu0zv8WM3zaaBVqnWvdphhb9SESNcfus4vDqKG9XJjX1xIUIA/Vi94Gim62cPRPZ9FgNpfgV0/RJ+rFLoq/Wee70OVygF9CijgucHhhHPkbl/IkdTii6tO7LEJaNzh6o5xhukyAlY3CEP5QG6o0co3vbElw6py6Xf+pN074jHmIn+TT4YVmEuNf38lqUVihWtu8JuLp8T8X4Gn/TBT/U/8LlrqSdhC1CugfWXHg2DmCRTFm48/dYDQ/Gky6tX/UhRZFaOybYpPoav7NuJFsGtWhj+jAQxLpeSkFSLzqufBicB7UlOS1yC1030o1I180toNNJUz9BiUNIaoiCf9gBpYBTXGzBNrmfZatkCK/SQ/qTMjbGAlOPv7OafV+5aaqaaKNhAfDysLcKM/Ge x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:IA1PR12MB8311.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366004)(39860400002)(136003)(346002)(376002)(396003)(230922051799003)(64100799003)(451199024)(1800799012)(186009)(26005)(107886003)(9686003)(6506007)(7696005)(71200400001)(55236004)(5660300002)(41300700001)(2906002)(52536014)(478600001)(316002)(76116006)(66556008)(4326008)(8936002)(110136005)(66476007)(66446008)(54906003)(64756008)(8676002)(66946007)(33656002)(86362001)(38100700002)(122000001)(38070700009)(55016003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?mcSn7mWj4es/uoRK1NluWbFL7rDP+ul2TdYAIBR1NouBmIZQV1ypzm2BTrJ2?= =?us-ascii?Q?s4WOQ4FSl5blsdTCChxDRwf/uaZ8fUC/yVs1aCm5WBXSLNn1AMAtulWLuj10?= =?us-ascii?Q?eNpSS9T8w/G1Ow35jeJ4OSwLASfWXLl5wYvnCwOUBm6E2pPp5o4YVcQFm0fk?= =?us-ascii?Q?DnPuOtHOFNWNyiiWak0ELg9KQSm3GMfUxm/w+yzAjUlLAue+JnPIHEbYAzTs?= =?us-ascii?Q?uNPaHDVkX2Z1HAJ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ascii?Q?mNTmIeiTTBCvAd2AT6WjOpWOkA9wJiaw7eTYaknyoRyMYppeCxNxF4Mj5epe?= =?us-ascii?Q?C6GsYNkaVK2ofsjj320TuTJLGeL8O1SEJ2rn/hPACpiv1BrCp9X8gcXuMsjW?= =?us-ascii?Q?2IXzTPKcV1wx5OV33zRMnVdCo5uwCizoaJW1lDyokkJ/rhiRkc9twAG3qyQQ?= =?us-ascii?Q?O0PQo9gswL1xaj+088rfq8QvFquthKtvCnZtRd2wJ1hcATVIi7x64wYYOJeO?= =?us-ascii?Q?CDDQhnNf5Xlg5GyrM76SR+f1F4Dvvmm01qTfJvcJ/3Kz0ihRScAXbx5Nn9YU?= =?us-ascii?Q?HySgkKXpDeVyvop68XjTWOp5yF4x1IzBkjg4dZ3DDhjtbd32rG8yv6/ybCrS?= =?us-ascii?Q?arIku0wSxWQXHf4yfnS7Os135nUh51uIGHJt59XIS2t4F5OED6I1a1CzcBZh?= =?us-ascii?Q?pEhP+oubCEbU26UuGS31cKA2Joxw0Efc+TMmASek?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: IA1PR12MB8311.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9fbd3bdc-2892-4ffa-a54c-08dc1c05165a X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Jan 2024 11:18:55.4966 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: xxI1srroNFRkY2y6SXsax8ES8Y4ngdTln5T6fyYxXkGi3k6zU8ApWIwaLszbED9rv71/6x36JDY4KACGT8tN9g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB7545 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 From: Thomas Monjalon Sent: Tuesday, January 23, 2024 11:28 > 23/01/2024 10:44, Thomas Monjalon: > > 29/11/2023 03:39, Stephen Hemminger: > > > --- a/drivers/net/mlx5/mlx5_tx.h > > > +++ b/drivers/net/mlx5/mlx5_tx.h > > > @@ -171,11 +171,12 @@ struct mlx5_txq_data { > > > struct mlx5_txq_stats stats; /* TX queue counters. */ > > > struct mlx5_txq_stats stats_reset; /* stats on last reset. */ > > > struct mlx5_uar_data uar_data; > > > - struct rte_mbuf *elts[0]; > > > + struct rte_mbuf *elts[]; > > > /* Storage for queued packets, must be the last field. */ } > > > __rte_cache_aligned; > > > > > > /* TX queue control descriptor. */ > > > +__extension__ > > > struct mlx5_txq_ctrl { > > > > struct mlx5_txq_data is included at the end of struct mlx5_txq_ctrl I > > don't understand why we need to declare an extension here. >=20 > If I remove __extension__: > error: invalid use of structure with flexible array member [-Werror=3Dped= antic] >=20 > Is it a problem only in pedantic mode? Yes, because this usage is nonstandard. Using a struct which has a flexible= array member, inside another struct is a compiler extension. Best regards, Dariusz Sosnowski