From patchwork Fri Jan 10 20:22:20 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149788 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6E6114605F; Fri, 10 Jan 2025 21:24:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 47F3D427C9; Fri, 10 Jan 2025 21:24:07 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id D21C9427B9 for ; Fri, 10 Jan 2025 21:23:59 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id D7DF9203D5F2; Fri, 10 Jan 2025 12:23:58 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com D7DF9203D5F2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540638; bh=fxEjn9Z0Sb20Yr0+qiv133c4Kaf/X6A8fpKx3eSQAjo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AcQ5y624baOZkA1dGN5q1XqAOFbcSMbzdEiNw9MbF6jNi4WG9nGgXeiiDcMi1OSXq NBK42xTWza1KDxQInBxToxHcX7GaZVSc2We1An4XkBds8cgLmSkkUsn2oinRIrU0tz jQEOkTqbqAwtU1KpkmQpkcbyt0JnSNXUSarHD7/w= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Tyler Retzlaff Subject: [PATCH v14 01/81] eal: include header required for alloca Date: Fri, 10 Jan 2025 12:22:20 -0800 Message-Id: <1736540620-21764-2-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 Include alloca.h for Linux and malloc.h for Windows to get declaration of alloca(). Signed-off-by: Tyler Retzlaff --- lib/eal/freebsd/include/rte_os.h | 1 + lib/eal/linux/include/rte_os.h | 1 + lib/eal/windows/include/rte_os.h | 1 + 3 files changed, 3 insertions(+) diff --git a/lib/eal/freebsd/include/rte_os.h b/lib/eal/freebsd/include/rte_os.h index 62e70dc15b..94b9275beb 100644 --- a/lib/eal/freebsd/include/rte_os.h +++ b/lib/eal/freebsd/include/rte_os.h @@ -11,6 +11,7 @@ */ #include +#include /* Declares alloca() */ #include /* These macros are compatible with system's sys/queue.h. */ diff --git a/lib/eal/linux/include/rte_os.h b/lib/eal/linux/include/rte_os.h index 35c07c70cb..20eff0409a 100644 --- a/lib/eal/linux/include/rte_os.h +++ b/lib/eal/linux/include/rte_os.h @@ -10,6 +10,7 @@ * which is not supported natively or named differently in Linux. */ +#include #include #include diff --git a/lib/eal/windows/include/rte_os.h b/lib/eal/windows/include/rte_os.h index 9d69467aaa..d09adeb3b4 100644 --- a/lib/eal/windows/include/rte_os.h +++ b/lib/eal/windows/include/rte_os.h @@ -13,6 +13,7 @@ #include #include #include +#include #include From patchwork Fri Jan 10 20:22:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149786 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9456E4605F; Fri, 10 Jan 2025 21:24:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8131C427BB; Fri, 10 Jan 2025 21:24:03 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 959E2402EF for ; Fri, 10 Jan 2025 21:23:59 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id E566D203D5F3; Fri, 10 Jan 2025 12:23:58 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com E566D203D5F3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540638; bh=QE05rcjV45ZUVkXuWzSW/OKS8rMsLAZ7HwF08rHeBO8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kpOp5nK2F2orCnDCKfutZyk0tQuEL5kYg/V6MjHHJNufsguORlJ9KgsHnvJPe0luH S3jVhhD6dcSCt3t2iikuEKPUN4/zkQ03OVs7Ap/d/X6VPZlzzZIdSzv2T3DfSo+7nR QiucmJX5LQGlL2d4JUlodHzisZ6WJFBglxBzvWCA= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com Subject: [PATCH v14 02/81] eal/linux: remove use of VLAs Date: Fri, 10 Jan 2025 12:22:21 -0800 Message-Id: <1736540620-21764-3-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> MIME-Version: 1.0 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: Konstantin Ananyev 1) ./lib/eal/linux/eal_interrupts.c:1073:16 : warning: ISO C90 forbids variable length array ‘events’ MSVC does not support VLAs. Use alloca() to allocate the memory on the stack. 2) ./lib/eal/linux/eal_interrupts.c:1319:16 : warning: ISO C90 forbids variable length array ‘evs’ make eal_epoll_wait() use a fixed size array and use it though multiple iterations to process up to @maxevents events. Note that technically it is not one to one replacement, as here we might reduce number of events returned by first call to epoll_wait(..., timeout); Signed-off-by: Konstantin Ananyev --- lib/eal/linux/eal_interrupts.c | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/lib/eal/linux/eal_interrupts.c b/lib/eal/linux/eal_interrupts.c index 6436f796eb..23039964fc 100644 --- a/lib/eal/linux/eal_interrupts.c +++ b/lib/eal/linux/eal_interrupts.c @@ -34,6 +34,8 @@ #define EAL_INTR_EPOLL_WAIT_FOREVER (-1) #define NB_OTHER_INTR 1 +#define MAX_ITER_EVNUM RTE_EVENT_ETH_INTR_RING_SIZE + static RTE_DEFINE_PER_LCORE(int, _epfd) = -1; /**< epoll fd per thread */ /** @@ -1070,7 +1072,7 @@ eal_intr_process_interrupts(struct epoll_event *events, int nfds) static void eal_intr_handle_interrupts(int pfd, unsigned totalfds) { - struct epoll_event events[totalfds]; + struct epoll_event *events = alloca(sizeof(struct epoll_event) * totalfds); int nfds = 0; for(;;) { @@ -1316,8 +1318,9 @@ static int eal_epoll_wait(int epfd, struct rte_epoll_event *events, int maxevents, int timeout, bool interruptible) { - struct epoll_event evs[maxevents]; int rc; + uint32_t i, k, n, num; + struct epoll_event evs[MAX_ITER_EVNUM]; if (!events) { EAL_LOG(ERR, "rte_epoll_event can't be NULL"); @@ -1328,12 +1331,31 @@ eal_epoll_wait(int epfd, struct rte_epoll_event *events, if (epfd == RTE_EPOLL_PER_THREAD) epfd = rte_intr_tls_epfd(); + num = maxevents; + n = RTE_MIN(RTE_DIM(evs), num); + + /* Process events in chunks of MAX_ITER_EVNUM */ + while (1) { - rc = epoll_wait(epfd, evs, maxevents, timeout); + rc = epoll_wait(epfd, evs, n, timeout); if (likely(rc > 0)) { + /* epoll_wait has at least one fd ready to read */ - rc = eal_epoll_process_event(evs, rc, events); - break; + for (i = 0, k = 0; rc > 0;) { + k += rc; + rc = eal_epoll_process_event(evs, rc, + events + i); + i += rc; + + /* + * try to read more events that are already + * available (up to maxevents in total). + */ + n = RTE_MIN(RTE_DIM(evs), num - k); + rc = (n == 0) ? 0 : epoll_wait(epfd, evs, n, 0); + } + return i; + } else if (rc < 0) { if (errno == EINTR) { if (interruptible) From patchwork Fri Jan 10 20:22:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149789 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 95C644605F; Fri, 10 Jan 2025 21:24:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 78247427C1; Fri, 10 Jan 2025 21:24:08 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id E3678427BA for ; Fri, 10 Jan 2025 21:23:59 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id F215C203D5F4; Fri, 10 Jan 2025 12:23:58 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com F215C203D5F4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540638; bh=d+IGhs3B4s6NIf7SG0t5ePLGWll0o1jNx12LMjs8mZ4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CuEyVJb+vTY6AcC+AELiBVgGTaBslHgkA+rWIB/t4W/I/gAJOrBiYB0/K/muGD/HG Kr9eEwfvYx3cXruDcS1xingytXh6q1EaK7RbqdV2+Q9rMhcLQn7D+ELKUBtAsJ9dAB Uv3dich3JFwRSl7RlOMuMaqpdQFRRso2hQvaP+oE= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com Subject: [PATCH v14 03/81] eal/common: remove use of VLAs Date: Fri, 10 Jan 2025 12:22:22 -0800 Message-Id: <1736540620-21764-4-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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: Konstantin Ananyev 1) ../lib/eal/common/eal_common_proc.c:695:15 : warning: variable length array used As msg->num_fds should not exceed RTE_MP_MAX_FD_NUM, replaced it with fixed size array. Signed-off-by: Konstantin Ananyev Acked-by: Stephen Hemminger --- lib/eal/common/eal_common_proc.c | 5 +++-- lib/eal/meson.build | 8 ++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/eal/common/eal_common_proc.c b/lib/eal/common/eal_common_proc.c index d24093937c..201973c5db 100644 --- a/lib/eal/common/eal_common_proc.c +++ b/lib/eal/common/eal_common_proc.c @@ -692,7 +692,8 @@ send_msg(const char *dst_path, struct rte_mp_msg *msg, int type) struct sockaddr_un dst; struct mp_msg_internal m; int fd_size = msg->num_fds * sizeof(int); - char control[CMSG_SPACE(fd_size)]; + const int32_t control_sz = CMSG_SPACE(fd_size); + char control[CMSG_SPACE(sizeof(msg->fds))]; m.type = type; memcpy(&m.msg, msg, sizeof(*msg)); @@ -712,7 +713,7 @@ send_msg(const char *dst_path, struct rte_mp_msg *msg, int type) msgh.msg_iov = &iov; msgh.msg_iovlen = 1; msgh.msg_control = control; - msgh.msg_controllen = sizeof(control); + msgh.msg_controllen = control_sz; cmsg = CMSG_FIRSTHDR(&msgh); cmsg->cmsg_len = CMSG_LEN(fd_size); diff --git a/lib/eal/meson.build b/lib/eal/meson.build index e1d6c4cf17..352db049e9 100644 --- a/lib/eal/meson.build +++ b/lib/eal/meson.build @@ -31,3 +31,11 @@ endif if is_freebsd annotate_locks = false endif + +warning_flags = ['-Wvla'] + +foreach arg: warning_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:22:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149787 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 653C64605F; Fri, 10 Jan 2025 21:24:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 78F37427C5; Fri, 10 Jan 2025 21:24:05 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id AA1A842794 for ; Fri, 10 Jan 2025 21:23:59 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 0AF7F203D5F5; Fri, 10 Jan 2025 12:23:58 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 0AF7F203D5F5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540639; bh=3yeJ8FJDcyBuinO6vyA6Nhpb46mhrR6Ggw7T5v0W+zY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DxasmT1xhgcH1EyA2SfqiVvRWtS7SaoQ+Bxp6zRoAY6eEFK5ohS8fLcx581F9sOkJ uWS2EeYBLxOxT44a0l9JpbCmvr9SL0cKrKkXgMI6SxWwx8NPECFqkpnWo5Zu//6FN6 CwtE9S4FSrGYJrbC0VozJmURBOCXjACUxKUXm3VY= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com Subject: [PATCH v14 04/81] ethdev: remove use of VLAs for Windows built code Date: Fri, 10 Jan 2025 12:22:23 -0800 Message-Id: <1736540620-21764-5-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> MIME-Version: 1.0 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: Konstantin Ananyev 1) ./lib/ethdev/rte_ethdev.c:3244:16 : warning: ISO C90 forbids variable length array ‘xstats_names’ 2) ./lib/ethdev/rte_ethdev.c:3345:17 : warning: ISO C90 forbids variable length array ‘ids_copy’ 3) ./lib/ethdev/rte_ethdev.c:3538:16 : warning: ISO C90 forbids variable length array ‘xstats’ 4) ./lib/ethdev/rte_ethdev.c:3554:17 : warning: ISO C90 forbids variable length array ‘ids_copy’ For 1) and 3) - just replaced VLA with arrays allocated from heap. As I understand xstats extraction belongs to control-path, so extra calloc/free is hopefully acceptable. Also ethdev xstats already doing that within rte_eth_xstats_get_id_by_name(). For 2) and 4) changed the code to use fixed size array and call appropriate devops function several times, if needed. Signed-off-by: Konstantin Ananyev --- lib/ethdev/meson.build | 8 ++ lib/ethdev/rte_ethdev.c | 183 +++++++++++++++++++++++++--------------- 2 files changed, 121 insertions(+), 70 deletions(-) diff --git a/lib/ethdev/meson.build b/lib/ethdev/meson.build index f1d2586591..f5faac8bba 100644 --- a/lib/ethdev/meson.build +++ b/lib/ethdev/meson.build @@ -62,3 +62,11 @@ endif if get_option('buildtype').contains('debug') cflags += ['-DRTE_FLOW_DEBUG'] endif + +warning_flags = ['-Wvla'] + +foreach arg: warning_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c index 6413c54e3b..09cc4764c3 100644 --- a/lib/ethdev/rte_ethdev.c +++ b/lib/ethdev/rte_ethdev.c @@ -36,6 +36,8 @@ #include "ethdev_trace.h" #include "sff_telemetry.h" +#define ETH_XSTATS_ITER_NUM 0x100 + struct rte_eth_dev rte_eth_devices[RTE_MAX_ETHPORTS]; /* public fast-path API */ @@ -3308,7 +3310,8 @@ int rte_eth_xstats_get_id_by_name(uint16_t port_id, const char *xstat_name, uint64_t *id) { - int cnt_xstats, idx_xstat; + int cnt_xstats, idx_xstat, rc; + struct rte_eth_xstat_name *xstats_names; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); @@ -3334,26 +3337,33 @@ rte_eth_xstats_get_id_by_name(uint16_t port_id, const char *xstat_name, } /* Get id-name lookup table */ - struct rte_eth_xstat_name xstats_names[cnt_xstats]; + xstats_names = calloc(cnt_xstats, sizeof(xstats_names[0])); + if (xstats_names == NULL) { + RTE_ETHDEV_LOG_LINE(ERR, "Can't allocate memory"); + return -ENOMEM; + } if (cnt_xstats != rte_eth_xstats_get_names_by_id( port_id, xstats_names, cnt_xstats, NULL)) { RTE_ETHDEV_LOG_LINE(ERR, "Cannot get xstats lookup"); + free(xstats_names); return -1; } + rc = -EINVAL; for (idx_xstat = 0; idx_xstat < cnt_xstats; idx_xstat++) { if (!strcmp(xstats_names[idx_xstat].name, xstat_name)) { *id = idx_xstat; rte_eth_trace_xstats_get_id_by_name(port_id, xstat_name, *id); - - return 0; + rc = 0; + break; }; } - return -EINVAL; + free(xstats_names); + return rc; } /* retrieve basic stats names */ @@ -3399,6 +3409,38 @@ eth_basic_stats_get_names(struct rte_eth_dev *dev, return cnt_used_entries; } +static int +eth_xstats_get_by_name_by_id(struct rte_eth_dev *dev, const uint64_t *ids, + struct rte_eth_xstat_name *xstats_names, uint32_t size, + uint32_t basic_count) +{ + int32_t rc; + uint32_t i, k, m, n; + uint64_t ids_copy[ETH_XSTATS_ITER_NUM]; + + m = 0; + for (n = 0; n != size; n += k) { + + k = RTE_MIN(size - n, RTE_DIM(ids_copy)); + + /* + * Convert ids to xstats ids that PMD knows. + * ids known by user are basic + extended stats. + */ + for (i = 0; i < k; i++) + ids_copy[i] = ids[n + i] - basic_count; + + rc = (*dev->dev_ops->xstats_get_names_by_id)(dev, ids_copy, + xstats_names + m, k); + if (rc < 0) + return rc; + m += rc; + } + + return m; +} + + /* retrieve ethdev extended statistics names */ int rte_eth_xstats_get_names_by_id(uint16_t port_id, @@ -3406,9 +3448,8 @@ rte_eth_xstats_get_names_by_id(uint16_t port_id, uint64_t *ids) { struct rte_eth_xstat_name *xstats_names_copy; - unsigned int no_basic_stat_requested = 1; - unsigned int no_ext_stat_requested = 1; unsigned int expected_entries; + unsigned int nb_basic_stats; unsigned int basic_count; struct rte_eth_dev *dev; unsigned int i; @@ -3434,27 +3475,18 @@ rte_eth_xstats_get_names_by_id(uint16_t port_id, if (ids && !xstats_names) return -EINVAL; - if (ids && dev->dev_ops->xstats_get_names_by_id != NULL && size > 0) { - uint64_t ids_copy[size]; - - for (i = 0; i < size; i++) { - if (ids[i] < basic_count) { - no_basic_stat_requested = 0; - break; - } - - /* - * Convert ids to xstats ids that PMD knows. - * ids known by user are basic + extended stats. - */ - ids_copy[i] = ids[i] - basic_count; - } - - if (no_basic_stat_requested) - return (*dev->dev_ops->xstats_get_names_by_id)(dev, - ids_copy, xstats_names, size); + nb_basic_stats = 0; + if (ids != NULL) { + for (i = 0; i < size; i++) + nb_basic_stats += (ids[i] < basic_count); } + /* no basic stats requested, devops function provided */ + if (nb_basic_stats == 0 && ids != NULL && size != 0 && + dev->dev_ops->xstats_get_names_by_id != NULL) + return eth_xstats_get_by_name_by_id(dev, ids, xstats_names, + size, basic_count); + /* Retrieve all stats */ if (!ids) { int num_stats = rte_eth_xstats_get_names(port_id, xstats_names, @@ -3473,17 +3505,8 @@ rte_eth_xstats_get_names_by_id(uint16_t port_id, return -ENOMEM; } - if (ids) { - for (i = 0; i < size; i++) { - if (ids[i] >= basic_count) { - no_ext_stat_requested = 0; - break; - } - } - } - /* Fill xstats_names_copy structure */ - if (ids && no_ext_stat_requested) { + if (ids && nb_basic_stats == size) { eth_basic_stats_get_names(dev, xstats_names_copy); } else { ret = rte_eth_xstats_get_names(port_id, xstats_names_copy, @@ -3607,17 +3630,47 @@ eth_basic_stats_get(uint16_t port_id, struct rte_eth_xstat *xstats) return count; } +static int +eth_xtats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids, + uint64_t *values, uint32_t size, uint32_t basic_count) +{ + int32_t rc; + uint32_t i, k, m, n; + uint64_t ids_copy[ETH_XSTATS_ITER_NUM]; + + m = 0; + for (n = 0; n != size; n += k) { + + k = RTE_MIN(size - n, RTE_DIM(ids_copy)); + + /* + * Convert ids to xstats ids that PMD knows. + * ids known by user are basic + extended stats. + */ + for (i = 0; i < k; i++) + ids_copy[i] = ids[n + i] - basic_count; + + rc = (*dev->dev_ops->xstats_get_by_id)(dev, ids_copy, + values + m, k); + if (rc < 0) + return rc; + m += rc; + } + + return m; +} + /* retrieve ethdev extended statistics */ int rte_eth_xstats_get_by_id(uint16_t port_id, const uint64_t *ids, uint64_t *values, unsigned int size) { - unsigned int no_basic_stat_requested = 1; - unsigned int no_ext_stat_requested = 1; + unsigned int nb_basic_stats; unsigned int num_xstats_filled; unsigned int basic_count; uint16_t expected_entries; struct rte_eth_dev *dev; + struct rte_eth_xstat *xstats; unsigned int i; int ret; @@ -3628,7 +3681,6 @@ rte_eth_xstats_get_by_id(uint16_t port_id, const uint64_t *ids, if (ret < 0) return ret; expected_entries = (uint16_t)ret; - struct rte_eth_xstat xstats[expected_entries]; basic_count = eth_dev_get_xstats_basic_count(dev); /* Return max number of stats if no ids given */ @@ -3642,51 +3694,41 @@ rte_eth_xstats_get_by_id(uint16_t port_id, const uint64_t *ids, if (ids && !values) return -EINVAL; - if (ids && dev->dev_ops->xstats_get_by_id != NULL && size) { - unsigned int basic_count = eth_dev_get_xstats_basic_count(dev); - uint64_t ids_copy[size]; - - for (i = 0; i < size; i++) { - if (ids[i] < basic_count) { - no_basic_stat_requested = 0; - break; - } - - /* - * Convert ids to xstats ids that PMD knows. - * ids known by user are basic + extended stats. - */ - ids_copy[i] = ids[i] - basic_count; - } - - if (no_basic_stat_requested) - return (*dev->dev_ops->xstats_get_by_id)(dev, ids_copy, - values, size); + nb_basic_stats = 0; + if (ids != NULL) { + for (i = 0; i < size; i++) + nb_basic_stats += (ids[i] < basic_count); } - if (ids) { - for (i = 0; i < size; i++) { - if (ids[i] >= basic_count) { - no_ext_stat_requested = 0; - break; - } - } + /* no basic stats requested, devops function provided */ + if (nb_basic_stats == 0 && ids != NULL && size != 0 && + dev->dev_ops->xstats_get_by_id != NULL) + return eth_xtats_get_by_id(dev, ids, values, size, basic_count); + + xstats = calloc(expected_entries, sizeof(xstats[0])); + if (xstats == NULL) { + RTE_ETHDEV_LOG_LINE(ERR, "Can't allocate memory"); + return -ENOMEM; } /* Fill the xstats structure */ - if (ids && no_ext_stat_requested) + if (ids && nb_basic_stats == size) ret = eth_basic_stats_get(port_id, xstats); else ret = rte_eth_xstats_get(port_id, xstats, expected_entries); - if (ret < 0) + if (ret < 0) { + free(xstats); return ret; + } num_xstats_filled = (unsigned int)ret; /* Return all stats */ if (!ids) { for (i = 0; i < num_xstats_filled; i++) values[i] = xstats[i].value; + + free(xstats); return expected_entries; } @@ -3694,14 +3736,15 @@ rte_eth_xstats_get_by_id(uint16_t port_id, const uint64_t *ids, for (i = 0; i < size; i++) { if (ids[i] >= expected_entries) { RTE_ETHDEV_LOG_LINE(ERR, "Id value isn't valid"); - return -1; + break; } values[i] = xstats[ids[i]].value; } rte_eth_trace_xstats_get_by_id(port_id, ids, values, size); - return size; + free(xstats); + return (i == size) ? (int32_t)size : -1; } int From patchwork Fri Jan 10 20:22:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149797 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 45EEC4605F; Fri, 10 Jan 2025 21:25:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B271D42D55; Fri, 10 Jan 2025 21:24:18 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id D56EE427BD for ; Fri, 10 Jan 2025 21:24:00 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 17685203D5F6; Fri, 10 Jan 2025 12:23:58 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 17685203D5F6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540639; bh=CkBRYtLcDKKV/LioM/c1RLUdrGSIz/YEc1HGqh5Ec2I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b7bXvwMva4VPAtkgHbqoag/6yb5ttYghgKBcMlpQ8tduyM2/PQI+1sQG+z7dbfKnK Lpriuid8ji3ziq20xbUs/ffMEP/xF9IvlJhuwrbOdg30pKcYkAu7ADUKZgS128rded oy8zvWj2ks/CBOFbm5W/bF/orIZojG8Bw77HnWTA= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com Subject: [PATCH v14 05/81] hash: remove use of VLAs for Windows built code Date: Fri, 10 Jan 2025 12:22:24 -0800 Message-Id: <1736540620-21764-6-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> MIME-Version: 1.0 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: Konstantin Ananyev 1) ./lib/hash/rte_cuckoo_hash.c:2362:9 : warning: ISO C90 forbids variable length array ‘positions’ 2) ../lib/hash/rte_cuckoo_hash.c:2478:9 : warning: ISO C90 forbids variable length array ‘positions’ Both rte_hash_lookup_bulk_data() and rte_hash_lookup_with_hash_bulk_data() expect @num_keys <= RTE_HASH_LOOKUP_BULK_MAX. So, for both cases it should be safe to replace VLA with fixed size array. Signed-off-by: Konstantin Ananyev Reviewed-by: Bruce Richardson Acked-by: Vladimir Medvedkin Acked-by: Chengwen Feng --- lib/hash/rte_cuckoo_hash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/hash/rte_cuckoo_hash.c b/lib/hash/rte_cuckoo_hash.c index 9575e8aa0c..fc93182efe 100644 --- a/lib/hash/rte_cuckoo_hash.c +++ b/lib/hash/rte_cuckoo_hash.c @@ -2418,7 +2418,7 @@ rte_hash_lookup_bulk_data(const struct rte_hash *h, const void **keys, (num_keys > RTE_HASH_LOOKUP_BULK_MAX) || (hit_mask == NULL)), -EINVAL); - int32_t positions[num_keys]; + int32_t positions[RTE_HASH_LOOKUP_BULK_MAX]; __rte_hash_lookup_bulk(h, keys, num_keys, positions, hit_mask, data); @@ -2534,7 +2534,7 @@ rte_hash_lookup_with_hash_bulk_data(const struct rte_hash *h, (num_keys > RTE_HASH_LOOKUP_BULK_MAX) || (hit_mask == NULL)), -EINVAL); - int32_t positions[num_keys]; + int32_t positions[RTE_HASH_LOOKUP_BULK_MAX]; __rte_hash_lookup_with_hash_bulk(h, keys, sig, num_keys, positions, hit_mask, data); From patchwork Fri Jan 10 20:22:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149790 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D12294605F; Fri, 10 Jan 2025 21:24:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 018F9427DB; Fri, 10 Jan 2025 21:24:10 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 8704E402EF for ; Fri, 10 Jan 2025 21:24:00 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 24496203D5F7; Fri, 10 Jan 2025 12:23:58 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 24496203D5F7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540639; bh=YrQHoadfF2iKdAPUDKUpHY/rMkyrmyGEX++NZ5rbYIE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l1SRcLzp7DwrB6dpyJqTCtW0vASM/jgAz8g7Wz4Mi9Pr28qEVAwWt4QMsm5qCrs0I FQEZ6fGK99BsYxgHTZUo1JqDsyM+VgB2uSGHbW3OcwUPwPwYSg+rtAe6WMaBjTMzHT mpdyy9YAzl4LKrbcCxXt83Ie+q5gzMkzzpNp61mU= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com Subject: [PATCH v14 06/81] hash/thash: remove use of VLAs for Windows built Date: Fri, 10 Jan 2025 12:22:25 -0800 Message-Id: <1736540620-21764-7-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> MIME-Version: 1.0 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: Konstantin Ananyev 1) ./lib/hash/rte_thash.c:774:9 : warning: ISO C90 forbids variable length array ‘tmp_tuple’ The tuple can exceed sizeof(union rte_thash_tuple), for example if any tunneling header is used in the RSS hash calculation. The longest RSS hash key currently supported is 52 bytes. Technically, the longest tuple with such a key should be (52 - sizeof(uint32_t)), so this can be used as a size of the tmp_tuple array. Signed-off-by: Konstantin Ananyev --- lib/hash/rte_thash.c | 2 +- lib/hash/rte_thash.h | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/hash/rte_thash.c b/lib/hash/rte_thash.c index 336c228e64..fa78787143 100644 --- a/lib/hash/rte_thash.c +++ b/lib/hash/rte_thash.c @@ -761,7 +761,7 @@ rte_thash_adjust_tuple(struct rte_thash_ctx *ctx, uint32_t desired_value, unsigned int attempts, rte_thash_check_tuple_t fn, void *userdata) { - uint32_t tmp_tuple[tuple_len / sizeof(uint32_t)]; + uint32_t tmp_tuple[RTE_THASH_TUPLE_LEN_MAX]; unsigned int i, j, ret = 0; uint32_t hash, adj_bits; const uint8_t *hash_key; diff --git a/lib/hash/rte_thash.h b/lib/hash/rte_thash.h index c0af5968df..04f9f1875c 100644 --- a/lib/hash/rte_thash.h +++ b/lib/hash/rte_thash.h @@ -121,6 +121,13 @@ __rte_internal uint32_t thash_get_rand_poly(uint32_t poly_degree); +/** + * Longest RSS hash key currently supported + */ +#define RTE_THASH_KEY_LEN_MAX 52 + +#define RTE_THASH_TUPLE_LEN_MAX (RTE_THASH_KEY_LEN_MAX - sizeof(uint32_t)) + /** * Prepare special converted key to use with rte_softrss_be() * @param orig From patchwork Fri Jan 10 20:22:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149793 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EC0AC4605F; Fri, 10 Jan 2025 21:24:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 92A17427D0; Fri, 10 Jan 2025 21:24:13 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 8BB484275D for ; Fri, 10 Jan 2025 21:24:00 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 30930203D5F8; Fri, 10 Jan 2025 12:23:58 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 30930203D5F8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540639; bh=Dk9+8V7DPwfBn5EbMr/nHBpQkulOTqahe+cZHF8/fUY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SxiGJy+phwINLre+tpPwTznJYVaxNf5S+c48MYmjmlIosOZvrJI4ZPVfIa2vYgNN2 GrtdmHbRCBuGvVzoCNcLCkha2kYQOM9gXZ+RXVn9OScNI4Ur8ntQ4HDAdnfAXhmNHu L+2JK+rdXxTDDl7grQ1oHOgW9OajM5zse0+sJqJ4= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com Subject: [PATCH v14 07/81] rcu: remove use of VLAs for Windows built code Date: Fri, 10 Jan 2025 12:22:26 -0800 Message-Id: <1736540620-21764-8-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> MIME-Version: 1.0 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: Konstantin Ananyev 1) ./lib/rcu/rte_rcu_qsbr.c:359:9 : warning: ISO C90 forbids variable length array ‘data’ [-Wvla] 2) ./lib/rcu/rte_rcu_qsbr.c:422:9 : warning: ISO C90 forbids variable length array ‘data’ [-Wvla] In both cases we allocate VLA for one element from RCU deferred queue. Right now, size of element in RCU queue is not limited by API. The approach is to introduce some reasonable limitation on RCU DQ element size. Choose 128B for now. With that in place we can replace both VLA occurencies with fixed size array. Note that such change need to be treated as API change. So can be applied only at 24.11. Signed-off-by: Konstantin Ananyev --- lib/rcu/meson.build | 8 ++++++++ lib/rcu/rte_rcu_qsbr.c | 7 ++++--- lib/rcu/rte_rcu_qsbr.h | 5 +++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/lib/rcu/meson.build b/lib/rcu/meson.build index 71143f5210..bbe73aa72f 100644 --- a/lib/rcu/meson.build +++ b/lib/rcu/meson.build @@ -11,3 +11,11 @@ sources = files('rte_rcu_qsbr.c') headers = files('rte_rcu_qsbr.h') deps += ['ring'] + +warning_flags = ['-Wvla'] + +foreach arg: warning_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach diff --git a/lib/rcu/rte_rcu_qsbr.c b/lib/rcu/rte_rcu_qsbr.c index dbf31501a6..fe68d16326 100644 --- a/lib/rcu/rte_rcu_qsbr.c +++ b/lib/rcu/rte_rcu_qsbr.c @@ -245,7 +245,8 @@ rte_rcu_qsbr_dq_create(const struct rte_rcu_qsbr_dq_parameters *params) if (params == NULL || params->free_fn == NULL || params->v == NULL || params->name == NULL || params->size == 0 || params->esize == 0 || - (params->esize % 4 != 0)) { + (params->esize % 4 != 0) || + params->esize > RTE_QSBR_ESIZE_MAX) { RCU_LOG(ERR, "Invalid input parameter"); rte_errno = EINVAL; @@ -323,7 +324,7 @@ int rte_rcu_qsbr_dq_enqueue(struct rte_rcu_qsbr_dq *dq, void *e) return 1; } - char data[dq->esize]; + char data[RTE_QSBR_ESIZE_MAX + __RTE_QSBR_TOKEN_SIZE]; dq_elem = (__rte_rcu_qsbr_dq_elem_t *)data; /* Start the grace period */ dq_elem->token = rte_rcu_qsbr_start(dq->v); @@ -386,7 +387,7 @@ rte_rcu_qsbr_dq_reclaim(struct rte_rcu_qsbr_dq *dq, unsigned int n, cnt = 0; - char data[dq->esize]; + char data[RTE_QSBR_ESIZE_MAX + __RTE_QSBR_TOKEN_SIZE]; /* Check reader threads quiescent state and reclaim resources */ while (cnt < n && rte_ring_dequeue_bulk_elem_start(dq->r, &data, diff --git a/lib/rcu/rte_rcu_qsbr.h b/lib/rcu/rte_rcu_qsbr.h index 550fadf56a..abcbd78914 100644 --- a/lib/rcu/rte_rcu_qsbr.h +++ b/lib/rcu/rte_rcu_qsbr.h @@ -86,6 +86,11 @@ struct __rte_cache_aligned rte_rcu_qsbr_cnt { #define __RTE_QSBR_CNT_MAX ((uint64_t)~0) #define __RTE_QSBR_TOKEN_SIZE sizeof(uint64_t) +/** + * Max allowable size (in bytes) of each element in the defer queue + */ +#define RTE_QSBR_ESIZE_MAX (2 * RTE_CACHE_LINE_MIN_SIZE) + /* RTE Quiescent State variable structure. * This structure has two elements that vary in size based on the * 'max_threads' parameter. From patchwork Fri Jan 10 20:22:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149791 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6EE914605F; Fri, 10 Jan 2025 21:24:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 00342427E0; Fri, 10 Jan 2025 21:24:10 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 93E46427B9; Fri, 10 Jan 2025 21:24:00 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 3CAC2203D5F9; Fri, 10 Jan 2025 12:23:58 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 3CAC2203D5F9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540639; bh=Xl3yXo60gwvrhEY9I38L3jD+obQe2CNzztbKNdHHrZQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BIxsXZZXPKILwXCuAErnPutkGX5vCMqEP30Pc040pJnre4wg9MUGLTrj8PJKisQWq 4ybglCoJ1XrsY8s7G1wr68GwzJLytrlJP0HinWibmzF2IJuSKbRJgRYZL2J+WNQZuN BNRNYFnqYM42k79x+GHHo/ohoRiFObfxwegt0a58= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, stable@dpdk.org Subject: [PATCH v14 08/81] gro: fix overwrite unprocessed packets Date: Fri, 10 Jan 2025 12:22:27 -0800 Message-Id: <1736540620-21764-9-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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: Konstantin Ananyev gro_vxlan_tcp4_tbl_timeout_flush() is called without taking into account that first entries in pkts[] can be already occupied by un-processed packets. Fixes: 74080d7dcf31 ("gro: support IPv6 for TCP") Cc: stable@dpdk.org Signed-off-by: Konstantin Ananyev Acked-by: Ferruh Yigit --- lib/gro/rte_gro.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gro/rte_gro.c b/lib/gro/rte_gro.c index d824eebd93..db86117609 100644 --- a/lib/gro/rte_gro.c +++ b/lib/gro/rte_gro.c @@ -327,7 +327,7 @@ rte_gro_reassemble_burst(struct rte_mbuf **pkts, /* Flush all packets from the tables */ if (do_vxlan_tcp_gro) { i += gro_vxlan_tcp4_tbl_timeout_flush(&vxlan_tcp_tbl, - 0, pkts, nb_pkts); + 0, &pkts[i], nb_pkts - i); } if (do_vxlan_udp_gro) { From patchwork Fri Jan 10 20:22:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149792 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 214C54605F; Fri, 10 Jan 2025 21:24:47 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 138DD427E7; Fri, 10 Jan 2025 21:24:12 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 8E82B42794 for ; Fri, 10 Jan 2025 21:24:00 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 49A96203D5FA; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 49A96203D5FA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540639; bh=xIhcZJ4HEiN5DCU3gu3PDFQxAO+9KrpbV+LDGxkypwI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pJkJwim7b7IrMWfNchHyY2YJXBQmSWq6Ov5ilPUk2KZO4B1gABOzX1/82K30QtTou dKl2XuuWWIJ3eVIMFd/snMOZANrKKBGjX9w6wIeerubAuYGXkyLsmZP/hJ+1Cb1Vo0 vk4K97l1q6KfbIjNFK84zmw8OScZKP67WJT0s590= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com Subject: [PATCH v14 09/81] gro: remove use of VLAs Date: Fri, 10 Jan 2025 12:22:28 -0800 Message-Id: <1736540620-21764-10-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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: Konstantin Ananyev ../lib/gro/rte_gro.c:182:34: warning: variable length array used [-Wvla] ../lib/gro/rte_gro.c:363:34: warning: variable length array used [-Wvla] In both cases the pattern is the same: we use unprocess_pkts[nb_pkts] to collect un-used by GRO packets, and then copy them to the start of input/output pkts[] array. In both cases, we can safely copy pkts[i] into already processed entry at the same array, i.e. into pkts[unprocess_num]. Such change eliminates need of temporary VLA: unprocess_pkts[nb_pkts]. Signed-off-by: Konstantin Ananyev Acked-by: Ferruh Yigit --- lib/gro/meson.build | 8 ++++++++ lib/gro/rte_gro.c | 40 ++++++++++++++-------------------------- 2 files changed, 22 insertions(+), 26 deletions(-) diff --git a/lib/gro/meson.build b/lib/gro/meson.build index dbce05220d..83b97e2022 100644 --- a/lib/gro/meson.build +++ b/lib/gro/meson.build @@ -11,3 +11,11 @@ sources = files( ) headers = files('rte_gro.h') deps += ['ethdev'] + +warning_flags = ['-Wvla'] + +foreach arg: warning_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach diff --git a/lib/gro/rte_gro.c b/lib/gro/rte_gro.c index db86117609..6d5aadf32a 100644 --- a/lib/gro/rte_gro.c +++ b/lib/gro/rte_gro.c @@ -179,7 +179,6 @@ rte_gro_reassemble_burst(struct rte_mbuf **pkts, struct gro_vxlan_udp4_item vxlan_udp_items[RTE_GRO_MAX_BURST_ITEM_NUM] = {{{0}} }; - struct rte_mbuf *unprocess_pkts[nb_pkts]; uint32_t item_num; int32_t ret; uint16_t i, unprocess_num = 0, nb_after_gro = nb_pkts; @@ -275,7 +274,7 @@ rte_gro_reassemble_burst(struct rte_mbuf **pkts, /* Merge successfully */ nb_after_gro--; else if (ret < 0) - unprocess_pkts[unprocess_num++] = pkts[i]; + pkts[unprocess_num++] = pkts[i]; } else if (IS_IPV4_VXLAN_UDP4_PKT(pkts[i]->packet_type) && do_vxlan_udp_gro) { ret = gro_vxlan_udp4_reassemble(pkts[i], @@ -284,7 +283,7 @@ rte_gro_reassemble_burst(struct rte_mbuf **pkts, /* Merge successfully */ nb_after_gro--; else if (ret < 0) - unprocess_pkts[unprocess_num++] = pkts[i]; + pkts[unprocess_num++] = pkts[i]; } else if (IS_IPV4_TCP_PKT(pkts[i]->packet_type) && do_tcp4_gro) { ret = gro_tcp4_reassemble(pkts[i], &tcp_tbl, 0); @@ -292,7 +291,7 @@ rte_gro_reassemble_burst(struct rte_mbuf **pkts, /* merge successfully */ nb_after_gro--; else if (ret < 0) - unprocess_pkts[unprocess_num++] = pkts[i]; + pkts[unprocess_num++] = pkts[i]; } else if (IS_IPV4_UDP_PKT(pkts[i]->packet_type) && do_udp4_gro) { ret = gro_udp4_reassemble(pkts[i], &udp_tbl, 0); @@ -300,7 +299,7 @@ rte_gro_reassemble_burst(struct rte_mbuf **pkts, /* merge successfully */ nb_after_gro--; else if (ret < 0) - unprocess_pkts[unprocess_num++] = pkts[i]; + pkts[unprocess_num++] = pkts[i]; } else if (IS_IPV6_TCP_PKT(pkts[i]->packet_type) && do_tcp6_gro) { ret = gro_tcp6_reassemble(pkts[i], &tcp6_tbl, 0); @@ -308,21 +307,15 @@ rte_gro_reassemble_burst(struct rte_mbuf **pkts, /* merge successfully */ nb_after_gro--; else if (ret < 0) - unprocess_pkts[unprocess_num++] = pkts[i]; + pkts[unprocess_num++] = pkts[i]; } else - unprocess_pkts[unprocess_num++] = pkts[i]; + pkts[unprocess_num++] = pkts[i]; } if ((nb_after_gro < nb_pkts) || (unprocess_num < nb_pkts)) { - i = 0; - /* Copy unprocessed packets */ - if (unprocess_num > 0) { - memcpy(&pkts[i], unprocess_pkts, - sizeof(struct rte_mbuf *) * - unprocess_num); - i = unprocess_num; - } + + i = unprocess_num; /* Flush all packets from the tables */ if (do_vxlan_tcp_gro) { @@ -360,7 +353,6 @@ rte_gro_reassemble(struct rte_mbuf **pkts, uint16_t nb_pkts, void *ctx) { - struct rte_mbuf *unprocess_pkts[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; @@ -396,33 +388,29 @@ rte_gro_reassemble(struct rte_mbuf **pkts, do_vxlan_tcp_gro) { if (gro_vxlan_tcp4_reassemble(pkts[i], vxlan_tcp_tbl, current_time) < 0) - unprocess_pkts[unprocess_num++] = pkts[i]; + pkts[unprocess_num++] = pkts[i]; } else if (IS_IPV4_VXLAN_UDP4_PKT(pkts[i]->packet_type) && do_vxlan_udp_gro) { if (gro_vxlan_udp4_reassemble(pkts[i], vxlan_udp_tbl, current_time) < 0) - unprocess_pkts[unprocess_num++] = pkts[i]; + pkts[unprocess_num++] = pkts[i]; } else if (IS_IPV4_TCP_PKT(pkts[i]->packet_type) && do_tcp4_gro) { if (gro_tcp4_reassemble(pkts[i], tcp_tbl, current_time) < 0) - unprocess_pkts[unprocess_num++] = pkts[i]; + pkts[unprocess_num++] = pkts[i]; } else if (IS_IPV4_UDP_PKT(pkts[i]->packet_type) && do_udp4_gro) { if (gro_udp4_reassemble(pkts[i], udp_tbl, current_time) < 0) - unprocess_pkts[unprocess_num++] = pkts[i]; + pkts[unprocess_num++] = pkts[i]; } else if (IS_IPV6_TCP_PKT(pkts[i]->packet_type) && do_tcp6_gro) { if (gro_tcp6_reassemble(pkts[i], tcp6_tbl, current_time) < 0) - unprocess_pkts[unprocess_num++] = pkts[i]; + pkts[unprocess_num++] = pkts[i]; } else - unprocess_pkts[unprocess_num++] = pkts[i]; - } - if (unprocess_num > 0) { - memcpy(pkts, unprocess_pkts, sizeof(struct rte_mbuf *) * - unprocess_num); + pkts[unprocess_num++] = pkts[i]; } return unprocess_num; From patchwork Fri Jan 10 20:22:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149796 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0C4FD4605F; Fri, 10 Jan 2025 21:25:10 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 19B6A42D28; Fri, 10 Jan 2025 21:24:17 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id BB210427BA for ; Fri, 10 Jan 2025 21:24:00 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 55971203D5FB; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 55971203D5FB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540639; bh=ecMmGuWmxVplUdVa8H08YmqO+U95G5aJplFvsZ1UTr0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HEqsHDwrQMzQ/nmVFL1jZTrFxAbW+QlfHyVLdBtNpZb9xi1DyPDdsRczurxMpEYL2 6nEvqPTnUXb7suu5yYiRLGC3beJLD8d3UGEwJ5ugHTJpHFNg8kg0F8OkFs5EqTY5Ml YINPSOLOLLeIRQjmuac/lKT+j2n7Ra/QBso3ljlQ= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com Subject: [PATCH v14 10/81] net/ixgbe: remove use of VLAs Date: Fri, 10 Jan 2025 12:22:29 -0800 Message-Id: <1736540620-21764-11-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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: Konstantin Ananyev 1) ../drivers/net/ixgbe/ixgbe_ethdev.c:3556:46: warning: variable length array used [-Wvla] 2) ../drivers/net/ixgbe/ixgbe_ethdev.c:3739:23: warning: variable length array used [-Wvla] 3) ../drivers/net/ixgbe/ixgbe_rxtx_vec_common.h:17:24: warning: variable length array used [-Wvla] For first two cases: in fact ixgbe_xstats_calc_num() always returns constant value, so it should be safe to replace that function invocation just with a macro that performs same calculations. For case #3: reassemble_packets() is invoked only by ixgbe_recv_scattered_burst_vec(). And in turn, ixgbe_recv_scattered_burst_vec() operates only on fixed max amount of packets per call: RTE_IXGBE_MAX_RX_BURST. So, it should be safe to replace VLA with fixed size array. Signed-off-by: Konstantin Ananyev Acked-by: Anatoly Burakov --- drivers/net/ixgbe/ixgbe_ethdev.c | 21 +++++++++++++-------- drivers/net/ixgbe/ixgbe_rxtx_vec_common.h | 4 +++- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 8bee97d191..47b0acd7b1 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -3437,11 +3437,16 @@ ixgbe_dev_stats_reset(struct rte_eth_dev *dev) } /* This function calculates the number of xstats based on the current config */ + +#define IXGBE_XSTATS_CALC_NUM \ + (IXGBE_NB_HW_STATS + IXGBE_NB_MACSEC_STATS + \ + (IXGBE_NB_RXQ_PRIO_STATS * IXGBE_NB_RXQ_PRIO_VALUES) + \ + (IXGBE_NB_TXQ_PRIO_STATS * IXGBE_NB_TXQ_PRIO_VALUES)) + static unsigned -ixgbe_xstats_calc_num(void) { - return IXGBE_NB_HW_STATS + IXGBE_NB_MACSEC_STATS + - (IXGBE_NB_RXQ_PRIO_STATS * IXGBE_NB_RXQ_PRIO_VALUES) + - (IXGBE_NB_TXQ_PRIO_STATS * IXGBE_NB_TXQ_PRIO_VALUES); +ixgbe_xstats_calc_num(void) +{ + return IXGBE_XSTATS_CALC_NUM; } static int ixgbe_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev, @@ -3557,8 +3562,8 @@ static int ixgbe_dev_xstats_get_names_by_id( } uint16_t i; - uint16_t size = ixgbe_xstats_calc_num(); - struct rte_eth_xstat_name xstats_names_copy[size]; + struct rte_eth_xstat_name xstats_names_copy[IXGBE_XSTATS_CALC_NUM]; + const uint16_t size = RTE_DIM(xstats_names_copy); ixgbe_dev_xstats_get_names_by_id(dev, NULL, xstats_names_copy, size); @@ -3740,8 +3745,8 @@ ixgbe_dev_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids, } uint16_t i; - uint16_t size = ixgbe_xstats_calc_num(); - uint64_t values_copy[size]; + uint64_t values_copy[IXGBE_XSTATS_CALC_NUM]; + const uint16_t size = RTE_DIM(values_copy); ixgbe_dev_xstats_get_by_id(dev, NULL, values_copy, size); diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_common.h b/drivers/net/ixgbe/ixgbe_rxtx_vec_common.h index a4d9ec9b08..c1cf0a581a 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx_vec_common.h +++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_common.h @@ -14,11 +14,13 @@ static inline uint16_t reassemble_packets(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_bufs, uint16_t nb_bufs, uint8_t *split_flags) { - struct rte_mbuf *pkts[nb_bufs]; /*finished pkts*/ + struct rte_mbuf *pkts[RTE_IXGBE_MAX_RX_BURST]; /*finished pkts*/ struct rte_mbuf *start = rxq->pkt_first_seg; struct rte_mbuf *end = rxq->pkt_last_seg; unsigned int pkt_idx, buf_idx; + RTE_ASSERT(nb_bufs <= RTE_DIM(pkts)); + for (buf_idx = 0, pkt_idx = 0; buf_idx < nb_bufs; buf_idx++) { if (end != NULL) { /* processing a split packet */ From patchwork Fri Jan 10 20:22:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149798 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1E91E4605F; Fri, 10 Jan 2025 21:25:20 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B93F0427DF; Fri, 10 Jan 2025 21:24:19 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id CA989427BC for ; Fri, 10 Jan 2025 21:24:00 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 61B65203D5FC; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 61B65203D5FC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540639; bh=RlR7Xw9YX7GIGnZJGVEmawiAln6O4vPm0fDuGPsIs7s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ondiNEnX2AwkA2bdnmyaM+iiZWLv2MC10qduLKmFEPC8dtfn59xjUAmbUMpjJs1OA 92PqnbItni5xAX57nI/0MwPbbPkk/4xEm6SuUhWmN5Fa/ew36ZQS3WNP+VD5Rjf30Y /Fy9NHCpPfLOHErxcC36CnikeqxszhTwqUBnPbTQ= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com Subject: [PATCH v14 11/81] net/ice: remove use of VLAs Date: Fri, 10 Jan 2025 12:22:30 -0800 Message-Id: <1736540620-21764-12-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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: Konstantin Ananyev ../drivers/net/ice/ice_rxtx.c:1871:29: warning: variable length array used [-Wvla] Here VLA is used as a temp array for mbufs that will be used as a split RX data buffers. As at any given time only one thread can do RX from particular queue, at rx_queue_setup() we can allocate extra space for that array, and then safely use it at RX fast-path. Signed-off-by: Konstantin Ananyev Acked-by: Anatoly Burakov --- drivers/net/ice/ice_rxtx.c | 18 ++++++++++++------ drivers/net/ice/ice_rxtx.h | 2 ++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c index 0c7106c7e0..578453ec89 100644 --- a/drivers/net/ice/ice_rxtx.c +++ b/drivers/net/ice/ice_rxtx.c @@ -1186,7 +1186,7 @@ ice_rx_queue_setup(struct rte_eth_dev *dev, struct ice_vsi *vsi = pf->main_vsi; struct ice_rx_queue *rxq; const struct rte_memzone *rz; - uint32_t ring_size; + uint32_t ring_size, tlen; uint16_t len; int use_def_burst_func = 1; uint64_t offloads; @@ -1294,9 +1294,14 @@ ice_rx_queue_setup(struct rte_eth_dev *dev, /* always reserve more for bulk alloc */ len = (uint16_t)(nb_desc + ICE_RX_MAX_BURST); + /* allocate extra entries for SW split buffer */ + tlen = ((rxq->offloads & RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT) != 0) ? + rxq->rx_free_thresh : 0; + tlen += len; + /* Allocate the software ring. */ rxq->sw_ring = rte_zmalloc_socket(NULL, - sizeof(struct ice_rx_entry) * len, + sizeof(struct ice_rx_entry) * tlen, RTE_CACHE_LINE_SIZE, socket_id); if (!rxq->sw_ring) { @@ -1305,6 +1310,8 @@ ice_rx_queue_setup(struct rte_eth_dev *dev, return -ENOMEM; } + rxq->sw_split_buf = (tlen == len) ? NULL : rxq->sw_ring + len; + ice_reset_rx_queue(rxq); rxq->q_set = true; dev->data->rx_queues[queue_idx] = rxq; @@ -1883,7 +1890,6 @@ 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]; /* Allocate buffers in bulk */ alloc_idx = (uint16_t)(rxq->rx_free_trigger - @@ -1898,7 +1904,7 @@ ice_rx_alloc_bufs(struct ice_rx_queue *rxq) if (rxq->offloads & RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT) { diag_pay = rte_mempool_get_bulk(rxq->rxseg[1].mp, - (void *)mbufs_pay, rxq->rx_free_thresh); + (void *)rxq->sw_split_buf, rxq->rx_free_thresh); if (unlikely(diag_pay != 0)) { PMD_RX_LOG(ERR, "Failed to get payload mbufs in bulk"); return -ENOMEM; @@ -1923,8 +1929,8 @@ ice_rx_alloc_bufs(struct ice_rx_queue *rxq) rxdp[i].read.hdr_addr = 0; rxdp[i].read.pkt_addr = dma_addr; } else { - mb->next = mbufs_pay[i]; - pay_addr = rte_cpu_to_le_64(rte_mbuf_data_iova_default(mbufs_pay[i])); + mb->next = rxq->sw_split_buf[i].mbuf; + pay_addr = rte_cpu_to_le_64(rte_mbuf_data_iova_default(mb->next)); rxdp[i].read.hdr_addr = dma_addr; rxdp[i].read.pkt_addr = pay_addr; } diff --git a/drivers/net/ice/ice_rxtx.h b/drivers/net/ice/ice_rxtx.h index 45f25b3609..20ee325c2b 100644 --- a/drivers/net/ice/ice_rxtx.h +++ b/drivers/net/ice/ice_rxtx.h @@ -139,6 +139,8 @@ struct ice_rx_queue { uint32_t hw_time_high; /* high 32 bits of timestamp */ uint32_t hw_time_low; /* low 32 bits of timestamp */ uint64_t hw_time_update; /* SW time of HW record updating */ + struct ice_rx_entry *sw_split_buf; + /* address of temp buffer for RX split mbufs */ struct rte_eth_rxseg_split rxseg[ICE_RX_MAX_NSEG]; uint32_t rxseg_nb; bool ts_enable; /* if rxq timestamp is enabled */ From patchwork Fri Jan 10 20:22:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149794 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CE5224605F; Fri, 10 Jan 2025 21:24:58 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C0BA442831; Fri, 10 Jan 2025 21:24:14 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id A8382427BB for ; Fri, 10 Jan 2025 21:24:00 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 6E686203D5FD; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 6E686203D5FD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540639; bh=LJVAKkd3+L3dmk9WC54nXaDtiecrV95+6dZjEXp9ylY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kG2JaTx4UN73oJtg8UrMyURvuiQl8jiPPnoFUtVG1VdUx22OXpPuJlGmwRVlIZuP8 HMQpMyAp9yJoaba6PPuWwYD2avxlBXdQ5cqi3X93SWvMol9FAwREmUsplnnrCjYWPC XwCFAeDEfiN3Uy0DK8KXKcys4EGcLz1ieSISHdak= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Tyler Retzlaff Subject: [PATCH v14 12/81] app/testpmd: remove use of VLAs for Windows built Date: Fri, 10 Jan 2025 12:22:31 -0800 Message-Id: <1736540620-21764-13-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 Acked-by: Chengwen Feng --- app/test-pmd/cmdline.c | 2 +- app/test-pmd/cmdline_flow.c | 15 ++++++++++----- app/test-pmd/config.c | 16 +++++++++------- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 7e0666e9f6..2897e44c34 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -13274,7 +13274,7 @@ cmd_set_port_ptypes_parsed( return; } - uint32_t ptypes[ret]; + uint32_t *ptypes = alloca(sizeof(uint32_t) * ret); ret = rte_eth_dev_set_ptypes(port_id, ptype_mask, ptypes, ret); if (ret < 0) { diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 9e4fc2d95d..e1720e54d7 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -11707,8 +11707,7 @@ parse_hex(struct context *ctx, const struct token *token, char tmp[16]; /* Ought to be enough. */ int ret; unsigned int hexlen = len; - unsigned int length = 256; - uint8_t hex_tmp[length]; + uint8_t hex_tmp[256]; /* Arguments are expected. */ if (!arg_data) @@ -11735,7 +11734,7 @@ parse_hex(struct context *ctx, const struct token *token, str += 2; hexlen -= 2; } - if (hexlen > length) + if (hexlen > RTE_DIM(hex_tmp)) goto error; ret = parse_hex_string(str, hex_tmp, &hexlen); if (ret < 0) @@ -11868,10 +11867,13 @@ parse_ipv4_addr(struct context *ctx, const struct token *token, void *buf, unsigned int size) { const struct arg *arg = pop_args(ctx); - char str2[len + 1]; + char str2[INET_ADDRSTRLEN]; struct in_addr tmp; int ret; + /* Length is longer than the max length an IPv4 address can have. */ + if (len >= INET_ADDRSTRLEN) + return -1; /* Argument is expected. */ if (!arg) return -1; @@ -11914,11 +11916,14 @@ parse_ipv6_addr(struct context *ctx, const struct token *token, void *buf, unsigned int size) { const struct arg *arg = pop_args(ctx); - char str2[len + 1]; + char str2[INET6_ADDRSTRLEN]; struct rte_ipv6_addr tmp; int ret; (void)token; + /* Length is longer than the max length an IPv6 address can have. */ + if (len >= INET6_ADDRSTRLEN) + return -1; /* Argument is expected. */ if (!arg) return -1; diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 4e7fb69183..b19df95321 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -1802,7 +1802,8 @@ port_flow_configure(portid_t port_id, { struct rte_port *port; struct rte_flow_error error; - const struct rte_flow_queue_attr *attr_list[nb_queue]; + const struct rte_flow_queue_attr **attr_list = + alloca(sizeof(struct rte_flow_queue_attr *) * nb_queue); int std_queue; if (port_id_is_invalid(port_id, ENABLED_WARN) || @@ -2616,10 +2617,10 @@ port_flow_template_table_create(portid_t port_id, uint32_t id, int ret; uint32_t i; struct rte_flow_error error; - struct rte_flow_pattern_template - *flow_pattern_templates[nb_pattern_templates]; - struct rte_flow_actions_template - *flow_actions_templates[nb_actions_templates]; + struct rte_flow_pattern_template **flow_pattern_templates = + alloca(sizeof(struct rte_flow_pattern_template *) * nb_pattern_templates); + struct rte_flow_actions_template **flow_actions_templates = + alloca(sizeof(struct rte_flow_actions_template *) * nb_actions_templates); if (port_id_is_invalid(port_id, ENABLED_WARN) || port_id == (portid_t)RTE_PORT_ALL) @@ -5551,7 +5552,7 @@ parse_port_list(const char *list, unsigned int *values, unsigned int maxsize) char *end = NULL; int min, max; int value, i; - unsigned int marked[maxsize]; + unsigned int *marked = alloca(sizeof(unsigned int) * maxsize); if (list == NULL || values == NULL) return 0; @@ -7292,7 +7293,8 @@ show_macs(portid_t port_id) if (eth_dev_info_get_print_err(port_id, &dev_info)) return; - struct rte_ether_addr addr[dev_info.max_mac_addrs]; + struct rte_ether_addr *addr = + alloca(sizeof(struct rte_ether_addr) * dev_info.max_mac_addrs); rc = rte_eth_macaddrs_get(port_id, addr, dev_info.max_mac_addrs); if (rc < 0) return; From patchwork Fri Jan 10 20:22:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149800 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B0BCE4605F; Fri, 10 Jan 2025 21:25:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 084BA42D7A; Fri, 10 Jan 2025 21:24:22 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id D657E427BE for ; Fri, 10 Jan 2025 21:24:00 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 7A7FF203D5FE; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 7A7FF203D5FE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540639; bh=zEXN4InTBFAGJTUYxQiqKFWoXLm97N1B43FoPBUYEFQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XO4aifrd2CHvL5EoNVUFC3lGojT2pn6kHdnXIY2ag2qXpYRHPkA9AcyXTf3lBcM+y qHqHt3YBA5osRb0XBOLdfaly5facQo1/oX9rACsuqKuB/p62nkRlft7RZ7zGHRZGUa xTuznaXgVq12MfCTL7JZbxFiIOKQE9j7fB9yBFV8= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Tyler Retzlaff Subject: [PATCH v14 13/81] test: remove use of VLAs for Windows built code Date: Fri, 10 Jan 2025 12:22:32 -0800 Message-Id: <1736540620-21764-14-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 Acked-by: Chengwen Feng --- app/test/test.c | 2 +- app/test/test_cmdline_string.c | 2 +- app/test/test_cryptodev.c | 34 +++++++++---------- app/test/test_cryptodev_blockcipher.c | 4 +-- app/test/test_cryptodev_crosscheck.c | 2 +- app/test/test_dmadev.c | 9 +++-- app/test/test_hash.c | 14 ++++---- app/test/test_mempool.c | 25 +++++++------- app/test/test_reorder.c | 48 +++++++++++++++------------ app/test/test_service_cores.c | 9 +++-- app/test/test_thash.c | 7 ++-- 11 files changed, 82 insertions(+), 74 deletions(-) diff --git a/app/test/test.c b/app/test/test.c index 680351f6a3..fd653cbbfd 100644 --- a/app/test/test.c +++ b/app/test/test.c @@ -105,7 +105,7 @@ int main(int argc, char **argv) { struct cmdline *cl; - char *tests[argc]; /* store an array of tests to run */ + char **tests = alloca(sizeof(char *) * argc); /* store an array of tests to run */ int test_count = 0; int i; char *extra_args; diff --git a/app/test/test_cmdline_string.c b/app/test/test_cmdline_string.c index 97516c9400..e1cf86020f 100644 --- a/app/test/test_cmdline_string.c +++ b/app/test/test_cmdline_string.c @@ -40,7 +40,7 @@ struct string_elt_str string_elt_strs[] = { #if (CMDLINE_TEST_BUFSIZE < STR_TOKEN_SIZE) \ || (CMDLINE_TEST_BUFSIZE < STR_MULTI_TOKEN_SIZE) #undef CMDLINE_TEST_BUFSIZE -#define CMDLINE_TEST_BUFSIZE RTE_MAX(STR_TOKEN_SIZE, STR_MULTI_TOKEN_SIZE) +#define CMDLINE_TEST_BUFSIZE RTE_MAX_T(STR_TOKEN_SIZE, STR_MULTI_TOKEN_SIZE, size_t) #endif struct string_nb_str { diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index a33ef574cc..c05d377f0f 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -2886,7 +2886,7 @@ create_wireless_algo_hash_session(uint8_t dev_id, enum rte_crypto_auth_operation op, enum rte_crypto_auth_algorithm algo) { - uint8_t hash_key[key_len]; + uint8_t *hash_key = alloca(key_len); struct crypto_testsuite_params *ts_params = &testsuite_params; struct crypto_unittest_params *ut_params = &unittest_params; @@ -2922,7 +2922,7 @@ create_wireless_algo_cipher_session(uint8_t dev_id, const uint8_t *key, const uint8_t key_len, uint8_t iv_len) { - uint8_t cipher_key[key_len]; + uint8_t *cipher_key = alloca(key_len); struct crypto_testsuite_params *ts_params = &testsuite_params; struct crypto_unittest_params *ut_params = &unittest_params; @@ -3074,7 +3074,7 @@ create_wireless_cipher_auth_session(uint8_t dev_id, const struct wireless_test_data *tdata) { const uint8_t key_len = tdata->key.len; - uint8_t cipher_auth_key[key_len]; + uint8_t *cipher_auth_key = alloca(key_len); struct crypto_testsuite_params *ts_params = &testsuite_params; struct crypto_unittest_params *ut_params = &unittest_params; @@ -9078,7 +9078,7 @@ create_aead_session(uint8_t dev_id, enum rte_crypto_aead_algorithm algo, const uint16_t aad_len, const uint8_t auth_len, uint8_t iv_len) { - uint8_t aead_key[key_len]; + uint8_t *aead_key = alloca(key_len); struct crypto_testsuite_params *ts_params = &testsuite_params; struct crypto_unittest_params *ut_params = &unittest_params; @@ -12989,7 +12989,7 @@ test_cryptodev_error_recover_helper(uint8_t dev_id, const void *test_data, bool struct crypto_testsuite_params *ts_params = &testsuite_params; struct crypto_unittest_params *ut_params = &unittest_params; const struct blockcipher_test_data *tdata = test_data; - uint8_t cipher_key[tdata->cipher_key.len]; + uint8_t *cipher_key = alloca(tdata->cipher_key.len); struct rte_crypto_sym_op *sym_op = NULL; struct rte_crypto_op *op = NULL; char *dst; @@ -13343,7 +13343,7 @@ static int test_AES_GCM_auth_encryption_fail_aad_corrupt(void) { struct aead_test_data tdata; - uint8_t aad[gcm_test_case_7.aad.len]; + uint8_t *aad = alloca(gcm_test_case_7.aad.len); int res; RTE_LOG(INFO, USER1, "This is a negative test, errors are expected\n"); @@ -13732,7 +13732,7 @@ static int test_AES_GCM_auth_decryption_fail_aad_corrupt(void) { struct aead_test_data tdata; - uint8_t aad[gcm_test_case_7.aad.len]; + uint8_t *aad = alloca(gcm_test_case_7.aad.len); int res; memcpy(&tdata, &gcm_test_case_7, sizeof(struct aead_test_data)); @@ -13984,7 +13984,7 @@ test_authenticated_encryption_sessionless( int retval; uint8_t *ciphertext, *auth_tag; uint16_t plaintext_pad_len; - uint8_t key[tdata->key.len + 1]; + uint8_t *key = alloca(tdata->key.len + 1); struct rte_cryptodev_info dev_info; rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); @@ -14086,7 +14086,7 @@ test_authenticated_decryption_sessionless( int retval; uint8_t *plaintext; - uint8_t key[tdata->key.len + 1]; + uint8_t *key = alloca(tdata->key.len + 1); struct rte_cryptodev_info dev_info; rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); @@ -15479,7 +15479,7 @@ static int create_gmac_session(uint8_t dev_id, const struct gmac_test_data *tdata, enum rte_crypto_auth_operation auth_op) { - uint8_t auth_key[tdata->key.len]; + uint8_t *auth_key = alloca(tdata->key.len); struct crypto_testsuite_params *ts_params = &testsuite_params; struct crypto_unittest_params *ut_params = &unittest_params; @@ -16136,7 +16136,7 @@ create_auth_session(struct crypto_unittest_params *ut_params, enum rte_crypto_auth_operation auth_op) { struct crypto_testsuite_params *ts_params = &testsuite_params; - uint8_t auth_key[reference->auth_key.len + 1]; + uint8_t *auth_key = alloca(reference->auth_key.len + 1); memcpy(auth_key, reference->auth_key.data, reference->auth_key.len); @@ -16167,8 +16167,8 @@ create_auth_cipher_session(struct crypto_unittest_params *ut_params, enum rte_crypto_cipher_operation cipher_op) { struct crypto_testsuite_params *ts_params = &testsuite_params; - uint8_t cipher_key[reference->cipher_key.len + 1]; - uint8_t auth_key[reference->auth_key.len + 1]; + uint8_t *cipher_key = alloca(reference->cipher_key.len + 1); + uint8_t *auth_key = alloca(reference->auth_key.len + 1); memcpy(cipher_key, reference->cipher_key.data, reference->cipher_key.len); @@ -16668,8 +16668,8 @@ test_authenticated_encrypt_with_esn( uint8_t *authciphertext, *plaintext, *auth_tag; uint16_t plaintext_pad_len; - uint8_t cipher_key[reference->cipher_key.len + 1]; - uint8_t auth_key[reference->auth_key.len + 1]; + uint8_t *cipher_key = alloca(reference->cipher_key.len + 1); + uint8_t *auth_key = alloca(reference->auth_key.len + 1); struct rte_cryptodev_info dev_info; rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); @@ -16800,8 +16800,8 @@ test_authenticated_decrypt_with_esn( int retval; uint8_t *ciphertext; - uint8_t cipher_key[reference->cipher_key.len + 1]; - uint8_t auth_key[reference->auth_key.len + 1]; + uint8_t *cipher_key = alloca(reference->cipher_key.len + 1); + uint8_t *auth_key = alloca(reference->auth_key.len + 1); struct rte_cryptodev_info dev_info; rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); diff --git a/app/test/test_cryptodev_blockcipher.c b/app/test/test_cryptodev_blockcipher.c index 8e13cdfc7a..5a124bbb5e 100644 --- a/app/test/test_cryptodev_blockcipher.c +++ b/app/test/test_cryptodev_blockcipher.c @@ -85,8 +85,8 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t, int status = TEST_SUCCESS; const struct blockcipher_test_data *tdata = t->test_data; - uint8_t cipher_key[tdata->cipher_key.len]; - uint8_t auth_key[tdata->auth_key.len]; + uint8_t *cipher_key = alloca(tdata->cipher_key.len); + uint8_t *auth_key = alloca(tdata->auth_key.len); uint32_t buf_len = tdata->ciphertext.len; uint32_t digest_len = tdata->digest.len; char *buf_p = NULL; diff --git a/app/test/test_cryptodev_crosscheck.c b/app/test/test_cryptodev_crosscheck.c index c29b19cf6b..b9a53a430c 100644 --- a/app/test/test_cryptodev_crosscheck.c +++ b/app/test/test_cryptodev_crosscheck.c @@ -894,7 +894,7 @@ static int crosscheck_with_profile_run(const struct crosscheck_test_profile *profile) { struct crosscheck_testsuite_params *ts_params = &testsuite_params; - uint8_t input_text[profile->input_buf_len]; + uint8_t *input_text = alloca(profile->input_buf_len); uint16_t output_len, encrypted_len; uint8_t encrypted_text[MBUF_SIZE]; uint8_t output_text[MBUF_SIZE]; diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c index 143e1bcd68..9cbb9a6552 100644 --- a/app/test/test_dmadev.c +++ b/app/test/test_dmadev.c @@ -417,9 +417,12 @@ test_enqueue_sg_copies(int16_t dev_id, uint16_t vchan) dst_len = len / n_dst; src_len = len / n_src; - struct rte_dma_sge sg_src[n_sge], sg_dst[n_sge]; - struct rte_mbuf *src[n_sge], *dst[n_sge]; - char *src_data[n_sge], *dst_data[n_sge]; + struct rte_dma_sge *sg_src = alloca(sizeof(struct rte_dma_sge) * n_sge); + struct rte_dma_sge *sg_dst = alloca(sizeof(struct rte_dma_sge) * n_sge); + struct rte_mbuf **src = alloca(sizeof(struct rte_mbuf *) * n_sge); + struct rte_mbuf **dst = alloca(sizeof(struct rte_mbuf *) * n_sge); + char **src_data = alloca(sizeof(char *) * n_sge); + char **dst_data = alloca(sizeof(char *) * n_sge); for (i = 0 ; i < len; i++) orig_src[i] = rte_rand() & 0xFF; diff --git a/app/test/test_hash.c b/app/test/test_hash.c index 65b9cad93c..16e63d2926 100644 --- a/app/test/test_hash.c +++ b/app/test/test_hash.c @@ -1947,6 +1947,8 @@ test_hash_rcu_qsbr_add(void) return 0; } +#define HASH_RCU_QSBR_MAX_TOTAL_ENTRIES 9 + /* * rte_hash_rcu_qsbr_add DQ mode functional test. * Reader and writer are in the same thread in this test. @@ -1966,7 +1968,7 @@ test_hash_rcu_qsbr_add(void) static int test_hash_rcu_qsbr_dq_mode(uint8_t ext_bkt) { - uint32_t total_entries = (ext_bkt == 0) ? 8 : 9; + const uint32_t total_entries = (ext_bkt == 0) ? 8 : HASH_RCU_QSBR_MAX_TOTAL_ENTRIES; uint8_t hash_extra_flag = RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF; @@ -1982,8 +1984,8 @@ test_hash_rcu_qsbr_dq_mode(uint8_t ext_bkt) .socket_id = 0, .extra_flag = hash_extra_flag, }; - int pos[total_entries]; - int expected_pos[total_entries]; + int pos[HASH_RCU_QSBR_MAX_TOTAL_ENTRIES]; + int expected_pos[HASH_RCU_QSBR_MAX_TOTAL_ENTRIES]; unsigned int i; size_t sz; int32_t status; @@ -2136,7 +2138,7 @@ test_hash_rcu_qsbr_reader(void *arg) static int test_hash_rcu_qsbr_sync_mode(uint8_t ext_bkt) { - uint32_t total_entries = (ext_bkt == 0) ? 8 : 9; + const uint32_t total_entries = (ext_bkt == 0) ? 8 : HASH_RCU_QSBR_MAX_TOTAL_ENTRIES; uint8_t hash_extra_flag = RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF; @@ -2152,8 +2154,8 @@ test_hash_rcu_qsbr_sync_mode(uint8_t ext_bkt) .socket_id = 0, .extra_flag = hash_extra_flag, }; - int pos[total_entries]; - int expected_pos[total_entries]; + int pos[HASH_RCU_QSBR_MAX_TOTAL_ENTRIES]; + int expected_pos[HASH_RCU_QSBR_MAX_TOTAL_ENTRIES]; unsigned int i; size_t sz; int32_t status; diff --git a/app/test/test_mempool.c b/app/test/test_mempool.c index 3f7ba5872d..61385e096e 100644 --- a/app/test/test_mempool.c +++ b/app/test/test_mempool.c @@ -515,19 +515,20 @@ test_mempool_events(int (*populate)(struct rte_mempool *mp)) #undef RTE_TEST_TRACE_FAILURE #define RTE_TEST_TRACE_FAILURE(...) do { goto fail; } while (0) - static const size_t callback_num = 3; - static const size_t mempool_num = 2; +#define CALLBACK_NUM 3u +#define MEMPOOL_NUM 2u + static const unsigned int mempool_elt_size = 64; static const unsigned int mempool_size = 64; - struct test_mempool_events_data data[callback_num]; - struct rte_mempool *mp[mempool_num], *freed; + struct test_mempool_events_data data[CALLBACK_NUM]; + struct rte_mempool *mp[MEMPOOL_NUM], *freed; char name[RTE_MEMPOOL_NAMESIZE]; size_t i, j; int ret; memset(mp, 0, sizeof(mp)); - for (i = 0; i < callback_num; i++) { + for (i = 0; i < CALLBACK_NUM; i++) { ret = rte_mempool_event_callback_register (test_mempool_events_cb, &data[i]); RTE_TEST_ASSERT_EQUAL(ret, 0, "Failed to register the callback %zu: %s", @@ -548,7 +549,7 @@ test_mempool_events(int (*populate)(struct rte_mempool *mp)) SOCKET_ID_ANY, 0); RTE_TEST_ASSERT_NOT_NULL(mp[0], "Cannot create mempool %s: %s", name, rte_strerror(rte_errno)); - for (j = 0; j < callback_num; j++) + for (j = 0; j < CALLBACK_NUM; j++) RTE_TEST_ASSERT_EQUAL(data[j].invoked, false, "Callback %zu invoked on %s mempool creation", j, name); @@ -557,7 +558,7 @@ test_mempool_events(int (*populate)(struct rte_mempool *mp)) ret = populate(mp[0]); RTE_TEST_ASSERT_EQUAL(ret, (int)mp[0]->size, "Failed to populate mempool %s: %s", name, rte_strerror(-ret)); - for (j = 0; j < callback_num; j++) { + for (j = 0; j < CALLBACK_NUM; j++) { RTE_TEST_ASSERT_EQUAL(data[j].invoked, true, "Callback %zu not invoked on mempool %s population", j, name); @@ -589,7 +590,7 @@ test_mempool_events(int (*populate)(struct rte_mempool *mp)) "Unregistered callback 0 invoked on %s mempool populaton", name); - for (i = 0; i < mempool_num; i++) { + for (i = 0; i < MEMPOOL_NUM; i++) { memset(&data, 0, sizeof(data)); sprintf(name, "empty%zu", i); rte_mempool_free(mp[i]); @@ -599,7 +600,7 @@ test_mempool_events(int (*populate)(struct rte_mempool *mp)) */ freed = mp[i]; mp[i] = NULL; - for (j = 1; j < callback_num; j++) { + for (j = 1; j < CALLBACK_NUM; j++) { RTE_TEST_ASSERT_EQUAL(data[j].invoked, true, "Callback %zu not invoked on mempool %s destruction", j, name); @@ -615,7 +616,7 @@ test_mempool_events(int (*populate)(struct rte_mempool *mp)) name); } - for (j = 1; j < callback_num; j++) { + for (j = 1; j < CALLBACK_NUM; j++) { ret = rte_mempool_event_callback_unregister (test_mempool_events_cb, &data[j]); RTE_TEST_ASSERT_EQUAL(ret, 0, "Failed to unregister the callback %zu: %s", @@ -624,10 +625,10 @@ test_mempool_events(int (*populate)(struct rte_mempool *mp)) return TEST_SUCCESS; fail: - for (j = 0; j < callback_num; j++) + for (j = 0; j < CALLBACK_NUM; j++) rte_mempool_event_callback_unregister (test_mempool_events_cb, &data[j]); - for (i = 0; i < mempool_num; i++) + for (i = 0; i < MEMPOOL_NUM; i++) rte_mempool_free(mp[i]); return TEST_FAILED; diff --git a/app/test/test_reorder.c b/app/test/test_reorder.c index 501780cb26..aaa2c57086 100644 --- a/app/test/test_reorder.c +++ b/app/test/test_reorder.c @@ -130,11 +130,12 @@ test_reorder_free(void) static int test_reorder_insert(void) { +#define INSERT_NUM_BUFS 7u + struct rte_reorder_buffer *b = NULL; struct rte_mempool *p = test_params->p; const unsigned int size = 4; - const unsigned int num_bufs = 7; - struct rte_mbuf *bufs[num_bufs]; + struct rte_mbuf *bufs[INSERT_NUM_BUFS]; int ret = 0; unsigned i; @@ -146,7 +147,7 @@ test_reorder_insert(void) b = rte_reorder_create("test_insert", rte_socket_id(), size); TEST_ASSERT_NOT_NULL(b, "Failed to create reorder buffer"); - for (i = 0; i < num_bufs; i++) { + for (i = 0; i < INSERT_NUM_BUFS; i++) { bufs[i] = rte_pktmbuf_alloc(p); TEST_ASSERT_NOT_NULL(bufs[i], "Packet allocation failed\n"); *rte_reorder_seqn(bufs[i]) = i; @@ -207,26 +208,27 @@ test_reorder_insert(void) ret = 0; exit: rte_reorder_free(b); - for (i = 0; i < num_bufs; i++) { + for (i = 0; i < INSERT_NUM_BUFS; i++) rte_pktmbuf_free(bufs[i]); - } + return ret; } static int test_reorder_drain(void) { +#define DRAIN_NUM_BUFS 8u + struct rte_reorder_buffer *b = NULL; struct rte_mempool *p = test_params->p; const unsigned int size = 4; - const unsigned int num_bufs = 8; - struct rte_mbuf *bufs[num_bufs]; - struct rte_mbuf *robufs[num_bufs]; + struct rte_mbuf *bufs[DRAIN_NUM_BUFS]; + struct rte_mbuf *robufs[DRAIN_NUM_BUFS]; int ret = 0; unsigned i, cnt; /* initialize all robufs to NULL */ - for (i = 0; i < num_bufs; i++) + for (i = 0; i < DRAIN_NUM_BUFS; i++) robufs[i] = NULL; /* This would create a reorder buffer instance consisting of: @@ -246,7 +248,7 @@ test_reorder_drain(void) goto exit; } - for (i = 0; i < num_bufs; i++) { + for (i = 0; i < DRAIN_NUM_BUFS; i++) { bufs[i] = rte_pktmbuf_alloc(p); TEST_ASSERT_NOT_NULL(bufs[i], "Packet allocation failed\n"); *rte_reorder_seqn(bufs[i]) = i; @@ -320,7 +322,7 @@ test_reorder_drain(void) ret = 0; exit: rte_reorder_free(b); - for (i = 0; i < num_bufs; i++) { + for (i = 0; i < DRAIN_NUM_BUFS; i++) { rte_pktmbuf_free(bufs[i]); rte_pktmbuf_free(robufs[i]); } @@ -337,15 +339,16 @@ buffer_to_reorder_move(struct rte_mbuf **mbuf, struct rte_reorder_buffer *b) static int test_reorder_drain_up_to_seqn(void) { +#define DRAIN_TO_NUM_BUFS 10u + struct rte_mempool *p = test_params->p; struct rte_reorder_buffer *b = NULL; - const unsigned int num_bufs = 10; const unsigned int size = 4; unsigned int i, cnt; int ret = 0; - struct rte_mbuf *bufs[num_bufs]; - struct rte_mbuf *robufs[num_bufs]; + struct rte_mbuf *bufs[DRAIN_TO_NUM_BUFS]; + struct rte_mbuf *robufs[DRAIN_TO_NUM_BUFS]; /* initialize all robufs to NULL */ memset(robufs, 0, sizeof(robufs)); @@ -358,7 +361,7 @@ test_reorder_drain_up_to_seqn(void) b = rte_reorder_create("test_drain_up_to_seqn", rte_socket_id(), size); TEST_ASSERT_NOT_NULL(b, "Failed to create reorder buffer"); - for (i = 0; i < num_bufs; i++) { + for (i = 0; i < DRAIN_TO_NUM_BUFS; i++) { bufs[i] = rte_pktmbuf_alloc(p); TEST_ASSERT_NOT_NULL(bufs[i], "Packet allocation failed\n"); *rte_reorder_seqn(bufs[i]) = i; @@ -372,7 +375,7 @@ test_reorder_drain_up_to_seqn(void) buffer_to_reorder_move(&bufs[2], b); buffer_to_reorder_move(&bufs[3], b); /* Draining 1, 2 */ - cnt = rte_reorder_drain_up_to_seqn(b, robufs, num_bufs, 3); + cnt = rte_reorder_drain_up_to_seqn(b, robufs, DRAIN_TO_NUM_BUFS, 3); if (cnt != 2) { printf("%s:%d:%d: number of expected packets not drained\n", __func__, __LINE__, cnt); @@ -396,7 +399,7 @@ test_reorder_drain_up_to_seqn(void) buffer_to_reorder_move(&bufs[8], b); /* Drain 3 and 5 */ - cnt = rte_reorder_drain_up_to_seqn(b, robufs, num_bufs, 6); + cnt = rte_reorder_drain_up_to_seqn(b, robufs, DRAIN_TO_NUM_BUFS, 6); if (cnt != 2) { printf("%s:%d:%d: number of expected packets not drained\n", __func__, __LINE__, cnt); @@ -410,7 +413,7 @@ test_reorder_drain_up_to_seqn(void) ret = 0; exit: rte_reorder_free(b); - for (i = 0; i < num_bufs; i++) { + for (i = 0; i < DRAIN_TO_NUM_BUFS; i++) { rte_pktmbuf_free(bufs[i]); rte_pktmbuf_free(robufs[i]); } @@ -420,14 +423,15 @@ test_reorder_drain_up_to_seqn(void) static int test_reorder_set_seqn(void) { +#define SET_SEQN_NUM_BUFS 7u + struct rte_mempool *p = test_params->p; struct rte_reorder_buffer *b = NULL; - const unsigned int num_bufs = 7; const unsigned int size = 4; unsigned int i; int ret = 0; - struct rte_mbuf *bufs[num_bufs]; + struct rte_mbuf *bufs[SET_SEQN_NUM_BUFS]; /* This would create a reorder buffer instance consisting of: * reorder_seq = 0 @@ -437,7 +441,7 @@ test_reorder_set_seqn(void) b = rte_reorder_create("test_min_seqn_set", rte_socket_id(), size); TEST_ASSERT_NOT_NULL(b, "Failed to create reorder buffer"); - for (i = 0; i < num_bufs; i++) { + for (i = 0; i < SET_SEQN_NUM_BUFS; i++) { bufs[i] = rte_pktmbuf_alloc(p); if (bufs[i] == NULL) { printf("Packet allocation failed\n"); @@ -479,7 +483,7 @@ test_reorder_set_seqn(void) ret = 0; exit: rte_reorder_free(b); - for (i = 0; i < num_bufs; i++) + for (i = 0; i < SET_SEQN_NUM_BUFS; i++) rte_pktmbuf_free(bufs[i]); return ret; diff --git a/app/test/test_service_cores.c b/app/test/test_service_cores.c index 46ed9a1868..d95a71f80b 100644 --- a/app/test/test_service_cores.c +++ b/app/test/test_service_cores.c @@ -603,9 +603,8 @@ service_lcore_add_del(void) "Service core count not equal to one"); /* retrieve core list, checking lcore ids */ - const uint32_t size = 4; - uint32_t service_core_ids[size]; - int32_t n = rte_service_lcore_list(service_core_ids, size); + uint32_t service_core_ids[4]; + int32_t n = rte_service_lcore_list(service_core_ids, RTE_DIM(service_core_ids)); TEST_ASSERT_EQUAL(1, n, "Service core list return should equal 1"); TEST_ASSERT_EQUAL(slcore_id, service_core_ids[0], "Service core list lcore must equal slcore_id"); @@ -631,7 +630,7 @@ service_lcore_add_del(void) cores_at_this_point); /* check longer service core list */ - n = rte_service_lcore_list(service_core_ids, size); + n = rte_service_lcore_list(service_core_ids, RTE_DIM(service_core_ids)); TEST_ASSERT_EQUAL(3, n, "Service core list return should equal 3"); TEST_ASSERT_EQUAL(slcore_id, service_core_ids[0], "Service core list[0] lcore must equal 1"); @@ -649,7 +648,7 @@ service_lcore_add_del(void) "Service core add did not return zero"); TEST_ASSERT_EQUAL(1, rte_service_lcore_count(), "Service core count not equal to one"); - n = rte_service_lcore_list(service_core_ids, size); + n = rte_service_lcore_list(service_core_ids, RTE_DIM(service_core_ids)); TEST_ASSERT_EQUAL(1, n, "Service core list return should equal one"); TEST_ASSERT_EQUAL(slcore_id, service_core_ids[0], "Service core list[0] lcore must equal %d", diff --git a/app/test/test_thash.c b/app/test/test_thash.c index b9c6e9118e..33b0c6adac 100644 --- a/app/test/test_thash.c +++ b/app/test/test_thash.c @@ -565,9 +565,8 @@ test_predictable_rss_min_seq(void) { struct rte_thash_ctx *ctx; struct rte_thash_subtuple_helper *h; - const int key_len = 40; int reta_sz = 6; - uint8_t initial_key[key_len]; + uint8_t initial_key[40]; const uint8_t *new_key; int ret; union rte_thash_tuple tuple; @@ -575,9 +574,9 @@ test_predictable_rss_min_seq(void) unsigned int desired_value = 27 & HASH_MSK(reta_sz); uint16_t port_value = 22; - memset(initial_key, 0, key_len); + memset(initial_key, 0, RTE_DIM(initial_key)); - ctx = rte_thash_init_ctx("test", key_len, reta_sz, initial_key, + ctx = rte_thash_init_ctx("test", RTE_DIM(initial_key), reta_sz, initial_key, RTE_THASH_MINIMAL_SEQ); RTE_TEST_ASSERT(ctx != NULL, "can not create thash ctx\n"); From patchwork Fri Jan 10 20:22:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149795 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 791424605F; Fri, 10 Jan 2025 21:25:04 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E27E342D0C; Fri, 10 Jan 2025 21:24:15 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id D8812427BF for ; Fri, 10 Jan 2025 21:24:00 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 8700D203D5FF; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 8700D203D5FF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540639; bh=4igggFiLZfdv/kFvlIrPm9QlQVeLfICba0Q0TtP5U7U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cssVbAOeHeRl5AjwkKjeSP4KEdNkse80AeTkm6ywPVeI8TxvUIbhZlhy8X/xQLdNK woVtr6EnOAA6sA1rnVIteShCLbcFjWlntSMxXAwt2YpWBHQ2b98xouxwC0PJ4wo7wj 9UlLc31cwgH+KD5DnLItzFNuFGb4XxAPlTPdU3lQ= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Tyler Retzlaff Subject: [PATCH v14 14/81] common/idpf: remove use of VLAs for Windows built code Date: Fri, 10 Jan 2025 12:22:33 -0800 Message-Id: <1736540620-21764-15-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 Acked-by: Bruce Richardson --- drivers/common/idpf/idpf_common_rxtx.c | 2 +- drivers/common/idpf/idpf_common_rxtx_avx512.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/common/idpf/idpf_common_rxtx.c b/drivers/common/idpf/idpf_common_rxtx.c index a04e54ce26..e04ab40fa2 100644 --- a/drivers/common/idpf/idpf_common_rxtx.c +++ b/drivers/common/idpf/idpf_common_rxtx.c @@ -569,7 +569,7 @@ idpf_split_rx_bufq_refill(struct idpf_rx_queue *rx_bufq) uint16_t nb_refill = rx_bufq->rx_free_thresh; uint16_t nb_desc = rx_bufq->nb_rx_desc; uint16_t next_avail = rx_bufq->rx_tail; - struct rte_mbuf *nmb[rx_bufq->rx_free_thresh]; + struct rte_mbuf **nmb = alloca(sizeof(struct rte_mbuf *) * rx_bufq->rx_free_thresh); uint64_t dma_addr; uint16_t delta; int i; diff --git a/drivers/common/idpf/idpf_common_rxtx_avx512.c b/drivers/common/idpf/idpf_common_rxtx_avx512.c index b8450b03ae..63e10c542f 100644 --- a/drivers/common/idpf/idpf_common_rxtx_avx512.c +++ b/drivers/common/idpf/idpf_common_rxtx_avx512.c @@ -1002,7 +1002,8 @@ idpf_tx_singleq_free_bufs_avx512(struct idpf_tx_queue *txq) uint32_t n; uint32_t i; int nb_free = 0; - struct rte_mbuf *m, *free[txq->rs_thresh]; + struct rte_mbuf *m; + struct rte_mbuf **free = alloca(sizeof(struct rte_mbuf *) * txq->rs_thresh); /* check DD bits on threshold descriptor */ if ((txq->tx_ring[txq->next_dd].qw1 & @@ -1326,7 +1327,8 @@ idpf_tx_splitq_free_bufs_avx512(struct idpf_tx_queue *txq) uint32_t n; uint32_t i; int nb_free = 0; - struct rte_mbuf *m, *free[txq->rs_thresh]; + struct rte_mbuf *m; + struct rte_mbuf **free = alloca(sizeof(struct rte_mbuf *) * txq->rs_thresh); n = txq->rs_thresh; From patchwork Fri Jan 10 20:22:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149802 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B13274605F; Fri, 10 Jan 2025 21:25:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 634A542D8C; Fri, 10 Jan 2025 21:24:24 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 1655B402EF for ; Fri, 10 Jan 2025 21:24:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 9311B203D600; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 9311B203D600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540639; bh=cLEN3T55b31hJLeArnza6JtN1VeYaA2zhfI8EPuqb0w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J767u1i9+CoLGf0RD2yJFdi51VegCCcIVz0h0Uzi5nxEN9DNPLkcoPm69r4vUGgKo zPBoRATAo5EpBXNQuOLdh2TcdJgwrrq5awnf/yXb21v5X+LvfQ8h/LtGVR+V6l347I nmI6xw6jR5wNRrXFWGQSoDfuGbGQ4x3/2hqsobkU= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Tyler Retzlaff Subject: [PATCH v14 15/81] net/i40e: remove use of VLAs for Windows built code Date: Fri, 10 Jan 2025 12:22:34 -0800 Message-Id: <1736540620-21764-16-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 Reviewed-by: Bruce Richardson --- drivers/net/i40e/i40e_testpmd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/i40e/i40e_testpmd.c b/drivers/net/i40e/i40e_testpmd.c index b6ef5d6e42..21f596297b 100644 --- a/drivers/net/i40e/i40e_testpmd.c +++ b/drivers/net/i40e/i40e_testpmd.c @@ -2168,8 +2168,7 @@ cmd_ptype_mapping_get_parsed(void *parsed_result, { struct cmd_ptype_mapping_get_result *res = parsed_result; int ret = -ENOTSUP; - int max_ptype_num = 256; - struct rte_pmd_i40e_ptype_mapping mapping[max_ptype_num]; + struct rte_pmd_i40e_ptype_mapping mapping[256]; uint16_t count; int i; @@ -2178,7 +2177,7 @@ cmd_ptype_mapping_get_parsed(void *parsed_result, ret = rte_pmd_i40e_ptype_mapping_get(res->port_id, mapping, - max_ptype_num, + RTE_DIM(mapping), &count, res->valid_only); switch (ret) { From patchwork Fri Jan 10 20:22:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149801 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 333F44605F; Fri, 10 Jan 2025 21:25:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3754842D80; Fri, 10 Jan 2025 21:24:23 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 1241A427C0 for ; Fri, 10 Jan 2025 21:24:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 9F432203D601; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 9F432203D601 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540639; bh=exKy/3ppc0MuX89Kjv2WBefD7aSm9N0CZXhVgRi5TEg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Bvn528roR3yPACvzwOma1aDENNYdtNapiMsQ+P5Wr8ia3E0Wbg5b6kTNhWwArY/49 ysrzE+hVEFcFuYIxjOEA77I7nJMbY9mPM9+lR6hbDTRV2iZrtYE6rrOFWat2CUDvw/ bFffLuDJdSFAeSuLe/Sc0MftftxAnr+1+13Px07M= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Tyler Retzlaff Subject: [PATCH v14 16/81] common/mlx5: remove use of VLAs for Windows built code Date: Fri, 10 Jan 2025 12:22:35 -0800 Message-Id: <1736540620-21764-17-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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/common/meson.build | 8 ++++++++ drivers/common/mlx5/mlx5_common.h | 4 ++-- drivers/common/mlx5/mlx5_devx_cmds.c | 7 +++---- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/common/meson.build b/drivers/common/meson.build index 8734af36aa..79ba0a3001 100644 --- a/drivers/common/meson.build +++ b/drivers/common/meson.build @@ -11,3 +11,11 @@ drivers = [ 'mvep', 'octeontx', ] + +warning_flags = ['-Wvla'] + +foreach arg: warning_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach diff --git a/drivers/common/mlx5/mlx5_common.h b/drivers/common/mlx5/mlx5_common.h index 1abd1e8239..f29f06a86e 100644 --- a/drivers/common/mlx5/mlx5_common.h +++ b/drivers/common/mlx5/mlx5_common.h @@ -125,10 +125,10 @@ mlx5_fp_debug_enabled(void) /* Allocate a buffer on the stack and fill it with a printf format string. */ #define MKSTR(name, ...) \ int mkstr_size_##name = snprintf(NULL, 0, "" __VA_ARGS__); \ - char name[mkstr_size_##name + 1]; \ + char *name = alloca(mkstr_size_##name + 1); \ \ memset(name, 0, mkstr_size_##name + 1); \ - snprintf(name, sizeof(name), "" __VA_ARGS__) + snprintf(name, mkstr_size_##name + 1, "" __VA_ARGS__) enum { PCI_VENDOR_ID_MELLANOX = 0x15b3, diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c index a75f011750..804ee67cd6 100644 --- a/drivers/common/mlx5/mlx5_devx_cmds.c +++ b/drivers/common/mlx5/mlx5_devx_cmds.c @@ -284,10 +284,9 @@ mlx5_devx_cmd_flow_counter_query(struct mlx5_devx_obj *dcs, void *cmd_comp, uint64_t async_id) { - int out_len = MLX5_ST_SZ_BYTES(query_flow_counter_out) + - MLX5_ST_SZ_BYTES(traffic_counter); - uint32_t out[out_len]; + uint32_t out[MLX5_ST_SZ_BYTES(query_flow_counter_out) + MLX5_ST_SZ_BYTES(traffic_counter)]; uint32_t in[MLX5_ST_SZ_DW(query_flow_counter_in)] = {0}; + const int out_len = RTE_DIM(out); void *stats; int rc; @@ -346,7 +345,7 @@ mlx5_devx_cmd_mkey_create(void *ctx, int klm_num = attr->klm_num; int in_size_dw = MLX5_ST_SZ_DW(create_mkey_in) + (klm_num ? RTE_ALIGN(klm_num, 4) : 0) * MLX5_ST_SZ_DW(klm); - uint32_t in[in_size_dw]; + uint32_t *in = alloca(sizeof(uint32_t) * in_size_dw); uint32_t out[MLX5_ST_SZ_DW(create_mkey_out)] = {0}; void *mkc; struct mlx5_devx_obj *mkey = mlx5_malloc(MLX5_MEM_ZERO, sizeof(*mkey), From patchwork Fri Jan 10 20:22:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149809 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CC6684605F; Fri, 10 Jan 2025 21:26:19 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CE60A42DD4; Fri, 10 Jan 2025 21:24:32 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 7438F427C5 for ; Fri, 10 Jan 2025 21:24:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id ACAB7203D602; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com ACAB7203D602 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540639; bh=c2o9QTFqTMMlIUXckCfLoisFolmdQ9B1GnY4okgubKo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h8rOknHsgIJYCvXHb4O5KPLUFI22xBk+Jxz+wJjiuxgqMH5ajnJh22TMTFIvnvIWu v/wdvsVuGtoh6wvMl7bg98Xb6gHpYZtw626tgEJFEHx6dvebikH1+cnsliQxs8Dmn7 0G/gFQCDTSwuI3Pw0BWAL8iKuz1EOMNbNwp/UlCY= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Tyler Retzlaff Subject: [PATCH v14 17/81] net/mlx5: remove use of VLAs for Windows built code Date: Fri, 10 Jan 2025 12:22:36 -0800 Message-Id: <1736540620-21764-18-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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/meson.build | 8 ++++++++ drivers/net/mlx5/mlx5.c | 5 ++--- drivers/net/mlx5/mlx5_flow.c | 6 +++--- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/net/meson.build b/drivers/net/meson.build index dafd637ba4..170e7339e5 100644 --- a/drivers/net/meson.build +++ b/drivers/net/meson.build @@ -68,3 +68,11 @@ drivers = [ std_deps = ['ethdev', 'kvargs'] # 'ethdev' also pulls in mbuf, net, eal etc std_deps += ['bus_pci'] # very many PMDs depend on PCI, so make std std_deps += ['bus_vdev'] # same with vdev bus + +warning_flags = ['-Wvla'] + +foreach arg: warning_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 6e4473e2f4..979e54686b 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -1598,14 +1598,13 @@ void mlx5_rt_timestamp_config(struct mlx5_dev_ctx_shared *sh, struct mlx5_hca_attr *hca_attr) { - uint32_t dw_cnt = MLX5_ST_SZ_DW(register_mtutc); - uint32_t reg[dw_cnt]; + uint32_t reg[MLX5_ST_SZ_DW(register_mtutc)]; int ret = ENOTSUP; if (hca_attr->access_register_user) ret = mlx5_devx_cmd_register_read(sh->cdev->ctx, MLX5_REGISTER_ID_MTUTC, 0, - reg, dw_cnt); + reg, RTE_DIM(reg)); if (!ret) { uint32_t ts_mode; diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 16ddd05448..37b5402447 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -1479,8 +1479,8 @@ mlx5_flow_item_acceptable(const struct rte_eth_dev *dev, "mask/last without a spec is not" " supported"); if (item->spec && item->last && !range_accepted) { - uint8_t spec[size]; - uint8_t last[size]; + uint8_t *spec = alloca(size); + uint8_t *last = alloca(size); unsigned int i; int ret; @@ -8477,7 +8477,7 @@ mlx5_ctrl_flow_vlan(struct rte_eth_dev *dev, .type = RTE_FLOW_ITEM_TYPE_END, }, }; - uint16_t queue[priv->reta_idx_n]; + uint16_t *queue = alloca(sizeof(uint16_t) * priv->reta_idx_n); struct rte_flow_action_rss action_rss = { .func = RTE_ETH_HASH_FUNCTION_DEFAULT, .level = 0, From patchwork Fri Jan 10 20:22:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149812 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9BBD34605F; Fri, 10 Jan 2025 21:26:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 32DE742E00; Fri, 10 Jan 2025 21:24:36 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 70204427C4 for ; Fri, 10 Jan 2025 21:24:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id B96DD203D603; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com B96DD203D603 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540639; bh=16HbldSW88TgikV4w3VEk6qD3rMMVXFBuesuZIQ3Hjo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h8sBHTt9EGPGEMa+hecWR4a3LmMthVhTdP9vyiVhsHiiErlA657mVgjUBx5oWkBkT TUvFPlfphM4EvH/M7RX35XuTFEX1Qr9C7+0xGwV4UDDcyhONVFkb598w0RTu5SWW2Z yegvq3cVL+KGwC/EZuNUBWvz9D6vqCETGplxmThk= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Tyler Retzlaff Subject: [PATCH v14 18/81] build: enable vla warnings on Windows built code Date: Fri, 10 Jan 2025 12:22:37 -0800 Message-Id: <1736540620-21764-19-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 optional C11 VLAs. When building for Windows enable -Wvla so that mingw and clang also fail if a VLA is used. Signed-off-by: Tyler Retzlaff Acked-by: Bruce Richardson Acked-by: Chengwen Feng --- config/meson.build | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/meson.build b/config/meson.build index 6aaad6d8a4..ebca19b4e5 100644 --- a/config/meson.build +++ b/config/meson.build @@ -342,6 +342,10 @@ if cc.get_id() == 'intel' warning_flags += '-diag-disable=@0@'.format(i) endforeach endif +# no VLAs in code built on Windows +if is_windows + warning_flags += '-Wvla' +endif foreach arg: warning_flags if cc.has_argument(arg) add_project_arguments(arg, language: 'c') From patchwork Fri Jan 10 20:22:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149807 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4B98A4605F; Fri, 10 Jan 2025 21:26:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 37E6942DC7; Fri, 10 Jan 2025 21:24:30 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 2B978427C1 for ; Fri, 10 Jan 2025 21:24:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id C6AA1203D604; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C6AA1203D604 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540639; bh=txBvG//Fyvvfc47lrAYVq9gYhAsycdhmWgjoVb6EI10=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oLhTu5Pkk4Y4GbZN82dCIHFotyNxRc02sCWzPnGBLhy4Gy6/zENFr0nDwtqPIiFUu AFE80Beq/N/I7Dfb6MYn21TCYwPK38Z0z+t+1rq2O7FldnfnyqmMAxfJVJwAvLudLJ FJynF/b8TVcKg/C5nmY2p8whXfcVKaguUwHQDSWQ= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 19/81] test: remove use of VLAs for Windows built code in bitset tests Date: Fri, 10 Jan 2025 12:22:38 -0800 Message-Id: <1736540620-21764-20-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 1) MSVC does not support VLAs. Use standard fixed C arrays of maximum size required instead. 2) ../usr/lib/gcc/x86_64-redhat-linux/13/include/emmintrin.h:742:8: error: array subscript 9 is outside array bounds of 'uint64_t[16]' {aka 'long unsigned int[16]'} [-Werror=array-bounds=] 3695 742 | *__P = __B; Compile with -Wno-array-bounds to avoid false positives when using gcc version 11 or newer (gcc compiler bug/limitation). Signed-off-by: Andre Muezerie --- app/test/test_bitset.c | 69 ++++++++++++++++++++------------- app/test/test_lcore_var_perf.c | 2 +- app/test/test_reassembly_perf.c | 22 ++++++----- 3 files changed, 56 insertions(+), 37 deletions(-) diff --git a/app/test/test_bitset.c b/app/test/test_bitset.c index 50b8bf0da4..45460204c1 100644 --- a/app/test/test_bitset.c +++ b/app/test/test_bitset.c @@ -99,11 +99,13 @@ typedef void clear_fun(uint64_t *bitset, size_t bit_num); typedef void assign_fun(uint64_t *bitset, size_t bit_num, bool value); typedef void flip_fun(uint64_t *bitset, size_t bit_num); +#define RAND_SET_MAX_SIZE 1000 + static int test_set_clear_size(test_fun test_fun, set_fun set_fun, clear_fun clear_fun, size_t size) { size_t i; - bool reference[size]; + bool reference[RAND_SET_MAX_SIZE]; uint64_t *bitset; rand_bool_ary(reference, size); @@ -131,8 +133,7 @@ test_set_clear_size(test_fun test_fun, set_fun set_fun, clear_fun clear_fun, siz return TEST_SUCCESS; } -#define RAND_ITERATIONS (10000) -#define RAND_SET_MAX_SIZE (1000) +#define RAND_ITERATIONS 10000 static int test_set_clear_fun(test_fun test_fun, set_fun set_fun, clear_fun clear_fun) @@ -168,10 +169,20 @@ test_flip_size(test_fun test_fun, assign_fun assign_fun, flip_fun flip_fun, size rand_bitset(bitset, size); for (i = 0; i < size; i++) { - RTE_BITSET_DECLARE(reference, size); + RTE_BITSET_DECLARE(reference, RAND_SET_MAX_SIZE); + +#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION >= 110000) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif + /* gcc is giving false positives here when code is optimized */ rte_bitset_copy(reference, bitset, size); +#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION >= 110000) +#pragma GCC diagnostic pop +#endif + bool value = test_fun(bitset, i); flip_fun(bitset, i); @@ -282,13 +293,13 @@ find_clear(const bool *ary, size_t num_bools, size_t start, size_t len) return find(ary, num_bools, start, len, false); } -#define FFS_ITERATIONS (100) +#define FFS_ITERATIONS 100 static int test_find_size(size_t size, bool set) { uint64_t *bitset; - bool reference[size]; + bool reference[RAND_SET_MAX_SIZE]; size_t i; bitset = alloc_bitset(size); @@ -388,8 +399,8 @@ record_match(ssize_t match_idx, size_t size, int *calls) static int test_foreach_size(ssize_t size, bool may_wrap, bool set) { - bool reference[size]; - int calls[size]; + bool reference[RAND_SET_MAX_SIZE]; + int calls[RAND_SET_MAX_SIZE]; uint64_t *bitset; ssize_t i; ssize_t start_bit; @@ -633,17 +644,19 @@ test_define(void) typedef void bitset_op(uint64_t *dst, const uint64_t *a, const uint64_t *b, size_t bit_num); typedef bool bool_op(bool a, bool b); +#define LOGIC_MAX_SET_SIZE 200 + static int test_logic_op(bitset_op bitset_op, bool_op bool_op) { - const size_t size = 1 + rte_rand_max(200); - RTE_BITSET_DECLARE(bitset_a, size); - RTE_BITSET_DECLARE(bitset_b, size); - RTE_BITSET_DECLARE(bitset_d, size); + const size_t size = 1 + rte_rand_max(LOGIC_MAX_SET_SIZE); + RTE_BITSET_DECLARE(bitset_a, LOGIC_MAX_SET_SIZE); + RTE_BITSET_DECLARE(bitset_b, LOGIC_MAX_SET_SIZE); + RTE_BITSET_DECLARE(bitset_d, LOGIC_MAX_SET_SIZE); - bool ary_a[size]; - bool ary_b[size]; - bool ary_d[size]; + bool ary_a[LOGIC_MAX_SET_SIZE]; + bool ary_b[LOGIC_MAX_SET_SIZE]; + bool ary_d[LOGIC_MAX_SET_SIZE]; rand_bool_ary(ary_a, size); rand_bool_ary(ary_b, size); @@ -708,14 +721,14 @@ test_complement(void) for (i = 0; i < RAND_ITERATIONS; i++) { const size_t size = 1 + rte_rand_max(RAND_SET_MAX_SIZE - 1); - RTE_BITSET_DECLARE(src, size); + RTE_BITSET_DECLARE(src, RAND_SET_MAX_SIZE); rand_bitset(src, size); bool bit_idx = rte_rand_max(size); bool bit_value = rte_bitset_test(src, bit_idx); - RTE_BITSET_DECLARE(dst, size); + RTE_BITSET_DECLARE(dst, RAND_SET_MAX_SIZE); rte_bitset_complement(dst, src, size); @@ -726,6 +739,8 @@ test_complement(void) return TEST_SUCCESS; } +#define SHIFT_SET_MAX_SIZE 500 + static int test_shift(bool right) { @@ -734,12 +749,12 @@ test_shift(bool right) const char *direction = right ? "right" : "left"; for (i = 0; i < 10000; i++) { - const int size = 1 + (int)rte_rand_max(500); + const int size = 1 + (int)rte_rand_max(SHIFT_SET_MAX_SIZE); const int shift_count = (int)rte_rand_max(1.5 * size); int src_idx; - RTE_BITSET_DECLARE(src, size); - RTE_BITSET_DECLARE(reference, size); + RTE_BITSET_DECLARE(src, SHIFT_SET_MAX_SIZE); + RTE_BITSET_DECLARE(reference, SHIFT_SET_MAX_SIZE); rte_bitset_init(src, size); rte_bitset_init(reference, size); @@ -788,12 +803,14 @@ test_shift_left(void) return test_shift(false); } +#define EQUAL_SET_MAX_SIZE 100 + static int test_equal(void) { - const size_t size = 100; - RTE_BITSET_DECLARE(bitset_a, size); - RTE_BITSET_DECLARE(bitset_b, size); + const size_t size = EQUAL_SET_MAX_SIZE; + RTE_BITSET_DECLARE(bitset_a, EQUAL_SET_MAX_SIZE); + RTE_BITSET_DECLARE(bitset_b, EQUAL_SET_MAX_SIZE); rand_buf(bitset_a, RTE_BITSET_SIZE(size)); rand_buf(bitset_b, RTE_BITSET_SIZE(size)); @@ -821,9 +838,9 @@ test_equal(void) static int test_copy(void) { - const size_t size = 100; - RTE_BITSET_DECLARE(bitset_a, size); - RTE_BITSET_DECLARE(bitset_b, size); + const size_t size = EQUAL_SET_MAX_SIZE; + RTE_BITSET_DECLARE(bitset_a, EQUAL_SET_MAX_SIZE); + RTE_BITSET_DECLARE(bitset_b, EQUAL_SET_MAX_SIZE); rand_buf(bitset_a, RTE_BITSET_SIZE(size)); rand_buf(bitset_b, RTE_BITSET_SIZE(size)); diff --git a/app/test/test_lcore_var_perf.c b/app/test/test_lcore_var_perf.c index 41e29bbd49..5a74ce4808 100644 --- a/app/test/test_lcore_var_perf.c +++ b/app/test/test_lcore_var_perf.c @@ -185,7 +185,7 @@ test_lcore_var_access_n(unsigned int num_mods) double tls_latency; double lazy_tls_latency; double lvar_latency; - unsigned int mods[num_mods]; + unsigned int mods[MAX_MODS]; unsigned int i; for (i = 0; i < num_mods; i++) diff --git a/app/test/test_reassembly_perf.c b/app/test/test_reassembly_perf.c index 69cf029468..7d3c692547 100644 --- a/app/test/test_reassembly_perf.c +++ b/app/test/test_reassembly_perf.c @@ -557,6 +557,8 @@ ipv4_outstanding_reassembly_perf(int8_t nb_frags, uint8_t fill_order, return TEST_SUCCESS; } +#define TEST_REASSEMBLY_ITERATIONS 4 + static int ipv4_reassembly_interleaved_flows_perf(uint8_t nb_frags) { @@ -568,17 +570,17 @@ ipv4_reassembly_interleaved_flows_perf(uint8_t nb_frags) uint64_t total_cyc = 0; uint32_t i, j; - for (i = 0; i < flow_cnt; i += 4) { + for (i = 0; i < flow_cnt; i += TEST_REASSEMBLY_ITERATIONS) { struct rte_mbuf *buf_out[4] = {NULL}; uint8_t reassembled = 0; uint8_t nb_frags = 0; uint8_t prev = 0; - for (j = 0; j < 4; j++) + for (j = 0; j < TEST_REASSEMBLY_ITERATIONS; j++) nb_frags += frag_per_flow[i + j]; - struct rte_mbuf *buf_arr[nb_frags]; - for (j = 0; j < 4; j++) { + struct rte_mbuf *buf_arr[TEST_REASSEMBLY_ITERATIONS * MAX_FRAGMENTS]; + for (j = 0; j < TEST_REASSEMBLY_ITERATIONS; j++) { join_array(buf_arr, mbufs[i + j], prev, frag_per_flow[i + j]); prev += frag_per_flow[i + j]; @@ -608,7 +610,7 @@ ipv4_reassembly_interleaved_flows_perf(uint8_t nb_frags) total_cyc += rte_rdtsc_precise() - flow_tstamp; if (reassembled != 4) return TEST_FAILED; - for (j = 0; j < 4; j++) { + for (j = 0; j < TEST_REASSEMBLY_ITERATIONS; j++) { memset(mbufs[i + j], 0, sizeof(struct rte_mbuf *) * MAX_FRAGMENTS); mbufs[i + j][0] = buf_out[j]; @@ -779,17 +781,17 @@ ipv6_reassembly_interleaved_flows_perf(int8_t nb_frags) uint64_t total_cyc = 0; uint32_t i, j; - for (i = 0; i < flow_cnt; i += 4) { + for (i = 0; i < flow_cnt; i += TEST_REASSEMBLY_ITERATIONS) { struct rte_mbuf *buf_out[4] = {NULL}; uint8_t reassembled = 0; uint8_t nb_frags = 0; uint8_t prev = 0; - for (j = 0; j < 4; j++) + for (j = 0; j < TEST_REASSEMBLY_ITERATIONS; j++) nb_frags += frag_per_flow[i + j]; - struct rte_mbuf *buf_arr[nb_frags]; - for (j = 0; j < 4; j++) { + struct rte_mbuf *buf_arr[TEST_REASSEMBLY_ITERATIONS * MAX_FRAGMENTS]; + for (j = 0; j < TEST_REASSEMBLY_ITERATIONS; j++) { join_array(buf_arr, mbufs[i + j], prev, frag_per_flow[i + j]); prev += frag_per_flow[i + j]; @@ -825,7 +827,7 @@ ipv6_reassembly_interleaved_flows_perf(int8_t nb_frags) total_cyc += rte_rdtsc_precise() - flow_tstamp; if (reassembled != 4) return TEST_FAILED; - for (j = 0; j < 4; j++) { + for (j = 0; j < TEST_REASSEMBLY_ITERATIONS; j++) { memset(mbufs[i + j], 0, sizeof(struct rte_mbuf *) * MAX_FRAGMENTS); mbufs[i + j][0] = buf_out[j]; From patchwork Fri Jan 10 20:22:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149799 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 219DE4605F; Fri, 10 Jan 2025 21:25:25 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D34C54281D; Fri, 10 Jan 2025 21:24:20 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 29CC8427B9 for ; Fri, 10 Jan 2025 21:24:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id D2D2D203D605; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com D2D2D203D605 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540639; bh=uhBpJkPqZmW5vwtUf6rbbVnKmEl8IeiOVPPMABmYRKQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F+nAcKjH5T9XS11cvv3ayzNZr+BQWUrS1XmU3O66redwJQzKe5ffVPwDcr/FUCEEx dJ3veiouL69+QBKDwVs8lNoZ+FmxLLsB8pIWucSNRUTVqgYDpqgbxymUKtUrZSJkh7 cpIBtPqW7+1tVQzy96t0ifzZ+DMJu6A79VIF/zxg= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 20/81] app/testpmd: remove use of VLAs for Windows built code in shared_rxq_fwd Date: Fri, 10 Jan 2025 12:22:39 -0800 Message-Id: <1736540620-21764-21-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 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: Andre Muezerie Acked-by: Chengwen Feng --- app/test-pmd/meson.build | 10 +++++++++- app/test-pmd/shared_rxq_fwd.c | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/meson.build b/app/test-pmd/meson.build index f1c36529b4..efd1eab0b0 100644 --- a/app/test-pmd/meson.build +++ b/app/test-pmd/meson.build @@ -3,7 +3,15 @@ # override default name to drop the hyphen name = 'testpmd' -cflags += '-Wno-deprecated-declarations' + +warning_flags = ['-Wno-deprecated-declarations', '-Wvla'] + +foreach arg: warning_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach + sources = files( '5tswap.c', 'cmdline.c', diff --git a/app/test-pmd/shared_rxq_fwd.c b/app/test-pmd/shared_rxq_fwd.c index 623d62da88..b85830b90e 100644 --- a/app/test-pmd/shared_rxq_fwd.c +++ b/app/test-pmd/shared_rxq_fwd.c @@ -92,7 +92,7 @@ forward_shared_rxq(struct fwd_stream *fs, uint16_t nb_rx, static bool shared_rxq_fwd(struct fwd_stream *fs) { - struct rte_mbuf *pkts_burst[nb_pkt_per_burst]; + struct rte_mbuf *pkts_burst[MAX_PKT_BURST]; uint16_t nb_rx; nb_rx = common_fwd_stream_receive(fs, pkts_burst, nb_pkt_per_burst); From patchwork Fri Jan 10 20:22:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149805 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 668614605F; Fri, 10 Jan 2025 21:25:57 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 03A6042DBD; Fri, 10 Jan 2025 21:24:28 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 5E3C9427C3 for ; Fri, 10 Jan 2025 21:24:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id DF67E203D606; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com DF67E203D606 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540639; bh=O/CydglOyTfgPLEZikr1idMMLAG8iY/HaWD3asPuYK0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P0L/fPQtnoVvYapNC3Ws9a3EwydvwnbzROd9xu6uOenQi87/bYWodfBxUtRrUjHn7 JUi5s1zRlT6NvdfXaGqPy3b3hRoet2VID5LhJ61OPAZG72qt5IR6h7wPEntOam41jN s1f3cMs5u7ji6XxMtAjyevAXyR//JwtA/WQQ9bEQ= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 21/81] hash: remove use of VLAs by using standard arrays Date: Fri, 10 Jan 2025 12:22:40 -0800 Message-Id: <1736540620-21764-22-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, replace VLAs with standard C arrays. Signed-off-by: Andre Muezerie --- lib/hash/meson.build | 8 ++++++++ lib/hash/rte_thash_gf2_poly_math.c | 9 ++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/lib/hash/meson.build b/lib/hash/meson.build index 7ce504ee8b..289c6a3543 100644 --- a/lib/hash/meson.build +++ b/lib/hash/meson.build @@ -29,3 +29,11 @@ sources = files( deps += ['net'] deps += ['ring'] deps += ['rcu'] + +warning_flags = ['-Wvla'] + +foreach arg: warning_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach diff --git a/lib/hash/rte_thash_gf2_poly_math.c b/lib/hash/rte_thash_gf2_poly_math.c index 1c62974e71..825da4382f 100644 --- a/lib/hash/rte_thash_gf2_poly_math.c +++ b/lib/hash/rte_thash_gf2_poly_math.c @@ -8,6 +8,7 @@ #include #include +#define MAX_POLY_DEGREE 32 #define MAX_TOEPLITZ_KEY_LENGTH 64 RTE_LOG_REGISTER_SUFFIX(thash_poly_logtype, thash_poly, INFO); #define RTE_LOGTYPE_HASH thash_poly_logtype @@ -149,7 +150,7 @@ gf2_pow(uint32_t a, uint32_t pow, uint32_t r, int degree) static uint32_t __thash_get_rand_poly(int poly_degree) { - uint32_t roots[poly_degree]; + uint32_t roots[MAX_POLY_DEGREE]; uint32_t rnd; uint32_t ret_poly = 0; int i, j; @@ -194,9 +195,7 @@ __thash_get_rand_poly(int poly_degree) * Get coefficients of the polynomial for * (x - roots[0])(x - roots[1])...(x - roots[n]) */ - uint32_t poly_coefficients[poly_degree + 1]; - for (i = 0; i <= poly_degree; i++) - poly_coefficients[i] = 0; + uint32_t poly_coefficients[MAX_POLY_DEGREE + 1] = {0}; poly_coefficients[0] = 1; /* highest degree term coefficient in the end */ for (i = 0; i < (int)poly_degree; i++) { @@ -247,7 +246,7 @@ thash_get_rand_poly(uint32_t poly_degree) { uint32_t ret_poly; - if (poly_degree > 32) { + if (poly_degree > MAX_POLY_DEGREE) { HASH_LOG(ERR, "Wrong polynomial degree %d, must be in range [1, 32]", poly_degree); return 0; } From patchwork Fri Jan 10 20:22:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149810 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5B0884605F; Fri, 10 Jan 2025 21:26:25 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EEE8E42DD9; Fri, 10 Jan 2025 21:24:33 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 829FD427BA for ; Fri, 10 Jan 2025 21:24:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id EBB7C203D607; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com EBB7C203D607 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540639; bh=TQhXM4AB0FaXvQN9M2hidDNdKtZ65MLH1sqZA37QgWg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jfv8kw9MbozjFz6FRU4pdJO42U9v6bcjvEA3VTPgP5Tk3J8dJ/hJbgp6F+O82fVsp mGWQ0gG6D6RcpqQTLNCzIules2XsGBKvmgEBENnQpbQWoJUJP8RFTOqkX+LlIG1gxR itpz1nfXFv9f3q7OSrRzocZC5ymUSyzXRYwnYIMY= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 22/81] app/dumpcap: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:22:41 -0800 Message-Id: <1736540620-21764-23-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- app/dumpcap/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/dumpcap/meson.build b/app/dumpcap/meson.build index 69c016c780..675f5d7448 100644 --- a/app/dumpcap/meson.build +++ b/app/dumpcap/meson.build @@ -15,3 +15,11 @@ endif ext_deps += pcap_dep sources = files('main.c') deps += ['ethdev', 'pdump', 'pcapng', 'bpf'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:22:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149804 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5F8354605F; Fri, 10 Jan 2025 21:25:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BA0C942DA7; Fri, 10 Jan 2025 21:24:26 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 484204275D for ; Fri, 10 Jan 2025 21:24:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 03E31203D608; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 03E31203D608 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540640; bh=w5MoFIVkD0r0zLwNPhfZfOPTuD+4eBV20vgUhNa1/Tw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kOXpvYpSEywh7w66W5aHDNoFcLCIC7RT7RJKNNCxyCkPSr8KM5bx7afcirg25LK5e FsVUJ7MaoI1v7ma7eeb/fV1SamSaDWTriGHQD2Yqb7bQfPc/oo2jrvqlnAOavNaxYM suS0Jofbryi8friIh0ypoqBbxCRzvGILI7+LnJkA= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 23/81] app/graph: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:22:42 -0800 Message-Id: <1736540620-21764-24-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- app/graph/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/graph/meson.build b/app/graph/meson.build index 344e4a418f..28ad533498 100644 --- a/app/graph/meson.build +++ b/app/graph/meson.build @@ -33,3 +33,11 @@ cmd_h = custom_target('commands_hdr', command: [cmdline_gen_cmd, '--context-name=modules_ctx', '@INPUT@'] ) sources += cmd_h + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:22:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149817 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 577004605F; Fri, 10 Jan 2025 21:26:59 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EAA8B42E4A; Fri, 10 Jan 2025 21:24:41 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 9B7CD427C9 for ; Fri, 10 Jan 2025 21:24:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 0FF34203D609; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 0FF34203D609 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540640; bh=rjMhjq4kZRaW9q+6aKegywkOimDHKzI9yzLYO0obDX0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HrWqvF9S+GgaEshrsFvT31NxBxOsbFnk2d8v/cnbFFnZRCzn/bjZGCyvz4vmFW1gs FEX5qdKiHdF6chwRY+ralkhdpJ2Iz2uJGgvvUY4pmncp2pSV5C+LBp5hsqE89dLima RqMMa3gj75X+WQA0IF3s97pIuBPfBKq1LfvSMMDI= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 24/81] app/test-cmdline: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:22:43 -0800 Message-Id: <1736540620-21764-25-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- app/test-cmdline/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/test-cmdline/meson.build b/app/test-cmdline/meson.build index 6027f67919..06813ff1f5 100644 --- a/app/test-cmdline/meson.build +++ b/app/test-cmdline/meson.build @@ -9,3 +9,11 @@ endif sources = files('commands.c', 'cmdline_test.c') deps += 'cmdline' + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:22:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149803 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 305544605F; Fri, 10 Jan 2025 21:25:47 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 901AB42DA3; Fri, 10 Jan 2025 21:24:25 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 51E8142794 for ; Fri, 10 Jan 2025 21:24:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 1C155203D60A; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 1C155203D60A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540640; bh=EpItkjTKK3+czTyI8uEW8K49d++FnGPC18US0HmRXfQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BtF19jStD8lHlFHmou+ad5vgjEJtYHHCzwGK7HDJFvJxAZBKI8Pu7L980AaOIaccy PCrcUlLuLpTZinIFMR1VSO+RnDRyo80sdXgaaY3HfMjRkLnUJdN3C9vhPP+I+3IuO5 l04IvdMofXVLUD4+wieCBJaoCkzxi/0nfuGHuhhU= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 25/81] app/test-compress-perf: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:22:44 -0800 Message-Id: <1736540620-21764-26-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- app/test-compress-perf/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/test-compress-perf/meson.build b/app/test-compress-perf/meson.build index 34dcfe5b8e..58fea052d9 100644 --- a/app/test-compress-perf/meson.build +++ b/app/test-compress-perf/meson.build @@ -16,3 +16,11 @@ sources = files( 'main.c', ) deps = ['compressdev'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:22:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149825 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6B5634605F; Fri, 10 Jan 2025 21:27:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CEA2B42E74; Fri, 10 Jan 2025 21:24:52 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id D85E4427D4 for ; Fri, 10 Jan 2025 21:24:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 286CA203D60B; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 286CA203D60B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540640; bh=/sXF/arQ3DOLjOzSereqNulm/wcZEVPrAAQfTdwAy1c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BEZx4t/o8PEhNLGAaZqAwBoo2ojx/n3cXTvGyEBlZyn2J2Sk07u2gtoU0k3WdQq8f rPnVkdvUiPrbJrQ7XR4h/pC0DNTEkkaQKuk8zUQkRJty9bXfjb714SS30CJi+LS2Fi xabRDMP6ojaTNHNCfyOMgFh1jR7Zk03TZUjn5+2k= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 26/81] app/test-fib: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:22:45 -0800 Message-Id: <1736540620-21764-27-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- app/test-fib/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/test-fib/meson.build b/app/test-fib/meson.build index eb36772cf3..f639171068 100644 --- a/app/test-fib/meson.build +++ b/app/test-fib/meson.build @@ -9,3 +9,11 @@ endif sources = files('main.c') deps += ['fib', 'lpm', 'net'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:22:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149830 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1E3764605F; Fri, 10 Jan 2025 21:28:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 22C6742E83; Fri, 10 Jan 2025 21:24:58 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id EF669427D9 for ; Fri, 10 Jan 2025 21:24:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 9A850203D614; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 9A850203D614 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540640; bh=aTwh97SCTGaYHY4+b7c5yIVKIiP3Ia/XlmDNvEok6/Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RAp/xptZIpykGsSH9M9Wmb3I0PxzYsVqJhUhAnp8J/VuuskAwGRdI4VCkJV9+j+VU Bf4lv77IKRUiOKkNUJCVIUbyMQT/1MaSIAX2jl5eqEFGDyD8lCsEjYcNMlqp3R23XQ fMUWK583d0Gexcdz+vYsoPO/EuXEx1Pzu2BwJcso= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 27/81] app/test-gpudev: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:22:46 -0800 Message-Id: <1736540620-21764-28-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- app/test-gpudev/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/test-gpudev/meson.build b/app/test-gpudev/meson.build index 17bdef3646..9d119a11a0 100644 --- a/app/test-gpudev/meson.build +++ b/app/test-gpudev/meson.build @@ -3,3 +3,11 @@ sources = files('main.c') deps = ['gpudev', 'ethdev'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:22:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149813 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C7C574605F; Fri, 10 Jan 2025 21:26:40 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4C1F742E10; Fri, 10 Jan 2025 21:24:37 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 8ABBB427C7 for ; Fri, 10 Jan 2025 21:24:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id A6E11203D615; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com A6E11203D615 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540640; bh=nsRUl9L1Bd+eKHRCHb0zXXCEVpQm9J4kr+EFTben6Nk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cStq7otCeN7cjx/c+MAQri0Voz8klG/0ehFO/rHSrghS2MF3noeaBFADuDzmqh+a9 bJJayfv6+ZH1LZuwkkKWvFnEOk0UEvmVRqD9YnfXcO9Y/vimfuyCrbkURsrZel9kas z08jSFVumfplo+Kgz9XRAWDe4arJ7sQ8P7MAYzLY= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 28/81] app/test-mldev: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:22:47 -0800 Message-Id: <1736540620-21764-29-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- app/test-mldev/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/test-mldev/meson.build b/app/test-mldev/meson.build index 2922888e9f..06fba62947 100644 --- a/app/test-mldev/meson.build +++ b/app/test-mldev/meson.build @@ -23,3 +23,11 @@ sources = files( ) deps += ['mldev', 'hash'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:22:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149816 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 24F7A4605F; Fri, 10 Jan 2025 21:26:55 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B90FB42E45; Fri, 10 Jan 2025 21:24:40 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 96B2E427C8 for ; Fri, 10 Jan 2025 21:24:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id B32D9203D616; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com B32D9203D616 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540640; bh=aEaqthoVHuxRglm2yX1LUJcxYDy25ubc6z9U85A62VE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E3tuSPg1YW/CyzgUkS0pj/yD2I1UWVZtkm8JUnaCCCwOmrGXwW316iO6JXbTLC2BF mJIjSI2OSdULcJ70/yNe3VK4LpzfZCMpyVv403bzTIhfURr2oVLOZ3OnBkajsmgkTv MNbT2HON10wvRPQLwp/TKuYkQx5FlbVlnQszRD4c= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 29/81] app/test-pipeline: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:22:48 -0800 Message-Id: <1736540620-21764-30-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- app/test-pipeline/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/test-pipeline/meson.build b/app/test-pipeline/meson.build index 3add6b637b..bec2e7958b 100644 --- a/app/test-pipeline/meson.build +++ b/app/test-pipeline/meson.build @@ -19,3 +19,11 @@ sources = files( 'runtime.c', ) deps += ['pipeline', 'pci'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:22:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149821 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 239634605F; Fri, 10 Jan 2025 21:27:24 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A365742E69; Fri, 10 Jan 2025 21:24:47 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id BA976427BD for ; Fri, 10 Jan 2025 21:24:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id C01B4203D617; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C01B4203D617 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540640; bh=wNWVIfO8+DMJCsrqMpmeQFIfB4mAPFgNLhr4x+6jGJg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I4ZXRYuvL5odVhH+zJ/AKIPUWVyc5Gd9wlHW8ziipdaT4n8iUDM11UGiK1r6M7aa0 ZiP0D4Dw0dqV60htnxNY8iTgA734FICb6YZIAiCVqyCJ7EhZKwTWTuKFjh1o1u0BJz aO1WOHECSGfHnk1uFEg2KsJV1QTt1W9VHlUo8+FY= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 30/81] app/test-regex: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:22:49 -0800 Message-Id: <1736540620-21764-31-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- app/test-regex/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/test-regex/meson.build b/app/test-regex/meson.build index e3ba060e55..a0c5bcebc4 100644 --- a/app/test-regex/meson.build +++ b/app/test-regex/meson.build @@ -9,3 +9,11 @@ endif sources = files('main.c') deps = ['regexdev'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:22:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149822 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E3F894605F; Fri, 10 Jan 2025 21:27:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CB92D42DFA; Fri, 10 Jan 2025 21:24:48 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id C5751427BC for ; Fri, 10 Jan 2025 21:24:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id CC449203D618; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com CC449203D618 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540640; bh=T8b1D0K7UWc5/75J6dznKTAoKg1IlGlAvkueDex9FVw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HT4PAbP+gT4fGBs55bnqSjeo6H4HZDOvDWmOxmEMl7OGSLMIkHGc3EpyXhrZuSi+r dU3pWpzSiXboH7oNti819Nx5TxntJvmlgV5race8d6kcoTQVetGconhBOt+iSNPKnP 6RY2gxeyzMh19Mo5OI8hLepQZHzU3FCzhNaj4NZQ= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 31/81] app/test-security-perf: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:22:50 -0800 Message-Id: <1736540620-21764-32-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- app/test-security-perf/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/test-security-perf/meson.build b/app/test-security-perf/meson.build index 547de9c908..507d17d368 100644 --- a/app/test-security-perf/meson.build +++ b/app/test-security-perf/meson.build @@ -13,3 +13,11 @@ sources = files( '../test/test_security_proto.c', ) deps += ['security', 'cmdline'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:22:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149820 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 883B14605F; Fri, 10 Jan 2025 21:27:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5799B42E55; Fri, 10 Jan 2025 21:24:45 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id C1981427D1 for ; Fri, 10 Jan 2025 21:24:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id D8908203D619; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com D8908203D619 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540640; bh=ivTgVfZE+bld2q40cNSxEZjIMZk66QTmayXz1lS0v9Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N8DnZwV7HE+7NQLyRFZsiGpIjt9bqbn9H2vyCsOXaGZD/zLl5QGaWBJ99n8miOLFB efBQmLr5+sgFqpaxY84GrDBHMSp5xWlensdsKhGREYF4T5tUlzEHcSbjzudXKFRPJ/ 4VKiES9PbDT0ffwvPzb/wA6uIuzYy1Qt1k95L4zw= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 32/81] lib/argparse: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:22:51 -0800 Message-Id: <1736540620-21764-33-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/argparse/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/argparse/meson.build b/lib/argparse/meson.build index b6a08ca049..3ef537b958 100644 --- a/lib/argparse/meson.build +++ b/lib/argparse/meson.build @@ -5,3 +5,11 @@ sources = files('rte_argparse.c') headers = files('rte_argparse.h') deps += ['log'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:22:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149824 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4F16C4605F; Fri, 10 Jan 2025 21:27:38 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 37C0B42E6D; Fri, 10 Jan 2025 21:24:51 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id CEC2A427D2 for ; Fri, 10 Jan 2025 21:24:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id E49B4203D61A; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com E49B4203D61A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540640; bh=zyWE8mZQNqpgOB2da+JEOeZvMVB/HqBoY5Gfqu+Ybh0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hQ5watrbDf68ltzYfiZXlaTmprlQ0mAlDTgDivFJh7/RLssT6sKul9nwMI4XcREaG bEmDIPLZhC5kXTrEQCM3zfRMuvre00HvM6uoSfkIqrghEvdDxZPJR3EGqQVqW1Xa0O MtrFrQ4+pDulsj3aaqi8Z7WXwCuRgQQ3kpWqIAcs= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 33/81] lib/bbdev: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:22:52 -0800 Message-Id: <1736540620-21764-34-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/bbdev/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/bbdev/meson.build b/lib/bbdev/meson.build index 07685e7578..542372d29b 100644 --- a/lib/bbdev/meson.build +++ b/lib/bbdev/meson.build @@ -12,3 +12,11 @@ headers = files('rte_bbdev.h', 'rte_bbdev_pmd.h', 'rte_bbdev_op.h') deps += ['mbuf'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:22:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149823 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8A9B04605F; Fri, 10 Jan 2025 21:27:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0BA3B42E5B; Fri, 10 Jan 2025 21:24:50 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id D6E95427D3 for ; Fri, 10 Jan 2025 21:24:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id F0C21203D61B; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com F0C21203D61B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540640; bh=wSl/RdEjinzCgQiza0xTTcTDFSAGV9NXpE5RfA27Lho=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eAQ4iopqpvAzjaBQj2ieeCgiEn619OjsQUk2Kpf4sEWkk3DLFEqTUOxJOmHe455TH 91mmTYgIXaECnAHNs7uh0SxGOzB16rWkCOIPIu5X1lncylAwu2YQnU7OeiR0psVxJv 3nzvHWghEPB/U2Uxdvd+3S6Purz4Rvg8ehhFCq6c= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 34/81] lib/bitratestats: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:22:53 -0800 Message-Id: <1736540620-21764-35-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/bitratestats/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/bitratestats/meson.build b/lib/bitratestats/meson.build index ede7e0a579..793c6cfc04 100644 --- a/lib/bitratestats/meson.build +++ b/lib/bitratestats/meson.build @@ -4,3 +4,11 @@ sources = files('rte_bitrate.c') headers = files('rte_bitrate.h') deps += ['ethdev', 'metrics'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:22:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149827 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3142B4605F; Fri, 10 Jan 2025 21:27:53 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0675442E70; Fri, 10 Jan 2025 21:24:55 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id E17CF427D5 for ; Fri, 10 Jan 2025 21:24:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 09310203D61C; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 09310203D61C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540641; bh=Pg7LCJh5+rLp3JsRxg55hOL2LZjdSSKy28SO85Hwnp0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SfpUmElRxpFDEKg2mvRQ+3lNgUNv+NWpfFlOoYdzW72pvMLHNnoUqMl56aPu2maKs rIV682ag9jcr4PV8xHBv2Lj+1gFHJp3F7/Vchlolj8W8s42GJEKJcaM3HhJM2d7xze gD6WPYwsuNkjRbUbX/l3lDPEQJ8AhwWs4DEu5GHs= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 35/81] lib/cfgfile: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:22:54 -0800 Message-Id: <1736540620-21764-36-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/cfgfile/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/cfgfile/meson.build b/lib/cfgfile/meson.build index 88eb819856..afc0a87c00 100644 --- a/lib/cfgfile/meson.build +++ b/lib/cfgfile/meson.build @@ -3,3 +3,11 @@ sources = files('rte_cfgfile.c') headers = files('rte_cfgfile.h') + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:22:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149831 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 90C134605F; Fri, 10 Jan 2025 21:28:12 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 34A2742E87; Fri, 10 Jan 2025 21:24:59 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id E1FD8427D7 for ; Fri, 10 Jan 2025 21:24:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 155DB203D61D; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 155DB203D61D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540641; bh=pqeAd4/QZpRuY1rhj6gkUWdUihKxnGQdzHhxRcyi9ww=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HH9X1K126Rnnj0nja+/pcaFcgGgFntlmA9Ti+4+tVgfzRbpsAC/cBFWCHSWvPCbXv W1nm5zUMm4tJejBtVPBwpa1oxLPvf3vN6ob1ej28e9Su8TdNYYO0w5JBP5XCah8fi6 1fkyE/7fXrexxL2ESiViVYV0QIpIiWb0zTE/kGNQ= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 36/81] lib/cmdline: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:22:55 -0800 Message-Id: <1736540620-21764-37-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/cmdline/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/cmdline/meson.build b/lib/cmdline/meson.build index 63fb69100d..da7a578d05 100644 --- a/lib/cmdline/meson.build +++ b/lib/cmdline/meson.build @@ -32,3 +32,11 @@ else endif deps += ['net'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:22:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149829 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D73DC4605F; Fri, 10 Jan 2025 21:28:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2B2F242E49; Fri, 10 Jan 2025 21:24:57 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id E42FC427D8 for ; Fri, 10 Jan 2025 21:24:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 221B2203D61E; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 221B2203D61E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540641; bh=zCOyGZKizMqAL1/C7LV0iv6ABCHcoGL01t22Fm3HYnc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OLI8oyX/9svnDFjs92NuzNPd+fgH8B6VD+GVBNg2LAgpGNuhJ+6ZXcmlXtiQ6FgmF tIKGYSEIneOh4B3p0YS6htMgsTJqpr+BcutWIrSGB+NrWcef5ISWQuOxWDKojwZ/03 XXZWQIMdq9E6ulJy1OH0k3Y/zNjKfK8xvIkXFeCQ= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 37/81] lib/compressdev: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:22:56 -0800 Message-Id: <1736540620-21764-38-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/compressdev/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/compressdev/meson.build b/lib/compressdev/meson.build index c80295dc0d..b3546fa8e2 100644 --- a/lib/compressdev/meson.build +++ b/lib/compressdev/meson.build @@ -17,3 +17,11 @@ driver_sdk_headers = files( 'rte_compressdev_internal.h', ) deps += ['kvargs', 'mbuf'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:22:57 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149828 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E4B344605F; Fri, 10 Jan 2025 21:27:57 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2773C42E7D; Fri, 10 Jan 2025 21:24:56 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id EFCB5427DA for ; Fri, 10 Jan 2025 21:24:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 2E645203D61F; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 2E645203D61F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540641; bh=h6FJQJiuDVxiAZxtYClIJIpg5SrvBOVettbA+z3Mqv8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BMwU5JfLF9rEKlizyYH4WQ3goADhhJ7q47pD4nAcpHATAVMBcad7f+tEE5fYi5vH9 4k+6ajz2FHFElhZjmB/ijbuYfkRgsUhVA9MvHUaMMtXIQ17QdzUXUfU8ybAxC94UK3 hvxsS1x70jpjFb8pg2sGJxy4+PXFiHEMkvRfw7E0= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 38/81] lib/cryptodev: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:22:57 -0800 Message-Id: <1736540620-21764-39-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/cryptodev/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/cryptodev/meson.build b/lib/cryptodev/meson.build index 4734acf321..02bf7cec8e 100644 --- a/lib/cryptodev/meson.build +++ b/lib/cryptodev/meson.build @@ -21,3 +21,11 @@ driver_sdk_headers += files( ) deps += ['kvargs', 'mbuf', 'rcu', 'telemetry'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:22:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149832 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6E04E4605F; Fri, 10 Jan 2025 21:28:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4939042E8C; Fri, 10 Jan 2025 21:25:00 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id F3F08427DB for ; Fri, 10 Jan 2025 21:24:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 3A93B2047231; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 3A93B2047231 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540641; bh=gipyv8ne2vkjh1mBMupD/oF32R9SNxh2dvBxmDtcqt4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Krs/sezBEmEWH/ARtL3BeRgNKSqymrOzEYCye8/dw8MDe5xI0M/IT5jeM/Ty2eNeZ 0a4xPDZaXQh6ig2QLCxg4M71hsMW3RaT2On5sXYpzQXpCO7LlRmPn8hahPH/LpraS+ BWmw5ABk3p0VSVEqqZw319r4aHEXxWdJ4ySkE82M= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 39/81] lib/distributor: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:22:58 -0800 Message-Id: <1736540620-21764-40-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/distributor/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/distributor/meson.build b/lib/distributor/meson.build index 24988c5827..e41f65fcd3 100644 --- a/lib/distributor/meson.build +++ b/lib/distributor/meson.build @@ -15,3 +15,11 @@ else endif headers = files('rte_distributor.h') deps += ['mbuf'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:22:59 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149836 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1175C4605F; Fri, 10 Jan 2025 21:28:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2F42842E9C; Fri, 10 Jan 2025 21:25:04 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 0C135427DC for ; Fri, 10 Jan 2025 21:24:02 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 46A0A2047232; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 46A0A2047232 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540641; bh=+JGXa7xZs0OD+2fVKC//AkEvoi6JaCxxIqvV3lAT0jA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nQIarnG7J19O5fIl5XgMs7jLlQHsdi+o1atL4wJhCe8oflpVakG0r86DPxtIJ7mIf kAyemB/AdLErQVAtnlVQlViBMahDGumsEKkgpqxD+NFqxvhxFiMaNIOEsHZnd3PCeC ZARhQ3/9u2RNBnCiRS9wyNtunLC+DDw1SqJA0qJQ= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 40/81] lib/dmadev: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:22:59 -0800 Message-Id: <1736540620-21764-41-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/dmadev/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/dmadev/meson.build b/lib/dmadev/meson.build index e66dcb66b0..61c99696ae 100644 --- a/lib/dmadev/meson.build +++ b/lib/dmadev/meson.build @@ -13,3 +13,11 @@ indirect_headers += files('rte_dmadev_core.h', 'rte_dmadev_trace_fp.h') driver_sdk_headers += files('rte_dmadev_pmd.h') deps += ['telemetry'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149835 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7DDB84605F; Fri, 10 Jan 2025 21:28:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4F96542E95; Fri, 10 Jan 2025 21:25:03 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 10C4C427DD for ; Fri, 10 Jan 2025 21:24:02 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 52ADF2064B1D; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 52ADF2064B1D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540641; bh=URjlHFUQWfkJY6KxUoPQGQpDYqtTMmnXspOKY84H9JQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JQFc1Gyk5jMfpbXrjm1yAez1mNDJgMWLVsadgDs1eIxgmotLPj/vwGpnxfWvbQ98I Tw0SXl5pd7IlcdR6fPSoulCun/JTFZNj/4rylylW2HTk3Itd+OYN5xrWQFvSoUBuyv KyCeG7mdJao+bFPDFt5kHE0hOIFnLyYd7i4aevuA= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 41/81] lib/efd: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:00 -0800 Message-Id: <1736540620-21764-42-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/efd/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/efd/meson.build b/lib/efd/meson.build index 343f14e1f3..5475c05765 100644 --- a/lib/efd/meson.build +++ b/lib/efd/meson.build @@ -10,3 +10,11 @@ endif sources = files('rte_efd.c') headers = files('rte_efd.h') deps += ['ring', 'hash'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149833 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2CB7E4605F; Fri, 10 Jan 2025 21:28:22 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 55E4A42E90; Fri, 10 Jan 2025 21:25:01 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 11395427DE for ; Fri, 10 Jan 2025 21:24:02 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 5EE002130830; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 5EE002130830 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540641; bh=YFAmTK2IDLMHsruU6NNUXud4ZTedQ1LWqzHypJ4JJwM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FpR7rMoTJKndwWUHFQ5L7U/yWYGJKMP+eVpmyXUdJKMQmmRYVe4biRoYz5PiZUIKL A45kOGKMavEJT1TLA5ypwCdvXdCZ0+cn5jrpPIenKP63su1LoONfzpR0rBS1vgRvA2 vebQCr8Tox2g4o8sHpPfl4uHtHWR5nUsdq8e5hwE= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 42/81] lib/fib: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:01 -0800 Message-Id: <1736540620-21764-43-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/fib/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/fib/meson.build b/lib/fib/meson.build index 0c19cc8201..5a1cf0226a 100644 --- a/lib/fib/meson.build +++ b/lib/fib/meson.build @@ -14,6 +14,14 @@ deps += ['rib'] deps += ['rcu'] deps += ['net'] +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach + if dpdk_conf.has('RTE_ARCH_X86_64') if target_has_avx512 cflags += ['-DCC_DIR24_8_AVX512_SUPPORT', '-DCC_TRIE_AVX512_SUPPORT'] From patchwork Fri Jan 10 20:23:02 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149834 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E74074605F; Fri, 10 Jan 2025 21:28:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 60C0342E94; Fri, 10 Jan 2025 21:25:02 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 15199427DF for ; Fri, 10 Jan 2025 21:24:02 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 6ADF9213084B; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 6ADF9213084B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540641; bh=JXXfrWun69+WrdJS+GmEWEZTQsx/fJUE7WUdJUfx5eA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=j+9ziblBKdPJlojbg2nsf28GRTCI02GtsC6D+AevIrUH7cqdRDXstRTcrr8A+noys hKDMIFCepV7EZRkrTrAcOuyuGTglol6UqluQbghhmGu92fpMYXlAwbWV7j3zx5H/3l Dfc3UADKBqXb+se8d3DpL8VR85FgeM3MimBkGp5g= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 43/81] lib/gpudev: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:02 -0800 Message-Id: <1736540620-21764-44-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/gpudev/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/gpudev/meson.build b/lib/gpudev/meson.build index d21fadc052..57022d75a4 100644 --- a/lib/gpudev/meson.build +++ b/lib/gpudev/meson.build @@ -14,3 +14,11 @@ sources = files( ) deps += ['mbuf'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149837 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 08E124605F; Fri, 10 Jan 2025 21:28:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 166D142EA1; Fri, 10 Jan 2025 21:25:05 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 2358D427B9 for ; Fri, 10 Jan 2025 21:24:02 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 77A952171FB8; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 77A952171FB8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540641; bh=lqFXpNP7rLpkhv7+bun0X9D2J9nwGbwe9a6e3alP+eM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n8V+pq+wAJHzBMGTC0jnOspN8rElT2E3lPoaMh3BPpEGP4xLxM0stHtmt8akmxDF7 augY1SHTjJiSUz+BPc8X9CkJm1OLLxJh72OLBRkx0sTM+QUKVspOP5+jzT8pdaIk4O MVNKKGFCcx7eJDsBVHGwGJk83y93SR9W9yU96Ptk= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 44/81] lib/gso: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:03 -0800 Message-Id: <1736540620-21764-45-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/gso/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/gso/meson.build b/lib/gso/meson.build index 622411df8f..f5702e200f 100644 --- a/lib/gso/meson.build +++ b/lib/gso/meson.build @@ -11,3 +11,11 @@ sources = files( ) headers = files('rte_gso.h') deps += ['ethdev'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149838 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C37AE4605F; Fri, 10 Jan 2025 21:28:45 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E843E42EA5; Fri, 10 Jan 2025 21:25:05 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 2BE39427E0 for ; Fri, 10 Jan 2025 21:24:02 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 84888238AF4D; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 84888238AF4D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540641; bh=w8dIZXfhBdgDJDmDBC2L9C2ByBHrIr7i8NzulJDYwZs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iFW7DBP7IczZ5cXwoMcrFRkaGvRBdl5/XQwMg2o2ZkRbkyEPVcG/53KZupLPZML4g zR+KgKx6DQuP8maSBNI4shwWl3bWLspZMb9KNTnhNjuIYAB5f55QLjXuEV+26EJf7x RQ4Ps2DJz2Evs0nx4zG6nJFYPnSfcepe5vJyypUY= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 45/81] lib/ip_frag: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:04 -0800 Message-Id: <1736540620-21764-46-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/ip_frag/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/ip_frag/meson.build b/lib/ip_frag/meson.build index ea2de09f75..f5c6cb4769 100644 --- a/lib/ip_frag/meson.build +++ b/lib/ip_frag/meson.build @@ -11,3 +11,11 @@ sources = files( ) headers = files('rte_ip_frag.h') deps += ['ethdev', 'hash'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:05 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149847 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 63F334605F; Fri, 10 Jan 2025 21:29:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 02A8942ECB; Fri, 10 Jan 2025 21:25:15 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 39B0C427E1 for ; Fri, 10 Jan 2025 21:24:02 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 90EA92059180; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 90EA92059180 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540641; bh=UQUVyzXQxfVmNWVhAEKEhPkgStCSGJxChp29+pxsATI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S7lGByaoBfZebitRakRNC4yUqMH1/GOVCcHrQctpFsz6I+azYpWXzvRTRMrwx0aEq QZgiSe8QaAh5Vx+Pz7ksOqjWfykKmBQ3qXDopbb0mYqz0spCIcLo8wJ51O9d6sbvEo fG8pF4sRdv8gFsQLFkvUgNxRmxh5UuWH1VJAH9zg= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 46/81] lib/jobstats: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:05 -0800 Message-Id: <1736540620-21764-47-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/jobstats/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/jobstats/meson.build b/lib/jobstats/meson.build index 6da2a95b75..e43e229247 100644 --- a/lib/jobstats/meson.build +++ b/lib/jobstats/meson.build @@ -9,3 +9,11 @@ endif sources = files('rte_jobstats.c') headers = files('rte_jobstats.h') + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149840 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CEF314605F; Fri, 10 Jan 2025 21:28:55 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A9CDA42EB0; Fri, 10 Jan 2025 21:25:07 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 39A89427BE for ; Fri, 10 Jan 2025 21:24:02 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 9EB472059181; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 9EB472059181 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540641; bh=8yvTSYn1SKJ6rK7Zy8d+KLDbMCzCfu2fmKiuOdTsvbA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BMF5TZxqGuKWGb85MBdIFzI9Va6cOPw2Z0uE/n4kVXPUSmljRs9pwWc/bDU7Zh1+9 Z6yod3VeebiEHugbwmXQOba2rIcFe51tOXAIKNzLEtic8m9R2SqHloV9EjIjb23nG0 fF3XMSNqhKaQwCvDIosCYzljIjZ3mVowK8eDPVns= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 47/81] lib/kvargs: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:06 -0800 Message-Id: <1736540620-21764-48-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/kvargs/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/kvargs/meson.build b/lib/kvargs/meson.build index 7eae744a8f..c94ddb2fe3 100644 --- a/lib/kvargs/meson.build +++ b/lib/kvargs/meson.build @@ -4,3 +4,11 @@ deps += 'log' sources = files('rte_kvargs.c') headers = files('rte_kvargs.h') + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149839 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 97FEE4605F; Fri, 10 Jan 2025 21:28:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BA37A42EA9; Fri, 10 Jan 2025 21:25:06 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 3DF20427E3 for ; Fri, 10 Jan 2025 21:24:02 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id AB4DA2059182; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com AB4DA2059182 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540641; bh=AjvCOG6womu6dFhby5P4nsh14rFr4gohDYW4an+2kRg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Es/kWbxJ5aNr+XvSpPYaUT5TIUzSjOLxJPgI7ceyL6q2fvpA6kS8A7WDKqN0S/pzE sTYOlCPrWZvHJILn/U4HkEINEgwHjGwJScafiI3XoplgljbnLyINcWbyKvtL7b2wF1 Z67Idc7fF0aLltkfSQMUkm5efALAlPH1yI4RP7Mk= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 48/81] lib/latencystats: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:07 -0800 Message-Id: <1736540620-21764-49-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/latencystats/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/latencystats/meson.build b/lib/latencystats/meson.build index 286558dd79..e3da90dd4e 100644 --- a/lib/latencystats/meson.build +++ b/lib/latencystats/meson.build @@ -4,3 +4,11 @@ sources = files('rte_latencystats.c') headers = files('rte_latencystats.h') deps += ['metrics', 'ethdev'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:08 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149841 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 707834605F; Fri, 10 Jan 2025 21:29:00 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8585A42EB4; Fri, 10 Jan 2025 21:25:08 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 3D81F427E2 for ; Fri, 10 Jan 2025 21:24:02 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id B81432059183; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com B81432059183 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540641; bh=Eicp/z9V374RpWRwqR7Kb2WKpmNlQ/gO/V1xGWdY/to=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IY9P1wqWJKTOZ9W9gZwh2WEB8gCimcf0vvCCpB+9s6rSzcSENMkhPZQPAArtpgeaf qnA0KefJ9WAZ3BF3uMzKy3jhQdG1SyWNqMY4temTS9w7+7G41IL9BXSR/zCcirNU/L qh6moecztm7YadrPjUwkNTwMB3YG8Cw7gdw7Q6kc= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 49/81] lib/log: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:08 -0800 Message-Id: <1736540620-21764-50-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/log/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/log/meson.build b/lib/log/meson.build index b3de57b9c7..5d7261a899 100644 --- a/lib/log/meson.build +++ b/lib/log/meson.build @@ -17,3 +17,11 @@ if is_linux endif headers = files('rte_log.h') + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:09 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149843 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A078D4605F; Fri, 10 Jan 2025 21:29:10 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 632ED42EBB; Fri, 10 Jan 2025 21:25:10 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 40D6C427E4 for ; Fri, 10 Jan 2025 21:24:02 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id C45312059184; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C45312059184 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540641; bh=rvoqioSf35wdjjzJfkaf3j2didBThRB1rvqWnYpXTmk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OmiCbHpK4HeXkeJvKiRaN3giSbNOkr4gu85qLrjXF1vlfGYFsi9/KytBQ54k2VY73 +t6vqhb6RNG5MVHxOZ+DRENwOf2Oy77sBtIwmooCctqqQeB3IPDnCzpGrdm2optl8A cusonrdFvgPGE7S9GuyHZ5J0xg4Iz4gZSwzwWxGo= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 50/81] lib/lpm: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:09 -0800 Message-Id: <1736540620-21764-51-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/lpm/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/lpm/meson.build b/lib/lpm/meson.build index fae4f79fb9..06525b76c1 100644 --- a/lib/lpm/meson.build +++ b/lib/lpm/meson.build @@ -21,3 +21,11 @@ indirect_headers += files( deps += ['hash'] deps += ['rcu'] deps += ['net'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:10 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149842 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 697A54605F; Fri, 10 Jan 2025 21:29:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7B08F42EB6; Fri, 10 Jan 2025 21:25:09 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 4A193427E5 for ; Fri, 10 Jan 2025 21:24:02 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id D06A72059185; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com D06A72059185 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540641; bh=/UVQvGU9X4UiAtimvLMPWFDS4RN5LBQibtuTvt8qKyQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=skKZxoa//Iaj713DnfGqAEbNnNm7NPr9uyS15An90cjbm5qwE81PBR94Z8mA1BkFt pKR6QsgWT8+lbowNCoFhEoWlLzjlVYRmDjMakWb0bUKXpaKhJRxCOaU3ART2CH0zd5 hz1QGJLH7OVLlLPKEyWk8+w2OT7U0TRDixbFT9Pc= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 51/81] lib/mbuf: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:10 -0800 Message-Id: <1736540620-21764-52-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/mbuf/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/mbuf/meson.build b/lib/mbuf/meson.build index 2cee9057a5..1b94b286a6 100644 --- a/lib/mbuf/meson.build +++ b/lib/mbuf/meson.build @@ -21,3 +21,11 @@ headers = files( 'rte_mbuf_dyn.h', ) deps += ['mempool'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:11 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149844 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2861B4605F; Fri, 10 Jan 2025 21:29:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 674F142EBE; Fri, 10 Jan 2025 21:25:11 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 5C704427E7 for ; Fri, 10 Jan 2025 21:24:02 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id DC9E82059186; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com DC9E82059186 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540641; bh=oaqgGBvIKdojc6TRR8nrPqqXZW+ZlmQFQ+GStSiGbUg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OCl8/6va8o58+M8ARF9ae3v6pBiUy9VurZZbh/bqydB9EQL8otl4ZELVarT+YSRqq F90a7pHE5F62s9t8im0xEA5uvTSQeCAJFto8skRHsQP1TPz2F09gah2y7iIULG/5nF GHUHwfdXxsGwPrQJdg/ta6VBZgcrqcg1Q6TWjYRg= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 52/81] lib/mempool: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:11 -0800 Message-Id: <1736540620-21764-53-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/mempool/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mempool/meson.build b/lib/mempool/meson.build index 8099a56466..3921945fb3 100644 --- a/lib/mempool/meson.build +++ b/lib/mempool/meson.build @@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation -extra_flags = [] +extra_flags = ['-Wvla'] foreach flag: extra_flags if cc.has_argument(flag) From patchwork Fri Jan 10 20:23:12 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149849 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C2E264605F; Fri, 10 Jan 2025 21:29:40 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9254142ED2; Fri, 10 Jan 2025 21:25:17 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 5A1D8427E6 for ; Fri, 10 Jan 2025 21:24:02 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id E8EF72059187; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com E8EF72059187 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540641; bh=G0xp6ANAucJ03JzY+CL0Bf6t4D5T2tMC3EbSnPxfQs0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LsodHEYQFFgMRrS+GqVlJdx6qsjTBVW2EfzZ/qKK8Mx9LZJI/cEP+M2i7J8wew/Vy +E2GLOROrGWlHsCfoeinDcJs4YPYHMWPnjuTPwxcalGTEPXnxAMBW5+LiK/2JgAaLV Icqe/B4f+EqR/ErdcKjbHaYFzacuXTbl0BP8+fLs= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 53/81] lib/meter: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:12 -0800 Message-Id: <1736540620-21764-54-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/meter/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/meter/meson.build b/lib/meter/meson.build index 646fd4d43f..320e09e53f 100644 --- a/lib/meter/meson.build +++ b/lib/meter/meson.build @@ -3,3 +3,11 @@ sources = files('rte_meter.c') headers = files('rte_meter.h') + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:13 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149846 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8DB294605F; Fri, 10 Jan 2025 21:29:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C54B242EC2; Fri, 10 Jan 2025 21:25:13 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 5E067427E8 for ; Fri, 10 Jan 2025 21:24:02 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 00FE42059188; Fri, 10 Jan 2025 12:23:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 00FE42059188 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540642; bh=WYvnj1BH8OAS4haRYUCdJmiuXWodMwiJZ4r1OAlsX4A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RtQE22zy8RijUL5x1rSH/Ml/p2JdAh3BabC0Xgg5fZsliHZf77JGbv5PXqbahZ3mH tRd/J6yc5l+5YqxfQ1GpjUDQWx3L51/pQd1A41lBJdTUXgrrM70VbtCKVF4hLS3eg+ a+DzU+k4lVeE60aLxozaIHzbj4tBwh+IlnDuwN4A= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 54/81] lib/metrics: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:13 -0800 Message-Id: <1736540620-21764-55-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/metrics/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/metrics/meson.build b/lib/metrics/meson.build index 8c1c4b4b49..86f320f90c 100644 --- a/lib/metrics/meson.build +++ b/lib/metrics/meson.build @@ -9,3 +9,11 @@ if dpdk_conf.has('RTE_HAS_JANSSON') endif deps += ['ethdev', 'telemetry'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149806 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9DE9C4605F; Fri, 10 Jan 2025 21:26:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1863A42DC1; Fri, 10 Jan 2025 21:24:29 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 564B9427C2 for ; Fri, 10 Jan 2025 21:24:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 361E7203D60C; Fri, 10 Jan 2025 12:24:00 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 361E7203D60C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540640; bh=sLB3y6sar+sdMDnJNipkAZBGAy1Zd0ogYtZH5IV/5ds=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kZQXE0OFMvzIxSf1Wr8Y/uamhEqshThF7w11MRIZ6T5H8fODTQfAOjAWJEtHgpKEV al6CspEnf7m3bM6mXFo7aBYAAz14fqQ+whZe8ESR32EuZFkv5BDv+z0bNTU/jlXbbk 7gznJvhL8qdF+y7AHiU5awVsAB2pua68vHdsOP9Y= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 55/81] lib/mldev: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:14 -0800 Message-Id: <1736540620-21764-56-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/mldev/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/mldev/meson.build b/lib/mldev/meson.build index 2c933baad6..d49302f021 100644 --- a/lib/mldev/meson.build +++ b/lib/mldev/meson.build @@ -48,3 +48,11 @@ if get_option('buildtype').contains('debug') else cflags += [ '-URTE_LIBRTE_ML_DEV_DEBUG' ] endif + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149845 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 990C34605F; Fri, 10 Jan 2025 21:29:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A32E242EC5; Fri, 10 Jan 2025 21:25:12 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 5EAD2427E9 for ; Fri, 10 Jan 2025 21:24:02 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 0D24D2059189; Fri, 10 Jan 2025 12:24:00 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 0D24D2059189 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540642; bh=dROehuLL+FaLS8LMfH7JiKlOpg3tqVC75ixijXU5aTI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dnED/i4ZsLQ/JLJSOG+VDPaVvh7JhtHXhZO9GXQy5mUMgJ4vwMrrexmtPz2YufyZa siiB9ijccWaymeKtvYQrY0SaEtLe8Ut9GZMvnDb+z2s6Gd/QvQ/Svp8Z4my43IToTf et7jXq8Uc2/PFULm976aD9FuJ0Yf/5T5IiEVUXrI= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 56/81] lib/net: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:15 -0800 Message-Id: <1736540620-21764-57-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/net/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/net/meson.build b/lib/net/meson.build index 8afcc4ed37..3194681521 100644 --- a/lib/net/meson.build +++ b/lib/net/meson.build @@ -39,6 +39,14 @@ sources = files( ) deps += ['mbuf'] +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach + if dpdk_conf.has('RTE_ARCH_X86_64') net_crc_sse42_cpu_support = (cc.get_define('__PCLMUL__', args: machine_args) != '') net_crc_avx512_cpu_support = ( From patchwork Fri Jan 10 20:23:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149815 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 69F664605F; Fri, 10 Jan 2025 21:26:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A10EF42E3A; Fri, 10 Jan 2025 21:24:39 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id A7F05427CC for ; Fri, 10 Jan 2025 21:24:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 42CA2203D60D; Fri, 10 Jan 2025 12:24:00 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 42CA2203D60D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540640; bh=sNoKPlq1UZZGeID88E12LHER2vCC8tHwEINBFQWDVHU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S7ESy8P49hcnP7A/2BctIQeSlu3smcNbI5YIv+ajzP9D7CgWrDtDdKg+tZYnRU3CO RTaosQMqwFqYbIXo0YiAVk1xnloyV+SOBZv88kWLoDwTVP6vnmgEQ7FKHDSx7Wm6Y+ rgxJh/KyDW67rHgTJSD1AYveXBy/SkwHbW6Qmpoc= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 57/81] lib/node: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:16 -0800 Message-Id: <1736540620-21764-58-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/node/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/node/meson.build b/lib/node/meson.build index 0bed97a96c..4c7361a53a 100644 --- a/lib/node/meson.build +++ b/lib/node/meson.build @@ -35,3 +35,11 @@ headers = files( # Strict-aliasing rules are violated by uint8_t[] to context size casts. cflags += '-fno-strict-aliasing' deps += ['graph', 'mbuf', 'lpm', 'ethdev', 'mempool', 'cryptodev', 'ip_frag'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149818 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 31EBF4605F; Fri, 10 Jan 2025 21:27:04 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 21E0F42E4D; Fri, 10 Jan 2025 21:24:43 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id B2BF9427CD for ; Fri, 10 Jan 2025 21:24:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 4FB7A203D60E; Fri, 10 Jan 2025 12:24:00 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 4FB7A203D60E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540640; bh=aozPt66Vg5PXWGh8tJO4Mv+8hfkdOZGwTdFyVkh8p+g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iWy2yRCgn4xgU4S4mpi9Zlj4wHrDm1Ovoz0vY23WyQQ/yMRUFj01LoFzEJnuv8Aqm WBy627Td83cvweLUfj6e/bnT6J0aUXQa/WKJs9Y0uRhMYSSb3sdbMqcR04T5ovBjQ5 RiiScXquBuV71NXJo0nJLKL/pfJ7xjzgxwWNGexo= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 58/81] lib/pcapng: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:17 -0800 Message-Id: <1736540620-21764-59-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/pcapng/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/pcapng/meson.build b/lib/pcapng/meson.build index 4549925d41..0ccaf2dcfd 100644 --- a/lib/pcapng/meson.build +++ b/lib/pcapng/meson.build @@ -5,3 +5,11 @@ sources = files('rte_pcapng.c') headers = files('rte_pcapng.h') deps += ['ethdev'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149848 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 03E024605F; Fri, 10 Jan 2025 21:29:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6C12642ECE; Fri, 10 Jan 2025 21:25:16 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 60F0D4281D for ; Fri, 10 Jan 2025 21:24:02 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 1A03C205918A; Fri, 10 Jan 2025 12:24:00 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 1A03C205918A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540642; bh=4bcbIT8SqeGxnG36nhSEhRxnfqCpb/YupgrnMgIm44I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c8payHxWDZxQVuDJLCfiAhaPijEgJ36YT9MQqn2WpNpzxHRAG91alCupkr/NFG8QZ gQ39+J3J/9j2+0BL3+Ug1IZ9pwlxoiU0NWbea9+R5016TsMD6y45OKzpYEwE8KfZPc sjyGcfL4BTaUB+tXW7o3w+fkF9l0wdivd6qOKqJc= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 59/81] lib/pci: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:18 -0800 Message-Id: <1736540620-21764-60-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/pci/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/pci/meson.build b/lib/pci/meson.build index dd41cd5068..88cfd2a238 100644 --- a/lib/pci/meson.build +++ b/lib/pci/meson.build @@ -3,3 +3,11 @@ sources = files('rte_pci.c') headers = files('rte_pci.h') + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149819 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0B5424605F; Fri, 10 Jan 2025 21:27:09 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6D1C442E48; Fri, 10 Jan 2025 21:24:44 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id B880E427CF for ; Fri, 10 Jan 2025 21:24:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 5BF0D203D60F; Fri, 10 Jan 2025 12:24:00 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 5BF0D203D60F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540640; bh=LOawvM8rNojH3CNCl+Tyzj6J3KieHdkfF/giwkOpnrY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SdHgnL2Yxz0+DQK3zh2ILICTZmruBLpBXktwCN26FEDmoEj5udNUOUgH7C+yWTMZY Bo8hUy975DqFi/9PQtsxhKCRG5uNTA2wFSiRoLuA3bbVJ58HrmMIc/qMvWQ/xOUxEg yFiqA1NzquzCnFCm4ibUwkkhGDZGZuKDngbutcno= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 60/81] lib/port: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:19 -0800 Message-Id: <1736540620-21764-61-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/port/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/port/meson.build b/lib/port/meson.build index b597772872..4a09af361f 100644 --- a/lib/port/meson.build +++ b/lib/port/meson.build @@ -46,3 +46,11 @@ if dpdk_conf.has('RTE_HAS_LIBPCAP') dpdk_conf.set('RTE_PORT_PCAP', 1) ext_deps += pcap_dep # dependency provided in config/meson.build endif + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:20 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149808 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A894F4605F; Fri, 10 Jan 2025 21:26:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BAEEF42D7D; Fri, 10 Jan 2025 21:24:31 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 6A00D427BB for ; Fri, 10 Jan 2025 21:24:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 6840C203D610; Fri, 10 Jan 2025 12:24:00 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 6840C203D610 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540640; bh=NqT+nkxjGKQLVmyNi/uO9VQVrLrsmifT7q+Utbd0Gdk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KSHoGfHE16SXkGTHb3eqNKFI/psGC7yHq8svL3ouJpzB/JbdZAGTiUdB3UW9eWXyy zdvOBUBOwyqB2zN5wXxlJJyFOe/Q3iYREHiSdLhwhpImTdduW3PpWtttRdaNWwj1jL CCvU6dZGJDWVN71iSZ+uZ6ewksZ/OUXrZlPsMRns= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 61/81] lib/ptr_compress: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:20 -0800 Message-Id: <1736540620-21764-62-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/ptr_compress/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/ptr_compress/meson.build b/lib/ptr_compress/meson.build index e92706a45f..7074348513 100644 --- a/lib/ptr_compress/meson.build +++ b/lib/ptr_compress/meson.build @@ -2,3 +2,11 @@ # Copyright(c) 2024 Arm Limited headers = files('rte_ptr_compress.h') + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149826 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AE54C4605F; Fri, 10 Jan 2025 21:27:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EB92842E79; Fri, 10 Jan 2025 21:24:53 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id C03EF427D0 for ; Fri, 10 Jan 2025 21:24:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 74953203D611; Fri, 10 Jan 2025 12:24:00 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 74953203D611 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540640; bh=MBM9+j/DpI3SM+Lc7oRBEYP1O6mIjGOX0Vw1r6sHAyk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UYcXFS6yRTck1l3p7xQHRDYtnKvDzm06FS5T5hskqID1ubcBbX1TX0WjjNflvDCdJ wAxI7EEBmCpXxcGRbHtfbjwTWxYKP+nJCDZa+40tg6Zq7hr7rgtfKPeQGgpAt5KNY7 RDWYw2xmvTnnqyIZF1JGqB1XkqpNl/7QQju9bxqE= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 62/81] lib/rawdev: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:21 -0800 Message-Id: <1736540620-21764-63-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/rawdev/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/rawdev/meson.build b/lib/rawdev/meson.build index 7dfc3d5cf9..5e60255676 100644 --- a/lib/rawdev/meson.build +++ b/lib/rawdev/meson.build @@ -11,3 +11,11 @@ sources = files('rte_rawdev.c') headers = files('rte_rawdev.h', 'rte_rawdev_pmd.h') deps += ['telemetry'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149814 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 962B84605F; Fri, 10 Jan 2025 21:26:45 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8309742E0B; Fri, 10 Jan 2025 21:24:38 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 82DC9427BF for ; Fri, 10 Jan 2025 21:24:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 82173203D612; Fri, 10 Jan 2025 12:24:00 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 82173203D612 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540640; bh=0MILR2TnmCqI4NYWpwbwrPBbsOJoUMQK4IwmSxDdnAc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ueiwza38v2C44+J3z2w/nfR7LqSnn9EQVMYPodCgpYPyJjgot4Wsu+lYkW0teCuap 5HCrFctPuNQcpWApoPBx9/TlQher8NNhlNX7Bih87gJdS7VvKosnzSfQjUkCJp7wQo X5M7QRzcjAavYrzleqDvipBa1csNUmeDN/DLeJdI= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 63/81] lib/reorder: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:22 -0800 Message-Id: <1736540620-21764-64-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/reorder/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/reorder/meson.build b/lib/reorder/meson.build index 03aed53d90..5197da9298 100644 --- a/lib/reorder/meson.build +++ b/lib/reorder/meson.build @@ -4,3 +4,11 @@ sources = files('rte_reorder.c') headers = files('rte_reorder.h') deps += ['mbuf'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149811 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7BF6C4605F; Fri, 10 Jan 2025 21:26:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 17E0942DE9; Fri, 10 Jan 2025 21:24:35 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 841B8427C6 for ; Fri, 10 Jan 2025 21:24:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 8E513203D613; Fri, 10 Jan 2025 12:24:00 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 8E513203D613 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540640; bh=FjvewwOVi8VSPyda74s4tGO/X/z9p0Fy52AEQhDdWAQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jv3Eiy0stIPna0g3fNqKifH843g+O0GKVrsoxuGc0or/GDq6qf/gCS152k7C5RWa9 Dt7ZxBqNje2UfZmVC03FluUTjimFwY81k1YGr295it3mWVzXYOUl1q/A5iFnmcTrzH L7K5+JnxZKV5zpNHAh9pRp1YTx9Xb7uA/7vHr/VA= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 64/81] lib/rib: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:23 -0800 Message-Id: <1736540620-21764-65-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/rib/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/rib/meson.build b/lib/rib/meson.build index e98f708481..58fcb825a8 100644 --- a/lib/rib/meson.build +++ b/lib/rib/meson.build @@ -5,3 +5,11 @@ sources = files('rte_rib.c', 'rte_rib6.c') headers = files('rte_rib.h', 'rte_rib6.h') deps += ['net', 'mempool'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149855 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E9C164605F; Fri, 10 Jan 2025 21:30:07 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B143A42EE9; Fri, 10 Jan 2025 21:25:24 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id C197D42D0C for ; Fri, 10 Jan 2025 21:24:02 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 7DDCF2059192; Fri, 10 Jan 2025 12:24:00 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 7DDCF2059192 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540642; bh=I7ZpF9nQkhAou+Ab/Vhf3QiKtKECSBEc08MYUFIu9m0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sjfpgXrUbnuCcfpKULCyCt2VxBNj55eR8liGSAcSX4b/v36mAhrSZYXBp0muvpbbN 9U4W+9i6QL7pkZDuHd0hC+5zfq0CjN3xbjnDMCE7zOdMfsN27T8+5B1ghxiNtmUHya DdaBnx0A4fVUTsrUVt0lojfyVTtG35W+ytlZzmS8= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 65/81] lib/ring: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:24 -0800 Message-Id: <1736540620-21764-66-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/ring/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/ring/meson.build b/lib/ring/meson.build index 7fca958ed7..c18033c205 100644 --- a/lib/ring/meson.build +++ b/lib/ring/meson.build @@ -19,3 +19,11 @@ indirect_headers += files ( 'rte_ring_rts_elem_pvt.h', ) deps += ['telemetry'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149851 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 087864605F; Fri, 10 Jan 2025 21:29:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 02B8342ED7; Fri, 10 Jan 2025 21:25:20 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 6D51F42830 for ; Fri, 10 Jan 2025 21:24:02 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 25F20205918B; Fri, 10 Jan 2025 12:24:00 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 25F20205918B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540642; bh=gjSeqk9coCoHaFP4n3DDKptrFB1CdrIryr4cpevBReY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TjjNUxb7i8yChDci1K+AtCgVMxD9VSrEUMZBzUf31ndAA98Jyq3THieoIBD/lsFoE oRLb9i7OjKWDY/RWyoVC67PrGD6VAOtM1A8valPCHuUnibIzf7m6+MjsiIvBoRL2nJ r9Co6fYnqjajxZjYmVg9OTZG+2YqhCnLIcmVxl+8= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 66/81] lib/sched: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:25 -0800 Message-Id: <1736540620-21764-67-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/sched/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/sched/meson.build b/lib/sched/meson.build index df75db51ed..78524c7e07 100644 --- a/lib/sched/meson.build +++ b/lib/sched/meson.build @@ -16,3 +16,11 @@ headers = files( 'rte_pie.h', ) deps += ['mbuf', 'meter'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149863 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5C1BF4605F; Fri, 10 Jan 2025 21:30:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 35FF642F01; Fri, 10 Jan 2025 21:25:33 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id CCEE942D26 for ; Fri, 10 Jan 2025 21:24:02 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 89D3C2059193; Fri, 10 Jan 2025 12:24:00 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 89D3C2059193 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540642; bh=vKbla69GmOOzXRgl2W8QN3TR2uQBALzek1lSHWiWHHA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iwh/Azv6ZeNLVejo3B60ErCxbHfZra+//hkUDWDqX3hFhflxfC0hsZTMkRTX2s0Lt zONlkoQF980+JtJRekecnC4/Gr+yALNyBQsUWHnCGzJtVTkPGgtsP+VHyuHORl00le U+GBYxhJa4cCzMvWbHzRuq5hJ+JpoTCVjdQMxn64= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 67/81] lib/security: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:26 -0800 Message-Id: <1736540620-21764-68-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/security/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/security/meson.build b/lib/security/meson.build index 1034a7a299..6d0cefc943 100644 --- a/lib/security/meson.build +++ b/lib/security/meson.build @@ -4,3 +4,11 @@ sources = files('rte_security.c') headers = files('rte_security.h', 'rte_security_driver.h') deps += ['mempool', 'cryptodev', 'net'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149860 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7980B4605F; Fri, 10 Jan 2025 21:30:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F08C042EF7; Fri, 10 Jan 2025 21:25:29 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id DA5A3427C3 for ; Fri, 10 Jan 2025 21:24:02 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 9683E2059194; Fri, 10 Jan 2025 12:24:00 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 9683E2059194 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540642; bh=vcI1HTSM3YLPS+0VhJAVSSDHgHVeyzrCBO+/+VFkgPc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iip7ix0hoOu23QJ3NtQVfIt5QDqHNoju5/t/c18zDNGpThZp8hLmLYFEGlfNedw1+ SXFv9W2K0xsTCA82Lr+E6Lmb0+F5c52KCmrZUNSxW/madkJQBIOPfohABH3NVkNUMw AM36N5ohg177iRhoRwQTX901QEc/q7eXzOZILx00= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 68/81] lib/stack: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:27 -0800 Message-Id: <1736540620-21764-69-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/stack/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/stack/meson.build b/lib/stack/meson.build index 7631a14784..e5daf96e0e 100644 --- a/lib/stack/meson.build +++ b/lib/stack/meson.build @@ -17,3 +17,11 @@ indirect_headers += files( 'rte_stack_lf_c11.h', 'rte_stack_lf_stubs.h', ) + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149854 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A78EA4605F; Fri, 10 Jan 2025 21:30:03 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9470B42EE3; Fri, 10 Jan 2025 21:25:23 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 7766742831 for ; Fri, 10 Jan 2025 21:24:02 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 338B6205918C; Fri, 10 Jan 2025 12:24:00 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 338B6205918C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540642; bh=LFSrG61tHCrRdnMT0+t5ealUq0Vgsl8HLBF+LyvjeUc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aQzF0ekcl4Lpgm3FnfQ9iCs6sqbHukS95jb9KIZPkVM42odWeIUe1oYHL+LJ/erF4 fVEFDCd6fObRCsfgh5P30an7fw43Qf2vyU8cSVC5+L2uD9AjDK1GcIETI/7CRhGm4w Bt0YKDQY5JNyvvytBgMQ4bYqw+Lw/y4fdSB1+CZ4= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 69/81] lib/telemetry: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:28 -0800 Message-Id: <1736540620-21764-70-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/telemetry/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/telemetry/meson.build b/lib/telemetry/meson.build index 489d000047..188792fbfc 100644 --- a/lib/telemetry/meson.build +++ b/lib/telemetry/meson.build @@ -5,3 +5,11 @@ deps += 'log' sources = files('telemetry.c', 'telemetry_data.c', 'telemetry_legacy.c') headers = files('rte_telemetry.h') includes += include_directories('../metrics') + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149866 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EDD1F4605F; Fri, 10 Jan 2025 21:30:56 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A6ADB42F0A; Fri, 10 Jan 2025 21:25:36 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id E704A4275D for ; Fri, 10 Jan 2025 21:24:02 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id A2B8C2059195; Fri, 10 Jan 2025 12:24:00 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com A2B8C2059195 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540642; bh=vlHGB7AvP9Dx3kWAHmjIO++g9xlZSE5Tm4TTaI3aFM4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VXw6JTG6MmWzZQjnFOR62XIIjw+OmGXL7rOtSpx8SYVx3jEs4dbhBbZWCeoeB/iX+ R4bMR37RAovYtjaWES22L3EXlOFRxL5ZdZJxYx196rPKNZkoPrIFZNbjepiAQYHlRz Ax0uojmCK0CHdQW6r2uf8ZFQ8OLG9HhsMH6olrv0= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 70/81] lib/timer: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:29 -0800 Message-Id: <1736540620-21764-71-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- lib/timer/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/timer/meson.build b/lib/timer/meson.build index 66ef89ac00..7546fc9838 100644 --- a/lib/timer/meson.build +++ b/lib/timer/meson.build @@ -5,3 +5,11 @@ sources = files('rte_timer.c') headers = files('rte_timer.h') annotate_locks = false + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149852 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8032C4605F; Fri, 10 Jan 2025 21:29:54 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4313A42EDF; Fri, 10 Jan 2025 21:25:21 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 8663442B71 for ; Fri, 10 Jan 2025 21:24:02 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 40338205918D; Fri, 10 Jan 2025 12:24:00 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 40338205918D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540642; bh=ET/ofNnP464GjDic9chSq1G/xLl68UuO3DBIZnny1l0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YYAJt4d0qg54E7SnhA8aJH3NBnnhuIsWyB1hebllUjeaNVGc8P3rCl7q7M3Q+wrMM Ao3IKLBEuHLpzg0HXYojVDqvByqMJpSgCCkOqeZd/BiZqYelgj8aN1XwQPcUl6pF6I mFI/jFrqsDK5AHYocZqeKFokJ/b/w2CPLMRH7Ta4= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 71/81] drivers/baseband: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:30 -0800 Message-Id: <1736540620-21764-72-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- drivers/baseband/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/baseband/meson.build b/drivers/baseband/meson.build index 3420d98564..6aa1b5b17e 100644 --- a/drivers/baseband/meson.build +++ b/drivers/baseband/meson.build @@ -17,3 +17,11 @@ drivers = [ std_deps = [ 'bbdev' ] log_prefix = 'pmd.bb' + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149859 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C2F5C4605F; Fri, 10 Jan 2025 21:30:25 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E922D42EFA; Fri, 10 Jan 2025 21:25:28 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id F2F21427C2 for ; Fri, 10 Jan 2025 21:24:02 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id AEB942059196; Fri, 10 Jan 2025 12:24:00 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com AEB942059196 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540642; bh=CxWAQ+OmD6uHroDCKtHniI6t/Kizg3VD1wMLzbxFoaA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MBGuLYYQPuErotV7jMA0jeF41XfCiBMICQRIef41o+8QZXAtzO2X8NKFkp258lTMb f1k6xepLkfeqgGg7urTevgunC4tnm/+soCDAth7by5M58ozDGY5wK89yL00ykAgN4+ xUX43WpIo4hEcqMA9Gqyy69BFi52i50BzACr1O8A= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 72/81] drivers/bus: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:31 -0800 Message-Id: <1736540620-21764-73-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- drivers/bus/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/bus/meson.build b/drivers/bus/meson.build index d67db8576b..59af0f920e 100644 --- a/drivers/bus/meson.build +++ b/drivers/bus/meson.build @@ -17,3 +17,11 @@ drivers = [ std_deps = ['eal'] log_prefix = 'bus' + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149865 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DE1DE4605F; Fri, 10 Jan 2025 21:30:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6CB2142E72; Fri, 10 Jan 2025 21:25:35 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 0B34042D27 for ; Fri, 10 Jan 2025 21:24:03 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id BB2282059197; Fri, 10 Jan 2025 12:24:00 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com BB2282059197 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540642; bh=q9TAI8basnv28GMKZZCbcb124jQ8WYAl6I3fQK6xaGE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EstSoNYlBcvgBhpb3+055gcH7UvpVVNFSTyhOXrJS7EKq2gHNxtIPipUGs4ZlLw6O /883EuvcgicDJdR23WvV+FZCxUCorNtru9VSLg8n/Tloq0c0YJoO1Oc6Ts9UT5SwY3 Y9S9mWJmvbGL7CRigA9UMSo7iMpXoJTMceRslnw0= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 73/81] drivers/common: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:32 -0800 Message-Id: <1736540620-21764-74-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- drivers/common/mlx5/meson.build | 1 + drivers/common/nfp/meson.build | 8 ++++++++ drivers/common/nitrox/meson.build | 8 ++++++++ drivers/common/qat/meson.build | 8 ++++++++ drivers/common/sfc_efx/meson.build | 1 + 5 files changed, 26 insertions(+) diff --git a/drivers/common/mlx5/meson.build b/drivers/common/mlx5/meson.build index 1eefc02f06..a6a67fbb85 100644 --- a/drivers/common/mlx5/meson.build +++ b/drivers/common/mlx5/meson.build @@ -26,6 +26,7 @@ sources += files( cflags_options = [ '-std=c11', + '-Wvla', '-Wno-strict-prototypes', '-D_BSD_SOURCE', '-D_DEFAULT_SOURCE', diff --git a/drivers/common/nfp/meson.build b/drivers/common/nfp/meson.build index a09d1e25e2..165be4a868 100644 --- a/drivers/common/nfp/meson.build +++ b/drivers/common/nfp/meson.build @@ -14,3 +14,11 @@ sources = files( ) deps += ['bus_pci', 'net'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach diff --git a/drivers/common/nitrox/meson.build b/drivers/common/nitrox/meson.build index f3cb42f006..46cd8ba65c 100644 --- a/drivers/common/nitrox/meson.build +++ b/drivers/common/nitrox/meson.build @@ -17,3 +17,11 @@ sources += files( includes += include_directories('../../crypto/nitrox') includes += include_directories('../../compress/nitrox') + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach diff --git a/drivers/common/qat/meson.build b/drivers/common/qat/meson.build index 5a8de16fe0..8dd38e9abd 100644 --- a/drivers/common/qat/meson.build +++ b/drivers/common/qat/meson.build @@ -119,3 +119,11 @@ if qat_crypto deps += ['security'] cflags += ['-DBUILD_QAT_SYM', '-DBUILD_QAT_ASYM'] endif + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach diff --git a/drivers/common/sfc_efx/meson.build b/drivers/common/sfc_efx/meson.build index 0cf0a23bf8..e3b90f670a 100644 --- a/drivers/common/sfc_efx/meson.build +++ b/drivers/common/sfc_efx/meson.build @@ -26,6 +26,7 @@ extra_flags += [ extra_flags += [ '-Waggregate-return', '-Wbad-function-cast', + '-Wvla', ] foreach flag: extra_flags From patchwork Fri Jan 10 20:23:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149856 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6507D4605F; Fri, 10 Jan 2025 21:30:12 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CD78A42EEB; Fri, 10 Jan 2025 21:25:25 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 90D48402EF for ; Fri, 10 Jan 2025 21:24:02 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 4C50C205918E; Fri, 10 Jan 2025 12:24:00 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 4C50C205918E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540642; bh=KIASITwg87MLNGMM3KOLnlhqOAwQs/WBl5KiSBxLvZs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z4nzj1o51ALJ+JePzAzxCdED6LK7h39KfugVs4gqc/LalwTF4ZQKlB/E7a1AMCsJW 1rMC3mhv93VyOdJWQvtE4UYEdbo1mkDB8lTZ/L97mldWOHqyMsgSwZPpGYUAILt1hY xVZyKf5A/EGO3eU6ZPTn9FYf1kit5AszMadvBsjs= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 74/81] drivers/compress: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:33 -0800 Message-Id: <1736540620-21764-75-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- drivers/compress/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/compress/meson.build b/drivers/compress/meson.build index 91d7800a4a..293ddd5836 100644 --- a/drivers/compress/meson.build +++ b/drivers/compress/meson.build @@ -15,3 +15,11 @@ drivers = [ ] std_deps = ['compressdev'] # compressdev pulls in all other needed deps + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149862 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AEA654605F; Fri, 10 Jan 2025 21:30:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2D0C342F04; Fri, 10 Jan 2025 21:25:32 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 19246427C1 for ; Fri, 10 Jan 2025 21:24:03 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id C78A72059198; Fri, 10 Jan 2025 12:24:00 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C78A72059198 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540642; bh=dDmF84bJ1BanuGEZCkQcECxrBaYk3AyP15L/ZVYf1Ek=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KYDAIvNVP3ULz4EOKdIT6icFzC/+Ww8Aw3iIl/V26kc3EB0AyHwK8nxb65KP7RLLc 69QvPUHgc1b++swJR+OBjA5V9C9gxkhjGakS/S9087KX4OfA693Kfu9S99IQZzjzof fbyCUxrRtr+4WSerQUxy+LiKUn/3xbgGPnLc1si4= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 75/81] drivers/gpu: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:34 -0800 Message-Id: <1736540620-21764-76-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- drivers/gpu/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/meson.build b/drivers/gpu/meson.build index b6edd12678..610151e9b1 100644 --- a/drivers/gpu/meson.build +++ b/drivers/gpu/meson.build @@ -4,3 +4,11 @@ drivers = [ 'cuda' ] std_deps = [ 'gpudev' ] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149850 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9757A4605F; Fri, 10 Jan 2025 21:29:45 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BB08B42ED5; Fri, 10 Jan 2025 21:25:18 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id A088E42C24 for ; Fri, 10 Jan 2025 21:24:02 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 58F74205918F; Fri, 10 Jan 2025 12:24:00 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 58F74205918F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540642; bh=VbhhjzceqtGyxndQeeRAlTSB3D/eVXdaWrgkWCzZPTE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RltFxJ3T7+t0WvZjXr02aRnf3F7LmR/7xuSYvZWvAVaf4JbKkSlU/scJ9SfDK7GJI C3ixMpYKr9C1SXGvFg4n9CsRiqfFF2cF6oNfo+npUez1CeaYH8UMjhQ1xhVYkXIMkl VjSSxvFjTCZTnfFzN0aNtfnvr9FiDy0vcRZOj9sE= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 76/81] drivers/mempool: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:35 -0800 Message-Id: <1736540620-21764-77-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- drivers/mempool/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/mempool/meson.build b/drivers/mempool/meson.build index dc88812585..4f74556eb5 100644 --- a/drivers/mempool/meson.build +++ b/drivers/mempool/meson.build @@ -14,3 +14,11 @@ drivers = [ std_deps = ['mempool'] log_prefix = 'mempool' + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149858 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4A8474605F; Fri, 10 Jan 2025 21:30:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D3FE842EF4; Fri, 10 Jan 2025 21:25:27 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 24EFB42D28 for ; Fri, 10 Jan 2025 21:24:03 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id D526F2059199; Fri, 10 Jan 2025 12:24:00 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com D526F2059199 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540642; bh=/Z5EmCOWDdohs0Mv5BP6XLehjq3kPGXacF0F6XAHFGI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m9fLU08/jUdA904HJN8ZD7WAvy1duelFU8xw4m5m6MfAwaGzkHwpfzq1HQ8Dq2VWm xXpsxeUy1oOUsIrBw2b5Jatc96OsP2z1zD+gKmyyjK2c+GD9AW34/EVPNhVwOEGGt9 B+oXVIqX7hmcfdDGOEYyZmwFQisP4hX7g/5IavEo= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 77/81] drivers/ml: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:36 -0800 Message-Id: <1736540620-21764-78-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- drivers/ml/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/ml/meson.build b/drivers/ml/meson.build index 54bc394c47..ae07c5292e 100644 --- a/drivers/ml/meson.build +++ b/drivers/ml/meson.build @@ -6,3 +6,11 @@ drivers = [ ] std_deps = ['mldev'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149864 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A19BE4605F; Fri, 10 Jan 2025 21:30:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 565FD42F08; Fri, 10 Jan 2025 21:25:34 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 319AB42D2B for ; Fri, 10 Jan 2025 21:24:03 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id E1416205919A; Fri, 10 Jan 2025 12:24:00 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com E1416205919A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540642; bh=P0BLDheSynTMlWy5O08WlqKzkh7jZ7oGs/9AjEn1ssA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qvDlOvc6cDt6bmXg6NmOz1YNHJlja5aIy1ih4GwEIc6tbeNxmTlWNP2NKdDxWTyo2 QzvJt9hGtvBWhzuV+xiH/u014+hEl/skvQZ6t0uYIaqAzEdxACkX6J3lP8njkDPQm7 yWdvhzs+bmooNFnWt6BeUQtJbcpFMlZPH50nIL04= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 78/81] drivers/power: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:37 -0800 Message-Id: <1736540620-21764-79-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- drivers/power/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/power/meson.build b/drivers/power/meson.build index 0a703bce38..e7c16e2d47 100644 --- a/drivers/power/meson.build +++ b/drivers/power/meson.build @@ -12,3 +12,11 @@ drivers = [ ] std_deps = ['power'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149853 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 08C544605F; Fri, 10 Jan 2025 21:29:59 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 70CEB427E0; Fri, 10 Jan 2025 21:25:22 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id A92AA42D0B for ; Fri, 10 Jan 2025 21:24:02 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 6525C2059190; Fri, 10 Jan 2025 12:24:00 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 6525C2059190 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540642; bh=Ytu3XHMi4fQJB4F+bkS1rhUoBW2d/nhi9loe0PIXZmI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ePdA+CyU2sO5QGIfg8E2QzgJDjf6yakpNgFkxjuOnA6zF5kUxW44xZMSMPcYoWt7f 9JQ2wchBYmh5QFMIonwpAumz6d29baEuz4r6X/ka+mw9tJLVeV/v7a1Yok1ZjrkNUO pWOEYoBZr3au+PnewSku7sGylLbOMX+YdD044rXA= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 79/81] drivers/raw: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:38 -0800 Message-Id: <1736540620-21764-80-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- drivers/raw/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/raw/meson.build b/drivers/raw/meson.build index d173ac6097..726a786e0d 100644 --- a/drivers/raw/meson.build +++ b/drivers/raw/meson.build @@ -16,3 +16,11 @@ drivers = [ 'skeleton', ] std_deps = ['rawdev'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149861 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3BFB64605F; Fri, 10 Jan 2025 21:30:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1043C42EFD; Fri, 10 Jan 2025 21:25:31 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 3C7F142D35 for ; Fri, 10 Jan 2025 21:24:03 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id EDDC0205919B; Fri, 10 Jan 2025 12:24:00 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com EDDC0205919B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540642; bh=ky/o0GC/wY+KFTAV9UL3p+oGXdJnjDCNR2pzh9yQBXE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Nd8sbrrt9Iy9o0v7MmfjmfrotHWDEZ1dlk6zenJkvzfmpgMABgi1s+PGbgtQk6DYX J/DFSTHCxhavWdrSt2dtK8TV1gO+TM509wLtj/T5aywz9fctYuClCTQ7tZ/ZhlDbFa K1zYGQLdyiOthFO97rmn7my+gFO1IzmRSgNmBoUc= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 80/81] drivers/regex: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:39 -0800 Message-Id: <1736540620-21764-81-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- drivers/regex/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/regex/meson.build b/drivers/regex/meson.build index ff2a8fea89..06614f34e2 100644 --- a/drivers/regex/meson.build +++ b/drivers/regex/meson.build @@ -6,3 +6,11 @@ drivers = [ 'cn9k', ] std_deps = ['ethdev', 'kvargs', 'regexdev'] # 'ethdev' also pulls in mbuf, net, eal etc + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach From patchwork Fri Jan 10 20:23:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Muezerie X-Patchwork-Id: 149857 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CBE3D4605F; Fri, 10 Jan 2025 21:30:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D586442EF0; Fri, 10 Jan 2025 21:25:26 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id B4D4442794 for ; Fri, 10 Jan 2025 21:24:02 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 7163C2059191; Fri, 10 Jan 2025 12:24:00 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 7163C2059191 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736540642; bh=8Ue+9N6cH7errdYHFAFXsR5KpjVZli9lY9fGrNEm1QM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ohNm7tSCsk8MURKPvSfNRaGYhxttctZ8coN6B2HjScIeAVM4pG+oLpjtOBpW8vsQR hcQOC+BGNogHSvH8XbtzBuajC4jplEsFwAnApOazYPtfRuQKbKxXt6qZcvll9Z6ok4 Kja2kJhkMYbfKRAkCTqhsRk6FE1Ms51hrDgV94c8= From: Andre Muezerie To: dev@dpdk.org Cc: konstantin.ananyev@huawei.com, homas@monjalon.net, david.marchand@redhat.com, Andre Muezerie Subject: [PATCH v14 81/81] drivers/vdpa: add compile warning about use of VLAs Date: Fri, 10 Jan 2025 12:23:40 -0800 Message-Id: <1736540620-21764-82-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1736540620-21764-1-git-send-email-andremue@linux.microsoft.com> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736540620-21764-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 MSVC does not support VLAs, so we want to prevent VLAs from being introduced under this path. Signed-off-by: Andre Muezerie --- drivers/vdpa/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/vdpa/meson.build b/drivers/vdpa/meson.build index 896e8e0304..49e94584bc 100644 --- a/drivers/vdpa/meson.build +++ b/drivers/vdpa/meson.build @@ -13,3 +13,11 @@ drivers = [ ] std_deps = ['bus_pci', 'kvargs'] std_deps += ['vhost'] + +extra_flags = ['-Wvla'] + +foreach arg: extra_flags + if cc.has_argument(arg) + cflags += arg + endif +endforeach