patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 3/3] net/mlx5: fix traffic restart function to return errors
       [not found] <ad54d87cd39c1ad142fe9163c51317268e4b2b46.1518686930.git.nelio.laranjeiro@6wind.com>
@ 2018-02-15  9:29 ` Nelio Laranjeiro
  2018-02-16 14:26   ` Adrien Mazarguil
  0 siblings, 1 reply; 2+ messages in thread
From: Nelio Laranjeiro @ 2018-02-15  9:29 UTC (permalink / raw)
  To: dev; +Cc: Adrien Mazarguil, Yongseok Koh, stable

priv_dev_traffic_restart() was considering nothing could fail whereas it
can.

Fixes: 272733b5ebfd ("net/mlx5: use flow to enable unicast traffic")
Cc: stable@dpdk.org

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
---
 drivers/net/mlx5/mlx5_trigger.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index 2918ba0e9..2895e57e7 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -391,11 +391,15 @@ priv_dev_traffic_disable(struct priv *priv, struct rte_eth_dev *dev)
 int
 priv_dev_traffic_restart(struct priv *priv, struct rte_eth_dev *dev)
 {
+	int ret = 0;
+
 	if (dev->data->dev_started) {
-		priv_dev_traffic_disable(priv, dev);
-		priv_dev_traffic_enable(priv, dev);
+		ret = priv_dev_traffic_disable(priv, dev);
+		if (ret)
+			return ret;
+		ret = priv_dev_traffic_enable(priv, dev);
 	}
-	return 0;
+	return ret;
 }
 
 /**
-- 
2.11.0

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

* Re: [dpdk-stable] [PATCH 3/3] net/mlx5: fix traffic restart function to return errors
  2018-02-15  9:29 ` [dpdk-stable] [PATCH 3/3] net/mlx5: fix traffic restart function to return errors Nelio Laranjeiro
@ 2018-02-16 14:26   ` Adrien Mazarguil
  0 siblings, 0 replies; 2+ messages in thread
From: Adrien Mazarguil @ 2018-02-16 14:26 UTC (permalink / raw)
  To: Nelio Laranjeiro; +Cc: dev, Yongseok Koh, stable

On Thu, Feb 15, 2018 at 10:29:27AM +0100, Nelio Laranjeiro wrote:
> priv_dev_traffic_restart() was considering nothing could fail whereas it
> can.

How about simply describing it as:

 priv_dev_traffic_restart() must not ignore errors.

> Fixes: 272733b5ebfd ("net/mlx5: use flow to enable unicast traffic")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> Acked-by: Yongseok Koh <yskoh@mellanox.com>

Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>

-- 
Adrien Mazarguil
6WIND

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

end of thread, other threads:[~2018-02-16 14:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <ad54d87cd39c1ad142fe9163c51317268e4b2b46.1518686930.git.nelio.laranjeiro@6wind.com>
2018-02-15  9:29 ` [dpdk-stable] [PATCH 3/3] net/mlx5: fix traffic restart function to return errors Nelio Laranjeiro
2018-02-16 14:26   ` Adrien Mazarguil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).