From patchwork Mon Aug 12 15:28:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 143084 X-Patchwork-Delegate: bruce.richardson@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6EC7B457A1; Mon, 12 Aug 2024 17:28:42 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6B20040B9B; Mon, 12 Aug 2024 17:28:35 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) by mails.dpdk.org (Postfix) with ESMTP id 5ABAE4014F for ; Mon, 12 Aug 2024 17:28:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723476512; x=1755012512; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dsMeQYQMD84RlgK6NKVflTBI/D9ELWC/eMpFhKbzYRI=; b=dNDL816x8TjtGsGr4ZZZYJRys7X4px13hwxLFdL5yo3HJ/RvzaqbAMUw sAbSLaGmXE4szeoc0RYQnD9peFh7uRP8SvFkvbrfh7mAI8yy6uxsPQ1s5 +Zr7KVEUQULSwvLDjHmwtQPgrIdFqjRFW+hRWgd+ViRbJVxzn8NBCACDh s5x1mj9eEbVyif8SQgFADRf6d7TN3ep2XBxWHPoTT3EtXxNKacDfJGiAN y/pUcSAccXP6O/D3Ck7Jnj0jWmTR52ZDI/hNod3ZenOQzhbRml0H9g/NJ /WXefHTP+JfG7QI1SYDGyi5oXeZLcwh2uTYX+Qv9KNhE/TYInnMjBvKUN g==; X-CSE-ConnectionGUID: KUEa0CdYTACvndsmtZ8fmA== X-CSE-MsgGUID: QyZ2ShomQ8y91Rcdm09DtA== X-IronPort-AV: E=McAfee;i="6700,10204,11162"; a="21743030" X-IronPort-AV: E=Sophos;i="6.09,283,1716274800"; d="scan'208";a="21743030" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2024 08:28:31 -0700 X-CSE-ConnectionGUID: tJU7GvO6T2q8jSwX6R2KLQ== X-CSE-MsgGUID: DkeSg1/VQLyoSlBj+Dc06w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,283,1716274800"; d="scan'208";a="63222520" Received: from silpixa00400562.ir.intel.com (HELO silpixa00401385.ir.intel.com) ([10.237.214.39]) by orviesa004.jf.intel.com with ESMTP; 12 Aug 2024 08:28:30 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [PATCH v3 02/16] net/ice: detect stopping a flow-director queue twice Date: Mon, 12 Aug 2024 16:28:01 +0100 Message-ID: <20240812152815.1132697-3-bruce.richardson@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240812152815.1132697-1-bruce.richardson@intel.com> References: <20240807093407.452784-1-bruce.richardson@intel.com> <20240812152815.1132697-1-bruce.richardson@intel.com> MIME-Version: 1.0 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 If the flow-director queue is stopped at some point during the running of an application, the shutdown procedure for the port issues an error as it tries to stop the queue a second time, and fails to do so. We can eliminate this error by setting the tail-register pointer to NULL on stop, and checking for that condition in subsequent stop calls. Since the register pointer is set on start, any restarting of the queue will allow a stop call to progress as normal. Signed-off-by: Bruce Richardson --- drivers/net/ice/ice_rxtx.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c index f270498ed1..a150d28e73 100644 --- a/drivers/net/ice/ice_rxtx.c +++ b/drivers/net/ice/ice_rxtx.c @@ -1139,6 +1139,10 @@ ice_fdir_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id) tx_queue_id); return -EINVAL; } + if (txq->qtx_tail == NULL) { + PMD_DRV_LOG(INFO, "TX queue %u not started\n", tx_queue_id); + return 0; + } vsi = txq->vsi; q_ids[0] = txq->reg_idx; @@ -1153,6 +1157,7 @@ ice_fdir_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id) } txq->tx_rel_mbufs(txq); + txq->qtx_tail = NULL; return 0; }