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 2BEA2423CA; Fri, 13 Jan 2023 22:52:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D4B7F42E2F; Fri, 13 Jan 2023 22:52:13 +0100 (CET) Received: from mail-pg1-f176.google.com (mail-pg1-f176.google.com [209.85.215.176]) by mails.dpdk.org (Postfix) with ESMTP id 145F242E25 for ; Fri, 13 Jan 2023 22:52:12 +0100 (CET) Received: by mail-pg1-f176.google.com with SMTP id h192so15866294pgc.7 for ; Fri, 13 Jan 2023 13:52:12 -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:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7vRVdshBMGNkzxrXgvyPEi91mCzGvM0MmjHBxac82go=; b=1ut9iB9fQY8PdIFdOj6mkoI2/X/lv6lP5VL9kcBhdjMZbMQvNQWZGXBPCKhBPwrumL r2wTNG+hQaP7oYmOMMlZ2p/wgo0eZKyeZYd1Oi8hUWooNpKflKLnGpFxVRPw9YaWNnbu kPU/+L8ECjOorE0gGyloAYg25x4cLQvGODf1S1XuZsyedLOl72FWhhCQJGoAwxusAuUc acdtmWahoZXP6ehiP0pEUluUeZdI7Ez7X+/a2ilS5y5SQD6uHZf9d/7wIPGNNdHk2KpO iN3cdgvf3l+2iZR1cXOR5jrKQ2BaDUecQzXlMVaQmVd3kHI8qVFX6Ugg8GRJofHPJ5M7 X2jQ== 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:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7vRVdshBMGNkzxrXgvyPEi91mCzGvM0MmjHBxac82go=; b=2xOk1Ps2WHdHN/f8MViMkcno4Rec2CNkEpI5FEFllQlrmoRt2nVfaXSN44e6nvhc2V 5nMAKx39TAoEds+yZWnYZsdW0I5UEc+aErI19AQLVMx+fYlhi0yYz6VFSCP+WkSbW7o8 lYsefHnMo/Bf3C0mAhCX+pO9CqLQlhtP2zKnmWCK1LgTuXydBp0MJ6XU83hwmyUFrhOF frCOPA9x9cmC9cs0nYgXiOd02Kn3YvmWrQAdfOZSL6ElSXpXsnTWk2tZtb9Hwu95DDDD guF4Mvuh3+Hsy6TgYUiIwr7ktn5SUUd2cfR+p9FX80djNtA07z1Oh4QCcaCiQeMdD/kK NjwA== X-Gm-Message-State: AFqh2kpqeRMZ+ipCpzvuGzcP7A4xbbdgNAIVxYCT8RH0Ml/O8U/TDHP/ RT91RfHbwJr4PI4k4QfcDOiUxTAMMt6wkasg9RY= X-Google-Smtp-Source: AMrXdXs4SIStuxLie8LdyONe5u3rgewKHfvQp6wj7D5zqpkPiJoyMp6a8xSoVWQOLxlw52810RY2PA== X-Received: by 2002:aa7:8f8e:0:b0:581:c0ee:3a5e with SMTP id t14-20020aa78f8e000000b00581c0ee3a5emr51217259pfs.20.1673646730888; Fri, 13 Jan 2023 13:52:10 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id m190-20020a6258c7000000b005821c109cebsm9543995pfb.199.2023.01.13.13.52.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Jan 2023 13:52:10 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Matan Azrad , Viacheslav Ovsiienko Subject: [PATCH 4/7] mlx5: replace zero length array with flex array Date: Fri, 13 Jan 2023 13:52:02 -0800 Message-Id: <20230113215205.125767-5-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230113215205.125767-1-stephen@networkplumber.org> References: <20230113215205.125767-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 Zero length arrays are GNU extension. Replace with standard flex array. Signed-off-by: Stephen Hemminger --- drivers/net/mlx5/mlx5.h | 4 ++-- drivers/net/mlx5/mlx5_flow.h | 2 +- drivers/net/mlx5/mlx5_tx.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index 31982002ee9b..2b295f9ba037 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -1273,7 +1273,7 @@ struct mlx5_aso_ct_pool { }; struct mlx5_aso_sq *sq; /* Async ASO SQ. */ struct mlx5_aso_sq *shared_sq; /* Shared ASO SQ. */ - struct mlx5_aso_ct_action actions[0]; + struct mlx5_aso_ct_action actions[]; /* CT action structures bulk. */ }; @@ -1290,7 +1290,7 @@ struct mlx5_aso_ct_pools_mng { rte_spinlock_t ct_sl; /* The ASO CT free list lock. */ rte_rwlock_t resize_rwl; /* The ASO CT pool resize lock. */ struct aso_ct_list free_cts; /* Free ASO CT objects list. */ - struct mlx5_aso_sq aso_sqs[0]; /* ASO queue objects. */ + struct mlx5_aso_sq aso_sqs[]; /* ASO queue objects. */ }; #ifdef PEDANTIC diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h index 1f57ecd6e1c1..e12efab211d2 100644 --- a/drivers/net/mlx5/mlx5_flow.h +++ b/drivers/net/mlx5/mlx5_flow.h @@ -1149,7 +1149,7 @@ struct rte_flow_hw { uint32_t age_idx; cnt_id_t cnt_id; uint32_t mtr_id; - uint8_t rule[0]; /* HWS layer data struct. */ + uint8_t rule[]; /* HWS layer data struct. */ } __rte_packed; #ifdef PEDANTIC diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h index a44050a1cec3..d026e8126a75 100644 --- a/drivers/net/mlx5/mlx5_tx.h +++ b/drivers/net/mlx5/mlx5_tx.h @@ -166,7 +166,7 @@ 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; -- 2.39.0