From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AF5F8A04F6; Tue, 7 Jan 2020 01:38:30 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 177DC1D8CC; Tue, 7 Jan 2020 01:37:53 +0100 (CET) Received: from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id 9C5F21D70D; Tue, 7 Jan 2020 01:37:42 +0100 (CET) Received: from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net [10.75.242.48]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id 9FE6430C2D1; Mon, 6 Jan 2020 16:31:49 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com 9FE6430C2D1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1578357109; bh=qP0LbKktAyTJQ9AN845+UwbeYoj9kA2/TVTIlwvdE1Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lTrQaFEB6EORrrv3WG9WwhzX1v9nw6xJcrBxtv3yR9d4t+PFm36oxf9yiYtWx433A kapdV7nvxkwSeNpxBwDt91+SuYhyZJA9e06jTJUQYznzDrN3IwYwfcnt8QDakFLQ1T DeGt/sdQv7meMH17eRg/Z6yODU7ZrrLOGLJKlKvk= Received: from C02VPB22HTD6.wifi.broadcom.net (c02vpb22htd6.wifi.broadcom.net [10.69.74.102]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id 0804214008C; Mon, 6 Jan 2020 16:37:39 -0800 (PST) From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com, stable@dpdk.org, Lance Richardson Date: Mon, 6 Jan 2020 16:37:35 -0800 Message-Id: <20200107003735.96055-8-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.21.0 (Apple Git-122.2) In-Reply-To: <20200107003735.96055-1-ajit.khaparde@broadcom.com> References: <20191221022937.54397-1-ajit.khaparde@broadcom.com> <20200107003735.96055-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 7/7] net/bnxt: fix to not overwrite error message X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" In some cases when flow creation fails, we overwrite the specific error message with a generic error message. This patch fixes it. Fixes: d24610f7bfda ("net/bnxt: allow flow creation when RSS is enabled") Cc: stable@dpdk.org Signed-off-by: Ajit Khaparde Reviewed-by: Lance Richardson --- drivers/net/bnxt/bnxt_flow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c index 707aedcec..cde1fa41c 100644 --- a/drivers/net/bnxt/bnxt_flow.c +++ b/drivers/net/bnxt/bnxt_flow.c @@ -1485,7 +1485,7 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev, if (rxq && !vnic->rx_queue_cnt) rxq->vnic = &bp->vnic_info[0]; } - return rc; + return -rte_errno; } static @@ -1815,7 +1815,7 @@ bnxt_flow_create(struct rte_eth_dev *dev, rte_flow_error_set(error, 0, RTE_FLOW_ERROR_TYPE_NONE, NULL, "Flow with pattern exists, updating destination queue"); - else + else if (!rte_errno) rte_flow_error_set(error, -ret, RTE_FLOW_ERROR_TYPE_HANDLE, NULL, "Failed to create flow."); -- 2.21.0 (Apple Git-122.2)