From patchwork Sat Jul 20 07:19:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajit Khaparde X-Patchwork-Id: 56800 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7AD611B197; Sat, 20 Jul 2019 09:20:12 +0200 (CEST) Received: from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id 114061B53 for ; Sat, 20 Jul 2019 09:20:10 +0200 (CEST) Received: from nis-sj1-27.broadcom.com (nis-sj1-27.lvn.broadcom.net [10.75.144.136]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id 19FD830C0CD; Sat, 20 Jul 2019 00:20:09 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com 19FD830C0CD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1563607209; bh=gkWKF8KU93xO6kD8CtxLGzIB3BPCmMy0beP+M1/WHQY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vkMibCxYbSbzr165krQBDar12Xn8RuHZEClgrNMeb2q1PNosFSa/wJPgsdwrY+amx /cFZlS3SEvkxmXVFcvGjOGiHI8raAS8e/aQKAbAkDEtEyb5KdRFEJjwMXKp9aj1v35 xvtsrZBFBehNONL5JqDXJkseilGY4OBhge1RPNwo= Received: from localhost.localdomain (unknown [10.230.47.58]) by nis-sj1-27.broadcom.com (Postfix) with ESMTP id A78FDAC0749; Sat, 20 Jul 2019 00:20:06 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Kalesh AP , Lance Richardson Date: Sat, 20 Jul 2019 12:49:56 +0530 Message-Id: <20190720071956.68197-2-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20190720071956.68197-1-ajit.khaparde@broadcom.com> References: <20190720071956.68197-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 2/2] net/bnxt: fix an issue with rxq0 stop 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" From: Kalesh AP For the stingray platform and other platforms needing tighter control of resource utilization, we process async events on receive completion ring0. For other chips there is a dedicated completion ring for asynchronous event handling instead of handling these events on a receive completion ring. This patch fixes the check for rxq0 stop. Fixes: 05b5e4821c1e ("net/bnxt: use dedicated CPR for async events") Reviewed-by: Lance Richardson Signed-off-by: Kalesh AP Signed-off-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_rxq.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c index 4082c3aa9..8c7608621 100644 --- a/drivers/net/bnxt/bnxt_rxq.c +++ b/drivers/net/bnxt/bnxt_rxq.c @@ -458,8 +458,11 @@ int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id) struct bnxt_rx_queue *rxq = NULL; int rc = 0; - /* Rx CQ 0 also works as Default CQ for async notifications */ - if (!rx_queue_id) { + /* For the stingray platform and other platforms needing tighter + * control of resource utilization, Rx CQ 0 also works as + * Default CQ for async notifications + */ + if (!BNXT_NUM_ASYNC_CPR && !rx_queue_id) { PMD_DRV_LOG(ERR, "Cannot stop Rx queue id %d\n", rx_queue_id); return -EINVAL; }