fm10k: fix Tx queue cleaning after start error

When a Tx queue fails to start in fm10k_dev_start, all Rx queues
and Tx queues that are started should be cleaned before the
function returns an error.

Signed-off-by: Wang Xiao W <xiao.w.wang@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
This commit is contained in:
Wang Xiao W 2015-07-31 13:05:47 +08:00 committed by Thomas Monjalon
parent aa86864085
commit 55a3fb5f7c

View File

@ -786,6 +786,8 @@ fm10k_dev_start(struct rte_eth_dev *dev)
diag = fm10k_dev_tx_queue_start(dev, i);
if (diag != 0) {
int j;
for (j = 0; j < i; ++j)
tx_queue_clean(dev->data->tx_queues[j]);
for (j = 0; j < dev->data->nb_rx_queues; ++j)
rx_queue_clean(dev->data->rx_queues[j]);
return diag;