From: NĂ©lio Laranjeiro Date: Fri, 27 Jan 2017 15:35:20 +0000 (+0100) Subject: net/mlx5: fix flow pattern validation X-Git-Tag: spdx-start~4592 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3aa7d88451ea698e60744bdb8c868e0fb35031b5;p=dpdk.git net/mlx5: fix flow pattern validation 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 --- diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index d805c0aa8f..42a12e8ad8 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) {