DPDK patches and discussions
 help / color / mirror / Atom feed
From: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
To: dev@dpdk.org
Cc: adrien.mazarguil@6wind.com
Subject: [dpdk-dev] [PATCH 2/2] net/mlx5: fix validation
Date: Fri, 27 Jan 2017 16:35:20 +0100	[thread overview]
Message-ID: <a96c08d3c68166d10bbc1de82557bb5115a1af69.1485531240.git.nelio.laranjeiro@6wind.com> (raw)
In-Reply-To: <14d8b56747b084c62ed4ff8b525165282803fd95.1485531240.git.nelio.laranjeiro@6wind.com>
In-Reply-To: <14d8b56747b084c62ed4ff8b525165282803fd95.1485531240.git.nelio.laranjeiro@6wind.com>

Size of the mask is wrongly computed and make the validation process only
verify the first 4 bytes of the layer.

Fixes: 2097d0d1e2cc ("net/mlx5: support basic flow items and actions")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.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 d805c0a..42a12e8 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -424,7 +424,7 @@ priv_flow_validate(struct priv *priv,
 		cur_item = token;
 		err = mlx5_flow_item_validate(items,
 					      (const uint8_t *)cur_item->mask,
-					      sizeof(cur_item->mask_sz));
+					      cur_item->mask_sz);
 		if (err)
 			goto exit_item_not_supported;
 		if (flow->ibv_attr && cur_item->convert) {
-- 
2.1.4

  reply	other threads:[~2017-01-27 15:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-27 15:35 [dpdk-dev] [PATCH 1/2] net/mlx5: fix VLAN validation Nelio Laranjeiro
2017-01-27 15:35 ` Nelio Laranjeiro [this message]
2017-01-27 18:06 ` 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=a96c08d3c68166d10bbc1de82557bb5115a1af69.1485531240.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).