From: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
To: dev@dpdk.org, Yongseok Koh <yskoh@mellanox.com>,
Adrien Mazarguil <adrien.mazarguil@6wind.com>
Cc: rasland@mellanox.com
Subject: [dpdk-dev] [PATCH] net/mlx5: fix all multi verification code position
Date: Thu, 11 Jan 2018 10:25:22 +0100 [thread overview]
Message-ID: <b49e5b4abb9f3f31925d3ab82f5c5f5fbdfe10c0.1515662674.git.nelio.laranjeiro@6wind.com> (raw)
All multi code should not be handled in exit part of the code but in the
mainline of the function.
Fixes: 4241d84c0a32 ("net/mlx5: fix flow type for allmulti rules")
Cc: rasland@mellanox.com
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
drivers/net/mlx5/mlx5_flow.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 334a4f4ba..f050ea713 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -1156,16 +1156,6 @@ priv_flow_convert(struct priv *priv,
attr->priority +
hash_rxq_init[parser->layer].flow_priority;
}
-exit_free:
- /* Only verification is expected, all resources should be released. */
- if (!parser->create) {
- for (i = 0; i != hash_rxq_init_n; ++i) {
- if (parser->queue[i].ibv_attr) {
- rte_free(parser->queue[i].ibv_attr);
- parser->queue[i].ibv_attr = NULL;
- }
- }
- }
if (parser->allmulti &&
parser->layer == HASH_RXQ_ETH) {
for (i = 0; i != hash_rxq_init_n; ++i) {
@@ -1177,6 +1167,16 @@ priv_flow_convert(struct priv *priv,
IBV_FLOW_ATTR_MC_DEFAULT;
}
}
+exit_free:
+ /* Only verification is expected, all resources should be released. */
+ if (!parser->create) {
+ for (i = 0; i != hash_rxq_init_n; ++i) {
+ if (parser->queue[i].ibv_attr) {
+ rte_free(parser->queue[i].ibv_attr);
+ parser->queue[i].ibv_attr = NULL;
+ }
+ }
+ }
return ret;
exit_enomem:
for (i = 0; i != hash_rxq_init_n; ++i) {
--
2.11.0
next reply other threads:[~2018-01-11 9:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-11 9:25 Nelio Laranjeiro [this message]
2018-01-17 23:02 ` Yongseok Koh
2018-01-22 11:40 ` Shahaf Shuler
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=b49e5b4abb9f3f31925d3ab82f5c5f5fbdfe10c0.1515662674.git.nelio.laranjeiro@6wind.com \
--to=nelio.laranjeiro@6wind.com \
--cc=adrien.mazarguil@6wind.com \
--cc=dev@dpdk.org \
--cc=rasland@mellanox.com \
--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).