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-dev] [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 prev parent reply other threads:[~2018-02-15 9:28 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-15 9:29 [dpdk-dev] [PATCH 1/3] net/mlx5: add missing function documentation Nelio Laranjeiro
2018-02-15 9:29 ` [dpdk-dev] [PATCH 2/3] net/mlx5: convert return errno to negative ones Nelio Laranjeiro
2018-02-16 14:26 ` Adrien Mazarguil
2018-02-15 9:29 ` Nelio Laranjeiro [this message]
2018-02-16 14:26 ` [dpdk-dev] [PATCH 3/3] net/mlx5: fix traffic restart function to return errors Adrien Mazarguil
2018-02-16 14:26 ` [dpdk-dev] [PATCH 1/3] net/mlx5: add missing function documentation Adrien Mazarguil
2018-02-28 15:12 ` [dpdk-dev] [PATCH v2 00/10] net/mlx5: clean driver Nelio Laranjeiro
2018-03-05 12:20 ` [dpdk-dev] [PATCH v3 " Nelio Laranjeiro
2018-03-18 6:33 ` Shahaf Shuler
2018-03-21 17:34 ` Ferruh Yigit
2018-03-05 12:20 ` [dpdk-dev] [PATCH v3 01/10] net/mlx5: fix sriov flag Nelio Laranjeiro
2018-03-05 12:20 ` [dpdk-dev] [PATCH v3 02/10] net/mlx5: name parameters in function prototypes Nelio Laranjeiro
2018-03-05 12:20 ` [dpdk-dev] [PATCH v3 03/10] net/mlx5: mark parameters with unused attribute Nelio Laranjeiro
2018-03-05 12:21 ` [dpdk-dev] [PATCH v3 04/10] net/mlx5: normalize function prototypes Nelio Laranjeiro
2018-03-05 12:21 ` [dpdk-dev] [PATCH v3 05/10] net/mlx5: add missing function documentation Nelio Laranjeiro
2018-03-05 12:21 ` [dpdk-dev] [PATCH v3 06/10] net/mlx5: remove useless empty lines Nelio Laranjeiro
2018-03-05 12:21 ` [dpdk-dev] [PATCH v3 07/10] net/mlx5: remove control path locks Nelio Laranjeiro
2018-03-05 12:21 ` [dpdk-dev] [PATCH v3 08/10] net/mlx5: prefix all function with mlx5 Nelio Laranjeiro
2018-03-05 12:21 ` [dpdk-dev] [PATCH v3 09/10] net/mlx5: change non failing function return values Nelio Laranjeiro
2018-03-05 12:21 ` [dpdk-dev] [PATCH v3 10/10] net/mlx5: standardize on negative errno values Nelio Laranjeiro
2018-02-28 15:12 ` [dpdk-dev] [PATCH v2 01/10] net/mlx5: fix sriov flag Nelio Laranjeiro
2018-02-28 15:12 ` [dpdk-dev] [PATCH v2 02/10] net/mlx5: name parameters in function prototypes Nelio Laranjeiro
2018-02-28 15:12 ` [dpdk-dev] [PATCH v2 03/10] net/mlx5: mark parameters with unused attribute Nelio Laranjeiro
2018-02-28 15:12 ` [dpdk-dev] [PATCH v2 04/10] net/mlx5: normalize function prototypes Nelio Laranjeiro
2018-02-28 15:12 ` [dpdk-dev] [PATCH v2 05/10] net/mlx5: add missing function documentation Nelio Laranjeiro
2018-02-28 15:12 ` [dpdk-dev] [PATCH v2 06/10] net/mlx5: remove useless empty lines Nelio Laranjeiro
2018-02-28 15:12 ` [dpdk-dev] [PATCH v2 07/10] net/mlx5: remove control path locks Nelio Laranjeiro
2018-02-28 15:12 ` [dpdk-dev] [PATCH v2 08/10] net/mlx5: prefix all function with mlx5 Nelio Laranjeiro
2018-02-28 15:12 ` [dpdk-dev] [PATCH v2 09/10] net/mlx5: change non failing function return values Nelio Laranjeiro
2018-02-28 15:12 ` [dpdk-dev] [PATCH v2 10/10] net/mlx5: standardize on negative errno values Nelio Laranjeiro
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).