Skip to content

Commit

Permalink
net/ixgbe: fix queue resource leak
Browse files Browse the repository at this point in the history
[ upstream commit 3a732dc ]

In the ixgbevf_dev_start function, after initializing the rxtx queue, if
an exception occurs in the subsequent function, the rxtx queue needs to
be released. The patch solves the problem of queue resource leakage.

Fixes: 0eb6092 ("ixgbe: enable Rx queue interrupts for PF and VF")

Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
  • Loading branch information
Qiming Chen authored and cpaelzer committed Nov 30, 2021
1 parent 61e898b commit 17aff3d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/net/ixgbe/ixgbe_ethdev.c
Expand Up @@ -5409,8 +5409,10 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
* now only one vector is used for Rx queue
*/
intr_vector = 1;
if (rte_intr_efd_enable(intr_handle, intr_vector))
if (rte_intr_efd_enable(intr_handle, intr_vector)) {
ixgbe_dev_clear_queues(dev);
return -1;
}
}

if (rte_intr_dp_is_en(intr_handle) && !intr_handle->intr_vec) {
Expand All @@ -5420,6 +5422,7 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
if (intr_handle->intr_vec == NULL) {
PMD_INIT_LOG(ERR, "Failed to allocate %d rx_queues"
" intr_vec", dev->data->nb_rx_queues);
ixgbe_dev_clear_queues(dev);
return -ENOMEM;
}
}
Expand Down

0 comments on commit 17aff3d

Please sign in to comment.