From 55a3fb5f7c41ec1a1cfb094d7ec3914ea3502f7b Mon Sep 17 00:00:00 2001 From: Wang Xiao W Date: Fri, 31 Jul 2015 13:05:47 +0800 Subject: [PATCH] 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 Acked-by: Jing Chen --- drivers/net/fm10k/fm10k_ethdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index e91cc2de4d..a69c990ec8 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -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; -- 2.20.1