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 AB1834575B; Wed, 7 Aug 2024 11:47:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CCCB0410E7; Wed, 7 Aug 2024 11:47:17 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) by mails.dpdk.org (Postfix) with ESMTP id 39DE34064C for ; Wed, 7 Aug 2024 11:47:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723024036; x=1754560036; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dsMeQYQMD84RlgK6NKVflTBI/D9ELWC/eMpFhKbzYRI=; b=O5akKSEK4eEJDx7SOR9Mae6CHGAtP+YCTl1fhQRYt7lVf+FLreA+E/mx jeIQ2BjUwpXgy+SPgwCEW8b14mk8A+VRECD7MPgrTV3FgCljuiiGaaJBh PdY9IZg0hg03vCR6c+MKCnfETvTjXhMT8oPOId3uwZg4v6Ckee+KYbZuO gwOMK7Ly8VkjO3W7o2T+x3/ravugV+Sfd3TzibK8uqri/+n9OFOPDZdpY UsZLTro+ovwd6iVtVU7WksTUIb7QilxXKxGzlx573tjpIip/y/yljxC60 S9JT7u+z6LQYZYWvO6Ca3B4+ae8iCNqdEAipW7oa8xtSumW2FnWQCD2Zt w==; X-CSE-ConnectionGUID: pAZ4vgEXRBOdyR9IYNX7aA== X-CSE-MsgGUID: hmGP+heuTf2yYS7cpkUAHg== X-IronPort-AV: E=McAfee;i="6700,10204,11156"; a="21257928" X-IronPort-AV: E=Sophos;i="6.09,269,1716274800"; d="scan'208";a="21257928" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Aug 2024 02:47:14 -0700 X-CSE-ConnectionGUID: /a00xKYwTnOaPwPwoy38lA== X-CSE-MsgGUID: 1MCwW472TfKJ/G+LnL70kg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,269,1716274800"; d="scan'208";a="87467363" Received: from silpixa00400562.ir.intel.com (HELO silpixa00401385.ir.intel.com) ([10.237.214.39]) by orviesa002.jf.intel.com with ESMTP; 07 Aug 2024 02:47:13 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [PATCH v2 02/15] net/ice: detect stopping a flow-director queue twice Date: Wed, 7 Aug 2024 10:46:53 +0100 Message-ID: <20240807094706.459822-3-bruce.richardson@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240807094706.459822-1-bruce.richardson@intel.com> References: <20240807093407.452784-1-bruce.richardson@intel.com> <20240807094706.459822-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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; } -- 2.43.0