From: NĂ©lio Laranjeiro Date: Tue, 23 Jan 2018 08:05:09 +0000 (+0100) Subject: net/mlx5: fix flow item validation X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=537e168450ce5e191c8d3ee89fa7fa9901e8e27f;p=dpdk.git net/mlx5: fix flow item validation 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 Acked-by: Yongseok Koh --- diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 6b3198ae71..444b7df591 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])