From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <dev-bounces@dpdk.org> Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4A69A43EA8; Thu, 18 Apr 2024 22:03:38 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CB589406BC; Thu, 18 Apr 2024 22:02:55 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id AB998400D6 for <dev@dpdk.org>; Thu, 18 Apr 2024 22:02:45 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id 5CCF420FD950; Thu, 18 Apr 2024 13:02:44 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 5CCF420FD950 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1713470564; bh=R/d0mpnsT5jq7tJ3HU3g5YrS5+sT06Ox8KheSbh9d+0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CF70hSv22/yybjnZl3gMeONaD9DRVn93WWgw/OyruUzVnScLaa8WyS4VPaxF4AmGJ AMmNr0zjVCtYVjUmSXeKMg4wKoM1/1vUeYpa/p2E0FEWcXOpkvhEtCBFwjVoGdBBws i3Kd8QJjSVMtU42jIAaduyMMh0Ebtd/dcksdV+8s= From: Tyler Retzlaff <roretzla@linux.microsoft.com> To: dev@dpdk.org Cc: =?UTF-8?q?Morten=20Br=C3=B8rup?= <mb@smartsharesystems.com>, Akhil Goyal <gakhil@marvell.com>, Aman Singh <aman.deep.singh@intel.com>, Anatoly Burakov <anatoly.burakov@intel.com>, Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>, Bruce Richardson <bruce.richardson@intel.com>, Chengwen Feng <fengchengwen@huawei.com>, Dariusz Sosnowski <dsosnowski@nvidia.com>, Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>, Fan Zhang <fanzhang.oss@gmail.com>, Ferruh Yigit <ferruh.yigit@amd.com>, Harman Kalra <hkalra@marvell.com>, Harry van Haaren <harry.van.haaren@intel.com>, Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>, Jiayu Hu <hujiayu.hu@foxmail.com>, Jingjing Wu <jingjing.wu@intel.com>, Kevin Laatz <kevin.laatz@intel.com>, Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>, Matan Azrad <matan@nvidia.com>, Ori Kam <orika@nvidia.com>, Pallavi Kadam <pallavi.kadam@intel.com>, Reshma Pattan <reshma.pattan@intel.com>, Sameh Gobriel <sameh.gobriel@intel.com>, Suanming Mou <suanmingm@nvidia.com>, Thomas Monjalon <thomas@monjalon.net>, Tyler Retzlaff <roretzla@linux.microsoft.com>, Viacheslav Ovsiienko <viacheslavo@nvidia.com>, Vladimir Medvedkin <vladimir.medvedkin@intel.com>, Volodymyr Fialko <vfialko@marvell.com>, Yipeng Wang <yipeng1.wang@intel.com> Subject: [PATCH v2 08/19] gro: remove use of VLAs for Windows built code Date: Thu, 18 Apr 2024 13:02:31 -0700 Message-Id: <1713470562-17415-9-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1713470562-17415-1-git-send-email-roretzla@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1713470562-17415-1-git-send-email-roretzla@linux.microsoft.com> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org MSVC does not support VLAs, replace VLAs with standard C arrays or alloca(). alloca() is available for all toolchain/platform combinations officially supported by DPDK. Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> --- lib/gro/rte_gro.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/gro/rte_gro.c b/lib/gro/rte_gro.c index d824eeb..0f9e85c 100644 --- a/lib/gro/rte_gro.c +++ b/lib/gro/rte_gro.c @@ -179,7 +179,7 @@ struct gro_ctx { struct gro_vxlan_udp4_item vxlan_udp_items[RTE_GRO_MAX_BURST_ITEM_NUM] = {{{0}} }; - struct rte_mbuf *unprocess_pkts[nb_pkts]; + struct rte_mbuf **unprocess_pkts = alloca(sizeof(struct rte_mbuf *) * nb_pkts); uint32_t item_num; int32_t ret; uint16_t i, unprocess_num = 0, nb_after_gro = nb_pkts; @@ -360,7 +360,7 @@ struct gro_ctx { uint16_t nb_pkts, void *ctx) { - struct rte_mbuf *unprocess_pkts[nb_pkts]; + struct rte_mbuf **unprocess_pkts = alloca(sizeof(struct rte_mbuf *) * nb_pkts); struct gro_ctx *gro_ctx = ctx; void *tcp_tbl, *udp_tbl, *vxlan_tcp_tbl, *vxlan_udp_tbl, *tcp6_tbl; uint64_t current_time; -- 1.8.3.1