[PATCH v4 13/19] net/ice: remove use of VLAs for Windows built code
Andre Muezerie
andremue at linux.microsoft.com
Tue Nov 5 04:15:47 CET 2024
From: Tyler Retzlaff <roretzla at linux.microsoft.com>
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 at linux.microsoft.com>
---
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
More information about the dev
mailing list