Skip to content

Commit

Permalink
net/ixgbe: fix queue resource leak
Browse files Browse the repository at this point in the history
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")
Cc: stable@dpdk.org

Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
  • Loading branch information
Qiming Chen authored and qzhan16 committed Sep 6, 2021
1 parent 03f83d6 commit 3a732dc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/net/ixgbe/ixgbe_ethdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -5362,8 +5362,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 @@ -5373,6 +5375,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 3a732dc

Please sign in to comment.