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 23B45433F5; Wed, 29 Nov 2023 03:43:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 02DB642E4B; Wed, 29 Nov 2023 03:42:44 +0100 (CET) Received: from mail-oo1-f52.google.com (mail-oo1-f52.google.com [209.85.161.52]) by mails.dpdk.org (Postfix) with ESMTP id BDF8E42E34 for ; Wed, 29 Nov 2023 03:42:39 +0100 (CET) Received: by mail-oo1-f52.google.com with SMTP id 006d021491bc7-58d9a4e9464so1275367eaf.0 for ; Tue, 28 Nov 2023 18:42:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1701225759; x=1701830559; darn=dpdk.org; 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=kz6jR3luzdfQNhneqUZRKTLzQfZ85YzHOc0mB47rLgs=; b=julYxWtVCyiQ04LOZiBgqAiZ0NnQQqzwmy9EdkE7EbmaTEpug1Pc1CXh+vLqhsl2G2 IkSIoR3uOMZAaTTEZkHAWbd9wxY1cPCJccPRNPboqxGHYIokxM2XvEBvtfHSr2qVlNjr wSY3/tVepRJho9wV+o5WN3eED3VBSHrDdvTiOiNgukJoeMjh+43TdNmJkX2jdlf4BLCL StlPxenG9Wc2BFUgPYKd7iKaVnCyc3Fvyg5hFnbfA3rYui8hqUUUUOglgRWbC1CT1Zt0 TMW38qguqlWTTz6m3KF1WFLNoQWP6NIT2l/NUBCsWtOlzpVY+OZyGdlue7s6ylq71S6e QesA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701225759; x=1701830559; 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=kz6jR3luzdfQNhneqUZRKTLzQfZ85YzHOc0mB47rLgs=; b=BR+OaJg6OMPCa/rDcU2dCFP7XuPMZsaXZ5lVFEQpZWMQX5ymWBAK/5woAhMC7ATul7 HF376NK1Lv+fPCIkOLiEZZFfkrIRyc8GaovA4dPZKloPHPCP+gltlAZOtlUfeU7t6OQc qNhJXBK2N6w/6w4KCy81SFTfJ0b/9JKL8BIhCJIJD+noyFdRPYyvbxO9ccppOq5hYNXf CBxJHcbACyOJK6Si3cVLRWUnwWBT3dnMPR8S2IFxTyUDiIbRBQxf0Nu/leQenMAJ/+mP eyDGEM3joLQ7mdAuANQxJd5kixUAtblSNjsrDYdMpWGoBf2b2lUAfEPEYPFy1Ew5VIqZ 4j0Q== X-Gm-Message-State: AOJu0YymbgnLqA1vIxAZdZBd4jwnCI0aoohj988Aco0FXGo/jxTjluFa q08Ed7upRPbwyc5fherpC+0JWp3HdrszgYvrzT0= X-Google-Smtp-Source: AGHT+IHLXeyLEjN/wjSjy3LwiCWh1cLF58Qo9beLnOwTA8sdM7Ev6A7j01mnXYbZzEdpLcKSHKbrzA== X-Received: by 2002:a05:6870:6707:b0:1fa:30cc:7d48 with SMTP id gb7-20020a056870670700b001fa30cc7d48mr13102181oab.37.1701225758930; Tue, 28 Nov 2023 18:42:38 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id j17-20020aa78011000000b006cb95f6aa0fsm9674900pfi.150.2023.11.28.18.42.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 18:42:38 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Tyler Retzlaff , Dariusz Sosnowski , Viacheslav Ovsiienko , Ori Kam , Suanming Mou , Matan Azrad Subject: [PATCH v5 07/10] net/mlx5: replace zero length array with flex array Date: Tue, 28 Nov 2023 18:39:14 -0800 Message-ID: <20231129024221.57653-8-stephen@networkplumber.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231129024221.57653-1-stephen@networkplumber.org> References: <20230113215205.125767-1-stephen@networkplumber.org> <20231129024221.57653-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 Reviewed-by: Tyler Retzlaff Acked-by: Dariusz Sosnowski --- drivers/common/mlx5/mlx5_prm.h | 2 +- drivers/net/mlx5/mlx5.h | 4 ++-- drivers/net/mlx5/mlx5_flow.h | 2 +- drivers/net/mlx5/mlx5_tx.h | 3 ++- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h index 9e22dce6da13..932b89bd79d3 100644 --- a/drivers/common/mlx5/mlx5_prm.h +++ b/drivers/common/mlx5/mlx5_prm.h @@ -5181,7 +5181,7 @@ struct mlx5_ifc_flow_context_bits { u8 reserved_at_e0[0x40]; u8 encrypt_decrypt_obj_id[0x20]; u8 reserved_at_140[0x16c0]; - union mlx5_ifc_dest_format_flow_counter_list_auto_bits destination[0]; + union mlx5_ifc_dest_format_flow_counter_list_auto_bits destination[]; }; struct mlx5_ifc_set_fte_in_bits { diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index 263ebead7f29..f2e2e04429d1 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -1314,7 +1314,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. */ }; @@ -1331,7 +1331,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 6dde9de688b9..b35079b30a6e 100644 --- a/drivers/net/mlx5/mlx5_flow.h +++ b/drivers/net/mlx5/mlx5_flow.h @@ -1257,7 +1257,7 @@ struct rte_flow_hw { cnt_id_t cnt_id; uint32_t mtr_id; uint32_t rule_idx; - 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 e59ce37667ba..b1e8ea19a2a1 100644 --- 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 { LIST_ENTRY(mlx5_txq_ctrl) next; /* Pointer to the next element. */ uint32_t refcnt; /* Reference counter. */ -- 2.42.0