From: Chengchang Tang Date: Thu, 22 Apr 2021 11:27:14 +0000 (+0800) Subject: net/tap: fix interrupt vector array size X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=2ce7bc96344542f8d3e89b41bbaaafb12e1d9f72;p=dpdk.git net/tap: fix interrupt vector array size The size of the current interrupt vector array is fixed to an integer. This patch will create an interrupt vector array based on the number of rxqs. Fixes: 4870a8cdd968 ("net/tap: support Rx interrupt") Cc: stable@dpdk.org Signed-off-by: Chengchang Tang Signed-off-by: Min Hu (Connor) Reviewed-by: Ferruh Yigit --- diff --git a/drivers/net/tap/tap_intr.c b/drivers/net/tap/tap_intr.c index 5cf4f173a0..1cacc15d9f 100644 --- a/drivers/net/tap/tap_intr.c +++ b/drivers/net/tap/tap_intr.c @@ -59,7 +59,7 @@ tap_rx_intr_vec_install(struct rte_eth_dev *dev) if (!dev->data->dev_conf.intr_conf.rxq) return 0; - intr_handle->intr_vec = malloc(sizeof(intr_handle->intr_vec[rxqs_n])); + intr_handle->intr_vec = malloc(sizeof(int) * rxqs_n); if (intr_handle->intr_vec == NULL) { rte_errno = ENOMEM; TAP_LOG(ERR,