From: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
To: dev@dpdk.org
Cc: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Subject: [dpdk-dev] [PATCH 1/2] net/mlx5: fix flow API mark combined with drop
Date: Fri, 20 Jan 2017 16:27:28 +0100 [thread overview]
Message-ID: <582098dca09b3d3bb70ec24e6c44426a63348392.1484925981.git.nelio.laranjeiro@6wind.com> (raw)
Fixes: ea3bc3b1df94 ("net/mlx5: support mark flow action")
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
drivers/net/mlx5/mlx5_flow.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index d7ed686..7b97a61 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -480,7 +480,7 @@ priv_flow_validate(struct priv *priv,
goto exit_action_not_supported;
}
}
- if (action.mark && !flow->ibv_attr)
+ if (action.mark && !flow->ibv_attr && !action.drop)
flow->offset += sizeof(struct ibv_exp_flow_spec_action_tag);
if (!action.queue && !action.drop) {
rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_HANDLE,
@@ -1042,6 +1042,7 @@ priv_flow_create(struct priv *priv,
actions->conf)->index;
} else if (actions->type == RTE_FLOW_ACTION_TYPE_DROP) {
action.drop = 1;
+ action.mark = 0;
} else if (actions->type == RTE_FLOW_ACTION_TYPE_MARK) {
const struct rte_flow_action_mark *mark =
(const struct rte_flow_action_mark *)
@@ -1049,7 +1050,7 @@ priv_flow_create(struct priv *priv,
if (mark)
action.mark_id = mark->id;
- action.mark = 1;
+ action.mark = !action.drop;
} else {
rte_flow_error_set(error, ENOTSUP,
RTE_FLOW_ERROR_TYPE_ACTION,
--
2.1.4
next reply other threads:[~2017-01-20 15:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-20 15:27 Nelio Laranjeiro [this message]
2017-01-20 15:27 ` [dpdk-dev] [PATCH 2/2] net/mlx5: fix Rx packet validation and type Nelio Laranjeiro
2017-01-20 16:48 ` Adrien Mazarguil
2017-01-20 18:44 ` Ferruh Yigit
2017-01-20 16:47 ` [dpdk-dev] [PATCH 1/2] net/mlx5: fix flow API mark combined with drop Adrien Mazarguil
2017-01-20 18:43 ` Ferruh Yigit
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=582098dca09b3d3bb70ec24e6c44426a63348392.1484925981.git.nelio.laranjeiro@6wind.com \
--to=nelio.laranjeiro@6wind.com \
--cc=adrien.mazarguil@6wind.com \
--cc=dev@dpdk.org \
/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).