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 B13DEA0524; Mon, 31 May 2021 09:05:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6F9CE40FDF; Mon, 31 May 2021 09:05:24 +0200 (CEST) Received: from relay.smtp-ext.broadcom.com (lpdvacalvio01.broadcom.com [192.19.229.182]) by mails.dpdk.org (Postfix) with ESMTP id 1111F40E3C for ; Mon, 31 May 2021 09:05:22 +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 4C83724329; Mon, 31 May 2021 00:05:20 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 4C83724329 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1622444721; bh=rXUSAyalrqMdHkfBWX1GEiUzaJNGvzJu+sOxt8MqbyQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=au4vLsCzqEbw5+3+jmwLB6z4pj8eSzcZ+Uh92F3L4+35UyLStlcKiG1DBj/kdXyh8 GiXVQ27MzYC7e8oJvMF9tLES+P+tqrsMC13idRz/CoZ8H4a37XX2qCJO5jvRtaW3ue 6hA/B28HBewg1ndxagTOlYHqfys2ed00+kqGS/ec= From: Kalesh A P To: dev@dpdk.org Cc: ferruh.yigit@intel.com, ajit.khaparde@broadcom.com Date: Mon, 31 May 2021 12:56:37 +0530 Message-Id: <20210531072644.24656-3-kalesh-anakkur.purayil@broadcom.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20210531072644.24656-1-kalesh-anakkur.purayil@broadcom.com> References: <20210531072644.24656-1-kalesh-anakkur.purayil@broadcom.com> Subject: [dpdk-dev] [PATCH 2/9] net/bnxt: set flow error when free filter is not available 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 In bnxt_flow_validate(), when bnxt_get_unused_filter() fails due to no filter resources available, driver is not setting flow error using "rte_flow_error_set". Also, fixed the error code. Fixes: 5ef3b79fdfe6 ("net/bnxt: support flow filter ops") Cc: stable@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Kalesh AP Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_flow.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c index 66012b8..9b47807 100644 --- a/drivers/net/bnxt/bnxt_flow.c +++ b/drivers/net/bnxt/bnxt_flow.c @@ -1550,9 +1550,11 @@ bnxt_flow_validate(struct rte_eth_dev *dev, filter = bnxt_get_unused_filter(bp); if (filter == NULL) { - PMD_DRV_LOG(ERR, "Not enough resources for a new flow.\n"); + rte_flow_error_set(error, ENOSPC, + RTE_FLOW_ERROR_TYPE_HANDLE, NULL, + "Not enough resources for a new flow"); bnxt_release_flow_lock(bp); - return -ENOMEM; + return -ENOSPC; } ret = bnxt_validate_and_parse_flow(dev, pattern, actions, attr, -- 2.10.1