[dpdk-dev,2/2] net/mlx5: fix validation

Message ID a96c08d3c68166d10bbc1de82557bb5115a1af69.1485531240.git.nelio.laranjeiro@6wind.com
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show

Checks

Context Check Description
ci/Intel compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Nélio Laranjeiro Jan. 27, 2017, 3:35 p.m.
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(-)

Patch

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) {