From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A73A9A0C47; Thu, 28 Oct 2021 04:09:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9689A4067B; Thu, 28 Oct 2021 04:09:50 +0200 (CEST) Received: from relay.smtp-ext.broadcom.com (relay.smtp-ext.broadcom.com [192.19.11.229]) by mails.dpdk.org (Postfix) with ESMTP id A6D524003F for ; Thu, 28 Oct 2021 04:09:49 +0200 (CEST) Received: from dhcp-10-123-153-22.dhcp.broadcom.net (bgccx-dev-host-lnx2.bec.broadcom.net [10.123.153.22]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id 26EF311F; Wed, 27 Oct 2021 19:09:47 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 26EF311F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1635386989; bh=2rXZty7w2/qNyJf5ZKKR3GviIyjqbpvkmblPtsauS3E=; h=From:To:Cc:Subject:Date:From; b=jEOJfSbEd1dFvNAaTStAzaYQgxSl/CBKwG1DaLZ0qip/Taiz5OO/KgflfRmjwPxPH /QZrRwSMQWQo9rti29wqWysjkFwsCKpo4cD6iQf0x7Gk7bBcHYDGk69Dc090/hrnBH 0Co/2bt7hnOlYB544zBz+5evcmnLLln//KbKFkLI= From: Kalesh A P To: dev@dpdk.org Cc: ferruh.yigit@intel.com, ajit.khaparde@broadcom.com Date: Thu, 28 Oct 2021 07:59:44 +0530 Message-Id: <20211028022944.26402-1-kalesh-anakkur.purayil@broadcom.com> X-Mailer: git-send-email 2.10.1 Subject: [dpdk-dev] [PATCH] net/bnxt: fix to set flow error in case of failure X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" From: Kalesh AP With commit 239695f754cb ("net/bnxt: enhance RSS action support"), when bnxt_hwrm_vnic_rss_cfg() call fails, driver was not setting flow error using "rte_flow_error_set". Fixes: 239695f754cb ("net/bnxt: enhance RSS action support") Signed-off-by: Kalesh AP Reviewed-by: Ajit Khaparde Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt_flow.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c index 9526a8f..b3c68b1 100644 --- a/drivers/net/bnxt/bnxt_flow.c +++ b/drivers/net/bnxt/bnxt_flow.c @@ -1226,6 +1226,15 @@ bnxt_vnic_rss_cfg_update(struct bnxt *bp, skip_rss_table: rc = bnxt_hwrm_vnic_rss_cfg(bp, vnic); + if (rc != 0) { + rte_flow_error_set(error, + -rc, + RTE_FLOW_ERROR_TYPE_ACTION, + act, + "VNIC RSS configure failed"); + rc = -rte_errno; + goto ret; + } ret: return rc; } @@ -1515,7 +1524,7 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev, /* RSS config update requested */ rc = bnxt_vnic_rss_cfg_update(bp, vnic, act, error); if (rc != 0) - return -rte_errno; + goto ret; filter->dst_id = vnic->fw_vnic_id; break; -- 2.10.1