net/i40e: fix mbuf resource leakage problem
Checks
Commit Message
From: Qiming Chen <chenqiming_huawei@163.com>
In the i40evf_dev_rx_queue_start function, when the function
i40evf_switch_queue returns failed, the previously requested mbuf resource
is not released.
Fixes: 74b7496b0cb3 ("net/i40e: remove redundant queue id checks")
Cc: stable@dpdk.org
Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
---
drivers/net/i40e/i40e_ethdev_vf.c | 1 +
1 file changed, 1 insertion(+)
@@ -1822,6 +1822,7 @@ i40evf_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
/* Ready to switch the queue on */
err = i40evf_switch_queue(dev, TRUE, rx_queue_id, TRUE);
if (err) {
+ i40e_rx_queue_release_mbufs(rxq);
PMD_DRV_LOG(ERR, "Failed to switch RX queue %u on",
rx_queue_id);
return err;