net/mlx5: fix errno values for flow engine
authorYongseok Koh <yskoh@mellanox.com>
Mon, 8 Oct 2018 18:02:19 +0000 (18:02 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 11 Oct 2018 16:53:49 +0000 (18:53 +0200)
Fixes: af689f1f04c2 ("net/mlx5: support flow Ethernet item along with drop action")
Fixes: 919d53ad78d2 ("net/mlx5: fix count query when flow has not counter")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
drivers/net/mlx5/mlx5_flow.c

index 078b076..ed60c40 100644 (file)
@@ -452,10 +452,10 @@ mlx5_flow_item_acceptable(const struct rte_flow_item *item,
                }
                ret = memcmp(spec, last, size);
                if (ret != 0)
-                       return rte_flow_error_set(error, ENOTSUP,
+                       return rte_flow_error_set(error, EINVAL,
                                                  RTE_FLOW_ERROR_TYPE_ITEM,
                                                  item,
-                                                 "range is not supported");
+                                                 "range is not valid");
        }
        return 0;
 }
@@ -2336,7 +2336,7 @@ mlx5_flow_query_count(struct rte_flow *flow __rte_unused,
                }
                return 0;
        }
-       return rte_flow_error_set(error, ENOTSUP,
+       return rte_flow_error_set(error, EINVAL,
                                  RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
                                  NULL,
                                  "flow does not have counter");