net/ixgbe: fix queue resource leak
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: 0eb609239efd ("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>
This commit is contained in:
parent
03f83d6c5c
commit
3a732dce93
@ -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) {
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user