RE: [EXTERNAL] [PATCH v6 2/6] common/cnxk: replace variable length array

Tejasree Kondoj
2026-03-02T10:51:20Z

[-- Attachment #1: Type: text/plain, Size: 2904 bytes --]

Acked-by: Tejasree Kondoj <ktejasree@marvell.com>

From: Stephen Hemminger <stephen@networkplumber.org>
Sent: Thursday, February 5, 2026 11:26 PM
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>; Satha Koteswara Rao Kottidi <skoteshwar@marvell.com>; stable@dpdk.org; Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>; Kiran Kumar Kokkilagadda <kirankumark@marvell.com>; Sunil Kumar Kori <skori@marvell.com>; Harman Kalra <hkalra@marvell.com>
Subject: [EXTERNAL] [PATCH v6 2/6] common/cnxk: replace variable length array

This fixes errors when compiled with LTO about large VLA. .. /drivers/common/cnxk/roc_platform. c: In function ‘irq_init’: .. /drivers/common/cnxk/roc_platform. c: 92: 14: warning: argument to variable-length array is too large [-Wvla-larger-than=]
ZjQcmQRYFpfptBannerStart
Prioritize security for external emails:
Confirm sender and content safety before clicking links or opening attachments
Report Suspicious <https://us-phishalarm-ewt.proofpoint.com/EWT/v1/CRVmXkqW!tq3Z1f8UYnWa9K-cWX26ztpYTgkipucwksIFWb6OAmEPh_V3Ac4-BrjxCsV7Xh7swUxc2cswohoNMT7ip8nHpaVjKY9y6l7leDPcyhU$> ‌
ZjQcmQRYFpfptBannerEnd

This fixes errors when compiled with LTO about large VLA.

../drivers/common/cnxk/roc_platform.c: In function ‘irq_init’:

../drivers/common/cnxk/roc_platform.c:92:14: warning: argument to variable-length array is too large [-Wvla-larger-than=]

92 | char irq_set_buf[MSIX_IRQ_SET_BUF_LEN];

| ^

Since the number of IRQ is limited by EAL max interrupt vectors

use that define that already exists rather than a function call

hidden in a macro.

Bugzilla ID: 1863

Fixes: 375cb1601882 ("common/cnxk: move interrupt handling to platform-specific")

Cc: skoteshwar@marvell.com<mailto:skoteshwar@marvell.com>

Cc: stable@dpdk.org<mailto:stable@dpdk.org>

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org<mailto:stephen@networkplumber.org>>

---

drivers/common/cnxk/roc_platform.c | 4 ++--

1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/common/cnxk/roc_platform.c b/drivers/common/cnxk/roc_platform.c

index e13cb42285..1fdbf8f051 100644

--- a/drivers/common/cnxk/roc_platform.c

+++ b/drivers/common/cnxk/roc_platform.c

@@ -17,8 +17,8 @@

#include <sys/ioctl.h>

#include <unistd.h>

-#define MSIX_IRQ_SET_BUF_LEN \

- (sizeof(struct vfio_irq_set) + sizeof(int) * (plt_intr_max_intr_get(intr_handle)))

+#define MSIX_IRQ_SET_BUF_LEN \

+ (sizeof(struct vfio_irq_set) + sizeof(int) * PLT_MAX_RXTX_INTR_VEC_ID)

static int

irq_get_info(struct plt_intr_handle *intr_handle)

--

2.51.0

[-- Attachment #2: Type: text/html, Size: 13013 bytes --]