fm10k: fix Tx queue cleaning after start error
authorWang Xiao W <xiao.w.wang@intel.com>
Fri, 31 Jul 2015 05:05:47 +0000 (13:05 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 3 Aug 2015 14:53:07 +0000 (16:53 +0200)
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>
drivers/net/fm10k/fm10k_ethdev.c

index e91cc2d..a69c990 100644 (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;