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 093FFA04F8; Sat, 21 Dec 2019 03:42:24 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7E2A81F1C; Sat, 21 Dec 2019 03:42:23 +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 BC850F90; Sat, 21 Dec 2019 03:42:22 +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 CEAD230C576; Fri, 20 Dec 2019 18:37:21 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com CEAD230C576 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1576895841; bh=qP0LbKktAyTJQ9AN845+UwbeYoj9kA2/TVTIlwvdE1Y=; h=From:To:Cc:Subject:Date:From; b=T7sgJObdf/+3O+BZjujW5qCfoxELjwqj2v9QS0hb2tQYzppT1QqPGo23BLwOkdskg Dt8+q2DoC7SXXjMx2bZmW2KT6uLPn+pSNxaVwNbod2ElQYbhwEqL46Oqd2skTH9l5/ PS90mbvO9aG2J/j65d4F4cQAzGQSYf/jbKTvzEaU= Received: from localhost.localdomain (unknown [10.230.30.124]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id 3BA6314008B; Fri, 20 Dec 2019 18:42:21 -0800 (PST) From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com, stable@dpdk.org, Lance Richardson Date: Fri, 20 Dec 2019 18:42:18 -0800 Message-Id: <20191221024218.56582-1-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.21.0 (Apple Git-122.2) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] 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)