From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id C955F8DAD for ; Wed, 14 Sep 2016 13:54:29 +0200 (CEST) Received: by mail-wm0-f43.google.com with SMTP id i130so44278673wmf.0 for ; Wed, 14 Sep 2016 04:54:29 -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 :in-reply-to:references; bh=GyWMHvb6NfAYqWkpgPnkM8fZ6Wy4rp+cO6Q3wv69O/o=; b=OMpjz9L3P55MDFJY6XXixZiTZNIuxl/3v89BXzD0InLFejufHlQuuYlRX2qSzDrRih G17PgZVCLy4DbMxKMecC/DJKcsp91GyX1Az6oytHii1OsEFuTwps9Utsnig45iJP/2ZY tcmYQii2wuBCuzi5NGO6XxCowTxMZKtZ71CshmC8kWo5hKZ5ugJ0Bm0ibnRWfy9Oq6xz WhSC8Vu7D1EOboLNkDIRJBf3aE1s5tyMVVzo3o9D/RM/IUAz9dSZ12Zg+UlsZ2duoqxG 9M9rGb4qc+04rTv6e6nNZ9v/H/tFkcJlaCulPHMzxZMaRlx5FAz2hilpXQC6ipTE27lQ YVWg== 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:in-reply-to:references; bh=GyWMHvb6NfAYqWkpgPnkM8fZ6Wy4rp+cO6Q3wv69O/o=; b=MsSjfnXJwQAomjN67D8c0cpVHft6Ok86OneQpMZTrEeZJ4MtB83J6/uU7OUPTZM+1a ufsgDsYrrBv36W4hrgz+aQdieljHIAyBC2ObZaP+wOsqYn9jiJqmXlOvErCyQZtD1uQN 8nTnbFNbOZu6u04EPc0GuK0wkveBv4hgPLOIHOKg1ECcMP/aKf7IlME8dEIslTjxkSh2 u9ahug3sClPsD2cwOH1NBcEXeyX13nLwdJyyTr7QozlKKmMJ5OQqyU3xfcO9wdkX6MWw dmtgqm32oB8Ydwhzmq3v3daUP0b1yNKun5E1gV+fa4jWVcrz+581H2EKaEROSBXaVfVj EuzQ== X-Gm-Message-State: AE9vXwPQy8TEBt+Ytt9tFEMpx18X5UrX+BwbJDKhtza9IVK+4sPK5sPmHP/YEpE3QTmAfSU8 X-Received: by 10.28.153.70 with SMTP id b67mr10870108wme.84.1473854069323; Wed, 14 Sep 2016 04:54:29 -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 m133sm10417332wmg.0.2016.09.14.04.54.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 14 Sep 2016 04:54:28 -0700 (PDT) From: Nelio Laranjeiro To: dev@dpdk.org Cc: Yaacov Hazan Date: Wed, 14 Sep 2016 13:53:48 +0200 Message-Id: <0687cfc882dbff3aab52e55f144f67ae3555db72.1473851528.git.nelio.laranjeiro@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH V2 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, 14 Sep 2016 11:54:30 -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