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: 4870a8cdd9 ("net/tap: support Rx interrupt")
Cc: stable@dpdk.org

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
This commit is contained in:
Chengchang Tang 2021-04-22 19:27:14 +08:00 committed by Ferruh Yigit
parent 0ca0c47397
commit 2ce7bc9634

View File

@ -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,