All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] net/mlx5: fix return value of start operation
@ 2018-01-18 13:00 Olivier Matz
  2018-01-18 13:00 ` [PATCH 2/2] net/mlx5: fix allocation when no memory on device NUMA node Olivier Matz
                   ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: Olivier Matz @ 2018-01-18 13:00 UTC (permalink / raw)
  To: dev, Adrien Mazarguil, Nelio Laranjeiro, Yongseok Koh; +Cc: stable

On error, mlx5_dev_start() does not return a negative value
as it is supposed to do. The consequence is that the application
(ex: testpmd) does not notice that the port is not started
and begins the rxtx on an uninitialized port, which crashes.

Fixes: e1016cb73383 ("net/mlx5: fix Rx interrupts management")
Cc: stable@dpdk.org

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
 drivers/net/mlx5/mlx5_trigger.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index 1a20967a2..44f702daa 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -166,6 +166,7 @@ mlx5_dev_start(struct rte_eth_dev *dev)
 		ERROR("%p: an error occurred while configuring control flows:"
 		      " %s",
 		      (void *)priv, strerror(err));
+		err = -err;
 		goto error;
 	}
 	err = priv_flow_start(priv, &priv->flows);
@@ -173,6 +174,7 @@ mlx5_dev_start(struct rte_eth_dev *dev)
 		ERROR("%p: an error occurred while configuring flows:"
 		      " %s",
 		      (void *)priv, strerror(err));
+		err = -err;
 		goto error;
 	}
 	err = priv_rx_intr_vec_enable(priv);
@@ -196,7 +198,7 @@ mlx5_dev_start(struct rte_eth_dev *dev)
 	priv_rxq_stop(priv);
 	priv_flow_delete_drop_queue(priv);
 	priv_unlock(priv);
-	return -err;
+	return err;
 }
 
 /**
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2018-01-22 20:27 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-18 13:00 [PATCH 1/2] net/mlx5: fix return value of start operation Olivier Matz
2018-01-18 13:00 ` [PATCH 2/2] net/mlx5: fix allocation when no memory on device NUMA node Olivier Matz
2018-01-18 16:19   ` Nélio Laranjeiro
2018-01-18 16:04 ` [PATCH 1/2] net/mlx5: fix return value of start operation Nélio Laranjeiro
2018-01-18 16:13   ` Olivier Matz
2018-01-19  6:28     ` Yongseok Koh
2018-01-19  8:35     ` Nélio Laranjeiro
2018-01-19  8:43       ` Olivier Matz
2018-01-19 13:30         ` Olivier Matz
2018-01-19 13:43           ` Nélio Laranjeiro
2018-01-19 14:18           ` Nélio Laranjeiro
2018-01-19 13:42 ` Olivier Matz
2018-01-19 16:25 ` [PATCH v2 " Olivier Matz
2018-01-19 16:25   ` [PATCH v2 2/2] net/mlx5: fix allocation when no memory on device NUMA node Olivier Matz
2018-01-21  6:58     ` [dpdk-stable] " Shahaf Shuler
2018-01-22  8:20       ` Olivier Matz
2018-01-22 12:33   ` [PATCH v3 1/2] net/mlx5: fix return value of start operation Olivier Matz
2018-01-22 12:33     ` [PATCH v3 2/2] net/mlx5: fix allocation when no memory on device NUMA node Olivier Matz
2018-01-22 20:27     ` [dpdk-stable] [PATCH v3 1/2] net/mlx5: fix return value of start operation Shahaf Shuler

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.