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 1928F45C82; Tue, 5 Nov 2024 04:19:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1DAC942D9D; Tue, 5 Nov 2024 04:17:58 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 68E5E427B0 for ; Tue, 5 Nov 2024 04:17:38 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id C6A802126CCB; Mon, 4 Nov 2024 19:17:36 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C6A802126CCB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1730776656; bh=viPjOJvPvQEGrCuHpENbF9RHmaLwXJb1ngC3rSETuNo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ouhAQe3/fMpFpt3EnAGjr4sdAt38lZRJOI7mv8Xr68++2gv/mZBjvmbYZP5Meazqi Qim5KDdqc5Upq0wBy3QNrHl2/ZA4HT+rbXtISmqrlGCRj8vUEYV1ORyhZyL0peOa+J A4u2osvss2ZRxi8ble4Q9fguCsdHIBKOh9TiVofw= From: Andre Muezerie To: stephen@networkplumber.org Cc: aman.deep.singh@intel.com, anatoly.burakov@intel.com, andrew.rybchenko@oktetlabs.ru, bruce.richardson@intel.com, dev@dpdk.org, dmitry.kozliuk@gmail.com, dsosnowski@nvidia.com, fanzhang.oss@gmail.com, fengchengwen@huawei.com, ferruh.yigit@amd.com, gakhil@marvell.com, harry.van.haaren@intel.com, hkalra@marvell.com, honnappa.nagarahalli@arm.com, hujiayu.hu@foxmail.com, jingjing.wu@intel.com, kevin.laatz@intel.com, konstantin.v.ananyev@yandex.ru, matan@nvidia.com, mb@smartsharesystems.com, orika@nvidia.com, pallavi.kadam@intel.com, reshma.pattan@intel.com, roretzla@linux.microsoft.com, sameh.gobriel@intel.com, suanmingm@nvidia.com, thomas@monjalon.net, vfialko@marvell.com, viacheslavo@nvidia.com, vladimir.medvedkin@intel.com, yipeng1.wang@intel.com Subject: [PATCH v4 13/19] net/ice: remove use of VLAs for Windows built code Date: Mon, 4 Nov 2024 19:15:47 -0800 Message-Id: <1730776553-31277-14-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1730776553-31277-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1730776553-31277-1-git-send-email-andremue@linux.microsoft.com> 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 From: Tyler Retzlaff 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 --- drivers/net/ice/ice_rxtx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c index 024d97cb46..b4013483b0 100644 --- a/drivers/net/ice/ice_rxtx.c +++ b/drivers/net/ice/ice_rxtx.c @@ -1873,7 +1873,7 @@ ice_rx_alloc_bufs(struct ice_rx_queue *rxq) uint64_t dma_addr; int diag, diag_pay; uint64_t pay_addr; - struct rte_mbuf *mbufs_pay[rxq->rx_free_thresh]; + struct rte_mbuf **mbufs_pay = alloca(sizeof(struct rte_mbuf *) * rxq->rx_free_thresh); /* Allocate buffers in bulk */ alloc_idx = (uint16_t)(rxq->rx_free_trigger - -- 2.34.1