From: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
To: dev@dpdk.org, Shahaf Shuler <shahafs@mellanox.com>
Cc: Adrien Mazarguil <adrien.mazarguil@6wind.com>, stable@dpdk.org
Subject: [dpdk-dev] [PATCH 2/3] net/mlx5: fix flow item validation
Date: Tue, 23 Jan 2018 09:05:09 +0100 [thread overview]
Message-ID: <904aa327d4d0761ba960377c8a299eaafa01927d.1516694692.git.nelio.laranjeiro@6wind.com> (raw)
In-Reply-To: <a87964dfd45f1bfbb0a22b11ae3f79247b0c8412.1516694692.git.nelio.laranjeiro@6wind.com>
In-Reply-To: <a87964dfd45f1bfbb0a22b11ae3f79247b0c8412.1516694692.git.nelio.laranjeiro@6wind.com>
Two masks were compared instead of verifying the spec was included in the
supported mask.
Fixes: 2097d0d1e2cc ("net/mlx5: support basic flow items and actions")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
---
drivers/net/mlx5/mlx5_flow.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index c56ef54cf..01e290484 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -529,7 +529,7 @@ mlx5_flow_item_validate(const struct rte_flow_item *item,
}
if (item->mask) {
unsigned int i;
- const uint8_t *spec = item->mask;
+ const uint8_t *spec = item->spec;
for (i = 0; i < size; ++i)
if ((spec[i] | mask[i]) != mask[i])
--
2.11.0
next prev parent reply other threads:[~2018-01-23 8:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-23 8:05 [dpdk-dev] [PATCH 1/3] net/mlx5: fix flow director conversion Nelio Laranjeiro
2018-01-23 8:05 ` Nelio Laranjeiro [this message]
2018-01-23 8:05 ` [dpdk-dev] [PATCH 3/3] net/mlx5: support IPv4 time-to-live filter Nelio Laranjeiro
2018-01-25 15:52 ` [dpdk-dev] [PATCH 1/3] net/mlx5: fix flow director conversion 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=904aa327d4d0761ba960377c8a299eaafa01927d.1516694692.git.nelio.laranjeiro@6wind.com \
--to=nelio.laranjeiro@6wind.com \
--cc=adrien.mazarguil@6wind.com \
--cc=dev@dpdk.org \
--cc=shahafs@mellanox.com \
--cc=stable@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).