net/mlx5: fix zero metadata action

There is no reason to prevent the user from using zero metadata,
it indeed means no metadata, but sometimes the user may need to
report to datapath that there is no metadata anymore, which is
valid case.

Fixes: fcc8d2f716 ("net/mlx5: extend flow metadata support")
Cc: stable@dpdk.org

Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
This commit is contained in:
Wisam Jaddo 2020-03-12 11:24:40 +02:00 committed by Ferruh Yigit
parent a6131c7a95
commit 85e26044cb

View File

@ -2109,10 +2109,6 @@ flow_dv_validate_action_set_meta(struct rte_eth_dev *dev,
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION, action,
"meta data must be within reg C0");
if (!(conf->data & conf->mask))
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION, action,
"zero value has no effect");
return 0;
}