All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
To: dev@dpdk.org
Cc: Yaacov Hazan <yaacovh@mellanox.com>
Subject: [PATCH 1/8] net/mlx5: fix inconsistent return value in Flow Director
Date: Wed,  7 Sep 2016 09:02:19 +0200	[thread overview]
Message-ID: <be8089e738baf55ed66d2d729990a0c99d120d90.1473230641.git.nelio.laranjeiro@6wind.com> (raw)
In-Reply-To: <cover.1473230641.git.nelio.laranjeiro@6wind.com>

From: Yaacov Hazan <yaacovh@mellanox.com>

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 <yaacovh@mellanox.com>
---
 drivers/net/mlx5/mlx5_fdir.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_fdir.c b/drivers/net/mlx5/mlx5_fdir.c
index 73eb00e..8207573 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;
 }
-- 
2.1.4

  reply	other threads:[~2016-09-07  7:02 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-07  7:02 [PATCH 0/8] net/mlx5: various fixes Nelio Laranjeiro
2016-09-07  7:02 ` Nelio Laranjeiro [this message]
2016-09-07  7:02 ` [PATCH 2/8] net/mlx5: fix Rx VLAN offload capability report Nelio Laranjeiro
2016-09-07  7:02 ` [PATCH 3/8] net/mlx5: fix removing VLAN filter Nelio Laranjeiro
2016-09-07  7:02 ` [PATCH 4/8] net/mlx5: refactor allocation of flow director queues Nelio Laranjeiro
2016-09-07  7:02 ` [PATCH 5/8] net/mlx5: fix support for flow director drop mode Nelio Laranjeiro
2016-09-07  7:02 ` [PATCH 6/8] net/mlx5: force inline for completion function Nelio Laranjeiro
2016-09-07  7:02 ` [PATCH 7/8] net/mlx5: re-factorize functions Nelio Laranjeiro
2016-09-07  7:02 ` [PATCH 8/8] net/mlx5: fix inline logic Nelio Laranjeiro
2016-09-14 10:43   ` Ferruh Yigit
2016-09-14 11:07     ` Nélio Laranjeiro
2016-09-14 11:53 ` [PATCH V2 0/8] net/mlx5: various fixes Nelio Laranjeiro
2016-09-14 12:21   ` Nélio Laranjeiro
2016-09-19 15:30   ` Bruce Richardson
2016-09-14 11:53 ` [PATCH V2 1/8] net/mlx5: fix inconsistent return value in Flow Director Nelio Laranjeiro
2016-09-14 11:53 ` [PATCH V2 2/8] net/mlx5: fix Rx VLAN offload capability report Nelio Laranjeiro
2016-09-14 11:53 ` [PATCH V2 3/8] net/mlx5: fix removing VLAN filter Nelio Laranjeiro
2016-09-14 11:53 ` [PATCH V2 4/8] net/mlx5: refactor allocation of flow director queues Nelio Laranjeiro
2016-09-14 11:53 ` [PATCH V2 5/8] net/mlx5: fix support for flow director drop mode Nelio Laranjeiro
2016-09-14 11:53 ` [PATCH V2 6/8] net/mlx5: force inline for completion function Nelio Laranjeiro
2016-09-14 11:53 ` [PATCH V2 7/8] net/mlx5: re-factorize functions Nelio Laranjeiro
2016-09-14 11:53 ` [PATCH V2 8/8] net/mlx5: fix inline logic Nelio Laranjeiro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=be8089e738baf55ed66d2d729990a0c99d120d90.1473230641.git.nelio.laranjeiro@6wind.com \
    --to=nelio.laranjeiro@6wind.com \
    --cc=dev@dpdk.org \
    --cc=yaacovh@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.