net/mlx5: fix flow item validation

Two masks were compared instead of verifying the spec was included in the
supported mask.

Fixes: 2097d0d1e2 ("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>
This commit is contained in:
Nélio Laranjeiro 2018-01-23 09:05:09 +01:00 committed by Ferruh Yigit
parent d10f422fd5
commit 537e168450

View File

@ -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])