From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) by dpdk.org (Postfix) with ESMTP id 7E352803B for ; Wed, 7 Sep 2016 09:02:48 +0200 (CEST) Received: by mail-wm0-f51.google.com with SMTP id w12so14121024wmf.0 for ; Wed, 07 Sep 2016 00:02:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=GyWMHvb6NfAYqWkpgPnkM8fZ6Wy4rp+cO6Q3wv69O/o=; b=BnKXYNIItj0t7i45TZu4ClEIrLznPjf4yd7MUOYHNtyFQBnJWhkumzYRKCcQh3JF/e HtcjFjLblw6vPhrSeNC9D7KyMQcHlR5spg5560piPEPiXIvPOFKbmRIW+rQxc6sK+gzn Sos1+dIqaxjlhLmohVfvXr1+5UFdtZbZbckSSh7OwaxeJ9xJkoZblbk/2AEDSvZUcYsr lqNPXqT3vU+YNH2OX/nnEPWEbYXI32DfnsxG/8zjFaZe8VAY3NXNTD6+0glzrztSUVvH VjQYBSxo2VRJv2suYPO8Ju0tJ4qrNuRP71QRpzqF2Ms1kcAdB1LjhgGFe9V0YEBcIvN6 FExQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GyWMHvb6NfAYqWkpgPnkM8fZ6Wy4rp+cO6Q3wv69O/o=; b=HcPijuREeElDGil/miUAUmLo7NnTGYh8BRU6pYT0JpcZgl0VFZEC0f4QjSQJ50KWU7 UCiqYWJddvZoJCaUwypfVO1widJ19fjM9X9nwR/uzNTqQuzI5LbkUJ6wqtt0VEAKugO/ 1d8WMWpyyFBSoB+4PGzFaexOJexqE7DgvO4h6KnpMxENy3yOpnPTQyIGVbV8N/kscw/4 22SvVgLeUpo+uIR9Pq/ivXO7gLzgYxZMUEPKvltBsJsw8ik1B3B559mzSG07NnCjfZlj x/pVhUc/0mSNNAwepWsPD76IFUPU3rxOqJEHLNOloeeXPrGLFLpugWbbrdLYs8C5Ql9Z eoTA== X-Gm-Message-State: AE9vXwOuCL21lJiVcl/LkoggT865t8qP+LXNlbBUnXtwXhzXBr6FrKizqtvH5YgyZYhDadYo X-Received: by 10.194.223.73 with SMTP id qs9mr38996846wjc.188.1473231768310; Wed, 07 Sep 2016 00:02:48 -0700 (PDT) Received: from ping.vm.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id z17sm2556475wmz.23.2016.09.07.00.02.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Sep 2016 00:02:47 -0700 (PDT) From: Nelio Laranjeiro To: dev@dpdk.org Cc: Yaacov Hazan Date: Wed, 7 Sep 2016 09:02:19 +0200 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: Subject: [dpdk-dev] [PATCH 1/8] net/mlx5: fix inconsistent return value in Flow Director X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Sep 2016 07:02:48 -0000 From: Yaacov Hazan 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 --- 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