From: Viacheslav Ovsiienko Date: Wed, 14 Nov 2018 13:47:19 +0000 (+0000) Subject: net/mlx5: fix flow query routine in Direct Verbs X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a3166356ab28770e2958a494e9a1923b5c52664a;p=dpdk.git net/mlx5: fix flow query routine in Direct Verbs The flow_dv_query() just returns -ENOTSUP value and does not set provided error parameter structure, that crashes the port_flow_query(). The patch fixes flow_db_query(), now it sets an error parameter structure. Fixes: 684dafe795d0 ("net/mlx5: add flow query abstraction interface") Signed-off-by: Viacheslav Ovsiienko Acked-by: Shahaf Shuler --- diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index a2edd168e4..9991cad290 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -2275,8 +2275,10 @@ flow_dv_query(struct rte_eth_dev *dev __rte_unused, void *data __rte_unused, struct rte_flow_error *error __rte_unused) { - rte_errno = ENOTSUP; - return -rte_errno; + return rte_flow_error_set(error, ENOTSUP, + RTE_FLOW_ERROR_TYPE_UNSPECIFIED, + NULL, + "flow query with DV is not supported"); }