[dpdk-dev] [PATCH 2/2] net/tap: fix tap interrupt vector array size
Stephen Hemminger
stephen at networkplumber.org
Thu Apr 22 17:20:45 CEST 2021
On Thu, 22 Apr 2021 19:27:14 +0800
"Min Hu (Connor)" <humin29 at huawei.com> wrote:
> diff --git a/drivers/net/tap/tap_intr.c b/drivers/net/tap/tap_intr.c
> index 5cf4f17..1cacc15 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);
Maybe calloc() here would be good idea?
More information about the dev
mailing list