From: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
To: dev@dpdk.org
Cc: Adrien Mazarguil <adrien.mazarguil@6wind.com>,
Yongseok Koh <yskoh@mellanox.com>,
stable@dpdk.org
Subject: [dpdk-stable] [PATCH 3/3] net/mlx5: fix traffic restart function to return errors
Date: Thu, 15 Feb 2018 10:29:27 +0100 [thread overview]
Message-ID: <20fc1ef17c45c727fe72182fa0ba89313fdb430d.1518686930.git.nelio.laranjeiro@6wind.com> (raw)
In-Reply-To: <ad54d87cd39c1ad142fe9163c51317268e4b2b46.1518686930.git.nelio.laranjeiro@6wind.com>
In-Reply-To: <ad54d87cd39c1ad142fe9163c51317268e4b2b46.1518686930.git.nelio.laranjeiro@6wind.com>
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
next parent reply other threads:[~2018-02-15 9:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <ad54d87cd39c1ad142fe9163c51317268e4b2b46.1518686930.git.nelio.laranjeiro@6wind.com>
2018-02-15 9:29 ` Nelio Laranjeiro [this message]
2018-02-16 14:26 ` Adrien Mazarguil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20fc1ef17c45c727fe72182fa0ba89313fdb430d.1518686930.git.nelio.laranjeiro@6wind.com \
--to=nelio.laranjeiro@6wind.com \
--cc=adrien.mazarguil@6wind.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
--cc=yskoh@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).