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 7D4C2423D7; Sat, 14 Jan 2023 18:08:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 21ECA40156; Sat, 14 Jan 2023 18:08:30 +0100 (CET) Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) by mails.dpdk.org (Postfix) with ESMTP id 8F8D540042 for ; Sat, 14 Jan 2023 18:08:28 +0100 (CET) Received: by mail-pg1-f171.google.com with SMTP id h192so16927090pgc.7 for ; Sat, 14 Jan 2023 09:08:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=UACxKf4eMAyKaECbjnyujSXeOohZPoW9zDclhCJyjjg=; b=VdokM3YZvDbIMMFi2uzp0KSxkZS2ptZfjlLdw0AD180d4Bny4OyUjiqlJpWnt+9R8b ekt6TFjPpOVsvGdqmPoc4zX8I9S0y93uBFmA6WpqqgI2hWAEU0mgF3eCw37xn3xvcK6s ljN03K0vSuN+utySAfrVaIjLPYm6h4uKGWTx3jKqlUweSBJK6M4ThNM716HhZr8+p1Pm sO+9jHaK4FcjFt2fN/OZbZzigbbC8/mPS+/79ViNao/nctgCOmJCTCLgpAJRKKDDUvCm 5yW61rh9XiMTk2xCBX6T3zSXfX2p3n56Hr1ht96xfCIXu/XI1oAPXK4z53j4CJEOxmpl MIsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UACxKf4eMAyKaECbjnyujSXeOohZPoW9zDclhCJyjjg=; b=RhZ/Zsz9/U3C6leQQNcqZJlU6xc69DT/esthtQ4yZRIddBAfHtTurpm296CuXDsV09 iFsYuLfoOXIYtj/Gz2R+MN+eZo3L6a0rf6p3bHrraMOnkHzp7oPRzezVo9XV5680XWWl 4fF/2hFJSud2xP3lDR0oe8gzV79+n1pJhv1MOh7Hrg2hPATMDslgvO+ZbgG3vv/VltEU 7PZigvN7elJ6vwZT1nXpGqzCHZ/9vnUGs+MWBmKZjir1f3uJG8jS1z8F3B0NQriecpRd eGON4cbTl6mcRX9VILI9eAnptfaeER5tU19t7KtBsnptVjfFNGmv+guqe5wPmuX6tldQ imTQ== X-Gm-Message-State: AFqh2kreiZDd0pMPJ8biV9f+J5+lNNiUQYvG1hDQ+2RD6xltYwL2wkuD on1c040LR7NwOOeq3NDz7T16hSBvuJHJIAc/FO8= X-Google-Smtp-Source: AMrXdXvqtWN8ItSKFOdaOogUATRKjLLK13ovT7AB1asiLvNhv+QL9SeVO0ud1wxQ+ysgnoQVQ9ZgBg== X-Received: by 2002:aa7:9143:0:b0:580:cfbd:3fd3 with SMTP id 3-20020aa79143000000b00580cfbd3fd3mr78774149pfi.26.1673716107394; Sat, 14 Jan 2023 09:08:27 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id q6-20020aa79606000000b005813f365afcsm6273406pfg.189.2023.01.14.09.08.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Jan 2023 09:08:27 -0800 (PST) Date: Sat, 14 Jan 2023 09:08:25 -0800 From: Stephen Hemminger To: dev@dpdk.org Cc: Matan Azrad , Viacheslav Ovsiienko Subject: Re: [PATCH 4/7] mlx5: replace zero length array with flex array Message-ID: <20230114090825.1d3536a8@hermes.local> In-Reply-To: <20230113215205.125767-5-stephen@networkplumber.org> References: <20230113215205.125767-1-stephen@networkplumber.org> <20230113215205.125767-5-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Fri, 13 Jan 2023 13:52:02 -0800 Stephen Hemminger wrote: > Zero length arrays are GNU extension. Replace with > standard flex array. > > Signed-off-by: Stephen Hemminger > --- Since Mlx driver enables pedantic checking, this causes build failure on some versions of gcc. In file included from ../drivers/net/mlx5/mlx5.c:40: ../drivers/net/mlx5/mlx5_tx.h:187:23: error: invalid use of structure with flexible array member [-Werror=pedantic] 187 | struct mlx5_txq_data txq; /* Data path structure. */ | ^~~ Understand that the driver wants to enable more checking since Nvidia does good job of keeping the code up to date. But having driver specific compiler flags like this creates more unnecessary complexity and doesn't improve the resulting code.