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 B502045A86; Wed, 2 Oct 2024 00:01:26 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A16FD40268; Wed, 2 Oct 2024 00:01:26 +0200 (CEST) Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) by mails.dpdk.org (Postfix) with ESMTP id 1B75440267 for ; Wed, 2 Oct 2024 00:01:24 +0200 (CEST) Received: by mail-pj1-f45.google.com with SMTP id 98e67ed59e1d1-2e0a060f6e8so4151716a91.1 for ; Tue, 01 Oct 2024 15:01:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1727820084; x=1728424884; darn=dpdk.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=WA2L9kitL2Cqg3oW+BY3JWDZ7T1IY36FX1MUT3FddbU=; b=TIxy3ZmcKTfAm0i0tw2IPRvNPKgjPGB+jcZY3MjvfQ30lqg2RMi8lgtNUOfcw3YcgD rLTrS4mirEhoFHzRdj49qPlnA/pGim4CNWf7ixmisLIrbnnaNs6SsV7p20tzwhXlkJts 1s/xLvWBcnI++Ie0298GsZq0KRhdwjrW8JTI2q2MTly4qX1DHQFNRsNF76DwK85qts3z Oup5iPPt3a3ThxTLP9mYykpWIG/QXI7EPOg9TU2p7LmAqIwpsq9a9vTI0iX1ZJKiXyeR 5SQ12Z9p6bG9+Uy0U9KKQMOzUgldgIO/YQOJDmryXcJNnRWGdFS7QiOBYIuBSLBVxAIw mppw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727820084; x=1728424884; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=WA2L9kitL2Cqg3oW+BY3JWDZ7T1IY36FX1MUT3FddbU=; b=P/M97S98k7kBdtQvJATeMiZzhaCK6O2/blgYmqSqEylL5cr2NzGIWZzHo9VMmD2gwc EPZ5jPuUWlkjjLx7x9Nj8opbnytEDh/o+ngxyAhFv+4UPT5XeyFLm6CrKbhjF8Sd0c4j 176vZ78r+4yXeyhuF9LKD/l0P47jCoYS9P6hdlpq8SDWtoyf1Bs2spbusbQJyf75a+JD ZVJVHNdyesE78t6+iZxOwz6MnHkrOhWGplqkuW96MqiGxYC4PrKpEN3Hc2agFj75ZifI VitQjs4/TaRrtJRldonoyiL/E8OM675B358SX1P9fxJK/u90NK3yJLNXQ22ts/60kYK4 f6wA== X-Gm-Message-State: AOJu0YxXu3d2w+20x8U1eHxHThCkur2wBL49yJhwhBa5+Tfn7STOiuGu w90uLB0KTWrJ4OPWmK8LfLkMCS7QHWbv+I1YYVc3y95zJVKiXf6jvjJEuPWr0nkv6aqBgxeHsSu vC50= X-Google-Smtp-Source: AGHT+IHuikdvjPgnuUM7Ag0O219TDx9dBgg2B7O54YJAiqXGR0J5pvNxZ+2W9tFJJq54Wqa0iRy97Q== X-Received: by 2002:a17:90b:2316:b0:2e0:876c:8cba with SMTP id 98e67ed59e1d1-2e1846c2ec1mr1324740a91.20.1727820084172; Tue, 01 Oct 2024 15:01:24 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e18fa05062sm84544a91.42.2024.10.01.15.01.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Oct 2024 15:01:23 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Liang Ma , Peter Mccarthy , Harry van Haaren , Amit Prakash Shukla , Jerin Jacob Subject: [PATCH] eventdev: replace zero-length-array Date: Tue, 1 Oct 2024 15:01:14 -0700 Message-ID: <20241001220114.423998-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 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 Array's (ZLA) are a Gcc extension, and standard Variable Length Array (VLA) should be used instead. Signed-off-by: Stephen Hemminger --- drivers/event/opdl/opdl_ring.c | 2 +- drivers/event/sw/event_ring.h | 2 +- lib/eventdev/rte_event_dma_adapter.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/event/opdl/opdl_ring.c b/drivers/event/opdl/opdl_ring.c index 6799ec996b..60991c4b03 100644 --- a/drivers/event/opdl/opdl_ring.c +++ b/drivers/event/opdl/opdl_ring.c @@ -119,7 +119,7 @@ struct opdl_ring { /* Stages indexed by ID */ struct opdl_stage *stages; /* Memory for storing slot data */ - alignas(RTE_CACHE_LINE_SIZE) uint8_t slots[0]; + alignas(RTE_CACHE_LINE_SIZE) uint8_t slots[]; }; diff --git a/drivers/event/sw/event_ring.h b/drivers/event/sw/event_ring.h index 29db267b77..35931888dd 100644 --- a/drivers/event/sw/event_ring.h +++ b/drivers/event/sw/event_ring.h @@ -27,7 +27,7 @@ struct rob_ring { uint32_t size; uint32_t write_idx; uint32_t read_idx; - alignas(RTE_CACHE_LINE_SIZE) void *ring[0]; + alignas(RTE_CACHE_LINE_SIZE) void *ring[]; }; static inline struct rob_ring * diff --git a/lib/eventdev/rte_event_dma_adapter.h b/lib/eventdev/rte_event_dma_adapter.h index 768390cd30..5c480b82ff 100644 --- a/lib/eventdev/rte_event_dma_adapter.h +++ b/lib/eventdev/rte_event_dma_adapter.h @@ -204,7 +204,7 @@ struct rte_event_dma_adapter_op { /**< Number of source segments. */ uint16_t nb_dst; /**< Number of destination segments. */ - struct rte_dma_sge src_dst_seg[0]; + struct rte_dma_sge src_dst_seg[]; /**< Source and destination segments. */ }; -- 2.45.2