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 102C541DF5; Mon, 6 Mar 2023 14:29:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9B3E640E50; Mon, 6 Mar 2023 14:29:40 +0100 (CET) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2046.outbound.protection.outlook.com [40.107.212.46]) by mails.dpdk.org (Postfix) with ESMTP id EDEEC40A8A for ; Mon, 6 Mar 2023 14:29:38 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bm2IYlwD3BsBZ3H3a94t24ffdneE6hqL3d4zYEwGGl9+TfAAEKVPJbU27DU7fZiLwWUr+OcQ6famwR3LvkaZVJe456gu3A0FDDhQOy3syXrB/nuLRU2PpgH5J1C864rHDL4hoyDuVpUxT3E4RAufmlk1x0bQq+TOG9gKm5Rs7k1A9DqjM43JUBL7NqloUsnQUBZUJKSkkcwIrVPncRldloUCQhFr7LjbGQAjApPOx2T+Fu+rrV8kkNzkbNPWK7XGZCbDOwRwnnCIYeu+qsRHANntUhDwvGP9C8SZQBNigl3be/kyOZNDlFJc3vu03js5rJEbwi/lvCaAMZjEPa2FmA== 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=umsijds9eP4d/4fdU6Nbjc3iAMIqsUyy/iVT4ACi/Ww=; b=KuC0qSzqzoKtDrKhC5OauNDIahkmy6PphTbBYX6giY9QKqDCa/PqJFKLLAqKjEEJm1hA5kHncNzK7Iw+ILAZgw/F8+cAhiowszkCrhMiU7K+ITa/7wWmZgeILBvYmzmbt+yaOiiWjYz8ho8wPdFD3PsJybcRmrsiNT6VTfa3VuDJF62jNETmF8fOftFThGhiJvzfDiAErgbeHmBEnd3/UhRj6TqcC5aN6ns7Qe27Pki8FUQfkLNiU1LE0R/PoRa5fo/7LdbhgaHBYKPVThK0AivfgDmcq3IMFVSWaYV+KFncIvI0eECE5C2M0vz+lRwoiyHSfpR8vlGOZCGpAXIpxA== 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=umsijds9eP4d/4fdU6Nbjc3iAMIqsUyy/iVT4ACi/Ww=; b=PBrEgZ+k1UBqtzD8lMTcz3Ep420z6UTtXV0aJoog4CAzdSql76tAVC5hSVDhj13agK4S8MqENEn4+wVRaHMQgifNga81Nq+LrLERhQg1ciWnKXxetYxclVvYiuIFSs2yS19Vbh69Uwp7zfeU0cTflDKGjEr9fvPcEfcdu26SWCUtNQHSbM30ClQI/T+zniiZvdWGlFuaeVIqfSeVoS7sgiWcF9syVX2byiYUvi5JJecrjZ8NI5LTSIkhbObkJm9KycYQbZsLogGczgZOvZRRIaZE/ND3y/+Y44Z01e1jH3fLe6A247c1xtguoI5tzEAmlv/ZOeNogqEDkZF8YcZFuA== Received: from DM6PR12MB3753.namprd12.prod.outlook.com (2603:10b6:5:1c7::18) by DM6PR12MB4531.namprd12.prod.outlook.com (2603:10b6:5:2a4::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.28; Mon, 6 Mar 2023 13:29:36 +0000 Received: from DM6PR12MB3753.namprd12.prod.outlook.com ([fe80::2a72:9d50:8f0d:a925]) by DM6PR12MB3753.namprd12.prod.outlook.com ([fe80::2a72:9d50:8f0d:a925%5]) with mapi id 15.20.6156.028; Mon, 6 Mar 2023 13:29:35 +0000 From: Slava Ovsiienko To: Stephen Hemminger , "dev@dpdk.org" CC: Matan Azrad Subject: RE: [PATCH 4/7] mlx5: replace zero length array with flex array Thread-Topic: [PATCH 4/7] mlx5: replace zero length array with flex array Thread-Index: AQHZJ5lLYmw0Qww5ckigHRZTBay8lq6eJm2AgE/o/jA= Date: Mon, 6 Mar 2023 13:29:35 +0000 Message-ID: References: <20230113215205.125767-1-stephen@networkplumber.org> <20230113215205.125767-5-stephen@networkplumber.org> <20230114090825.1d3536a8@hermes.local> In-Reply-To: <20230114090825.1d3536a8@hermes.local> 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: DM6PR12MB3753:EE_|DM6PR12MB4531:EE_ x-ms-office365-filtering-correlation-id: 23d2825c-7fe2-40f7-8dfe-08db1e46d3bb x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: CcfWNoFa6raBwtbi4QLEkTef16b82FfuTAzt3WG3J/NuUOwyiPIV7zGXojuKgd73S0ondS9cxBW0J/bM1Y7+N+yZpFEeNFL+XaSdm4ywrfdKaNeD1uQiMfQpZNuFTZXqvBrbZtq4Lljopq+HpnuusdRc/Cir7SmuxSdSSJEedjxizBMQV5YZ6n+SZ9HcHuSgEjQdt+zXRJWiKKDqI2gsOp0eSfmovnavE+/Pc2ibjWkQtlQkfdYYO7jFyXmPatiWmVxFfSTHBOPApk6rR7D2o/WeUHi8e/CAQ7ehHBdki5I7+lh8C4norsFl7/sP1Fk5d2hFeWVX8ceradfPpAFiz1srEqstPS+AuKsBYpBvYFBlF79M9sCZUWLLrt40aQrhthxAT2VNjYxAvyNJuXuYl5TCd+RpJGh+jWTE+7jANA6ZUUkFfiABoNCytr+cohCTRNnGrOfrDXYyD6wnk6f1UGCixnjSssdC1Tok8VfIpMTsf6ioWQwK0RmB+l3Uf7X5QjD5oeBlUBrXF+OvtvbpplT5mw0Vj4hCxqCTwxadjkqpj94LU4uNjS1N8Prfjmsplo4OYgZjBC3XjIfYsDW9eBs69HxHdi5YiQT8MsODE1LWKT98kiyIMNZGxO6+JTTPhmJSI299NKFdGXVyYhFTjm/YKZ1EMTvnv9khGvAkyD8bZqZKcYZTjIuifi+Qo0vUcW1X9Y1gtpum5KXQlP+UNA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR12MB3753.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(366004)(396003)(136003)(376002)(346002)(39860400002)(451199018)(9686003)(64756008)(186003)(122000001)(38100700002)(38070700005)(52536014)(8936002)(66556008)(66476007)(41300700001)(4326008)(8676002)(66946007)(5660300002)(76116006)(2906002)(26005)(71200400001)(7696005)(478600001)(107886003)(66446008)(53546011)(6506007)(316002)(110136005)(55016003)(86362001)(33656002)(83380400001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?koi8-r?Q?J6mpptm+fU202fV4IC1uDLsvfvntN7X+J0gCP8JOwCcOi8Zb93RI4XRddjvvLX?= =?koi8-r?Q?8bbg27qGfqRxQPm3QhbngI+x4tAFKiFsIL699CZ0kxXkMxoQC2XHFLcydkyLw9?= =?koi8-r?Q?hkZbjugo8mpVxTRHOIpjus2lkxAFcf+c9ISp0dOHUS3gudDSgvUqhZZ+KfIH1S?= =?koi8-r?Q?5iR6yf4dW+ftVLHRX4+pAcM4U1XI5TxPB8lAeR/bQWPJiILyZHgBeCzoQYDAiw?= =?koi8-r?Q?WCEtGRBEkIScejqx960IhsIZC2/qB4F+sziRuGSCdi79zRyKWImDS3AdOg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a4f?= =?koi8-r?Q?NA7hkTX32Z/YX5MiOYY6mDp7foPpGuqThDOhjHarxx6mjLtr5dIGd1aO/kjtYY?= =?koi8-r?Q?HurZMJjRbnFZPau3PFGo3wVCoDK38A8ZOV2mSzbvDKZmSrexGhhiK9Ok15HTvK?= =?koi8-r?Q?MhLEhBme8/CXKkVv6WzUVZxCMcFAY2eoZhrRHfb1+8sZOlw2LtRvlZYn+gwq9i?= =?koi8-r?Q?/AGWkKktk/vrcN5LcRfJYGj7KdqVeeD78/e3456yXbFRqQVPHgBLLMESkzRD2G?= =?koi8-r?Q?C4I80WNgWsWtwtYJr4z1vxyuLSP62Ojl3/l/sBIiCpC0xlukNv7d2fWg6KwwQz?= =?koi8-r?Q?ubPb5/hz/Iq5QTY1DHuPIegHm3Hshw76k7cBzV0zMOUxvKFaYynTpGvTh9/cPD?= =?koi8-r?Q?E5yHuBmDo99J/wtY+1pjsmv6p9iewr4huogB8fe7Bf8kC66Wnw?= Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB3753.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 23d2825c-7fe2-40f7-8dfe-08db1e46d3bb X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Mar 2023 13:29:35.1572 (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: YWtS916c5PKgWerMEBRyad87WkL+EweoHcm+8UHSadxFHfqI6ki3fZrEL7CestvQEe1A0EI/s9YNqfn5u8ammA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4531 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 Hi, Stephen IIUC - for now all of the compilers claimed for DPDK compilation support th= e zero-length-array and we do not have an issue ? We could eliminate this GNU extension and have workaround, like this: /* Verbs headers do not support -pedantic. */ #ifdef PEDANTIC #pragma GCC diagnostic ignored "-Wpedantic" #endif #include #include #ifdef PEDANTIC #pragma GCC diagnostic error "-Wpedantic" #endif I'm not sure this would make code more readable. Should we do this WA? With best regards, Slava > -----Original Message----- > From: Stephen Hemminger > Sent: =D3=D5=C2=C2=CF=D4=C1, 14 =D1=CE=D7=C1=D2=D1 2023 =C7. 19:08 > To: dev@dpdk.org > Cc: Matan Azrad ; Slava Ovsiienko > > Subject: Re: [PATCH 4/7] mlx5: replace zero length array with flex array >=20 > On Fri, 13 Jan 2023 13:52:02 -0800 > Stephen Hemminger wrote: >=20 > > Zero length arrays are GNU extension. Replace with standard flex > > array. > > > > Signed-off-by: Stephen Hemminger > > --- >=20 >=20 > Since Mlx driver enables pedantic checking, this causes build failure on = some > versions of gcc. >=20 > In file included from ../drivers/net/mlx5/mlx5.c:40: > ../drivers/net/mlx5/mlx5_tx.h:187:23: error: invalid use of structure wit= h > flexible array member [-Werror=3Dpedantic] > 187 | struct mlx5_txq_data txq; /* Data path structure. */ > | ^~~ >=20 >=20 > Understand that the driver wants to enable more checking since Nvidia doe= s > good job of keeping the code up to date. But having driver specific compi= ler > flags like this creates more unnecessary complexity and doesn't improve t= he > resulting code.