From: Yaacov Hazan Date: Wed, 14 Sep 2016 11:53:48 +0000 (+0200) Subject: net/mlx5: fix inconsistent return value in flow director X-Git-Tag: spdx-start~5883 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c502d05197e35dc2840fdf5892f6310c8cc4b0fd;p=dpdk.git net/mlx5: fix inconsistent return value in flow director The return value in DPDK is negative errno on failure. Since internal functions in mlx driver return positive values need to negate this value when it returned to dpdk layer. Fixes: 76f5c99 ("mlx5: support flow director") Signed-off-by: Yaacov Hazan --- diff --git a/drivers/net/mlx5/mlx5_fdir.c b/drivers/net/mlx5/mlx5_fdir.c index 73eb00ec50..8207573653 100644 --- a/drivers/net/mlx5/mlx5_fdir.c +++ b/drivers/net/mlx5/mlx5_fdir.c @@ -955,7 +955,7 @@ mlx5_dev_filter_ctrl(struct rte_eth_dev *dev, enum rte_filter_op filter_op, void *arg) { - int ret = -EINVAL; + int ret = EINVAL; struct priv *priv = dev->data->dev_private; switch (filter_type) { @@ -970,5 +970,5 @@ mlx5_dev_filter_ctrl(struct rte_eth_dev *dev, break; } - return ret; + return -ret; }