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 791E145AF4; Wed, 9 Oct 2024 19:08:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 72EF342DA1; Wed, 9 Oct 2024 19:08:32 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) by mails.dpdk.org (Postfix) with ESMTP id 6D96040649 for ; Wed, 9 Oct 2024 19:08:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728493710; x=1760029710; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wAtHhUGfl+/I/L9meYg0f5Al9nxSnWb/oagDb4p4KxU=; b=T/hXhNyW5lB8xw4GAuayuZjM8boCnbsHGg7JSUwlnoKO8DQLlgIjjimV HdeSwYfnXEuButGeO0JGCfdxcOTmVZ7CwQd2d0QC7d6h9nCGo7ahRneDM D+VK3iOVjAZXmmjn1u1ZVAj4qA/WAnC0lxqWWSlI2MwvgwDB8AA3TxvME OXxz/P51zhSpo+ebua7i2rZPv2amEI7seoodUxUULs+aiKlLWXufFyDBQ eYfc/EfW+yjPjFYOIEGLpn5R+qM18OC26marC/GafyoHfRB6E6xBS0GsU fXcjTAvHgARuRaOA+b8XrkstLnorT94mJ+RfsRYSjNTQqRvyAAn+Nmmtv w==; X-CSE-ConnectionGUID: P6zIUYfPQd+iuVWFZlyqKw== X-CSE-MsgGUID: gMqLB9e/RUeA7ciWlFQqJQ== X-IronPort-AV: E=McAfee;i="6700,10204,11220"; a="27928944" X-IronPort-AV: E=Sophos;i="6.11,190,1725346800"; d="scan'208";a="27928944" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Oct 2024 10:08:29 -0700 X-CSE-ConnectionGUID: 2UqQZ6WSR3i6VOE8ueqv1g== X-CSE-MsgGUID: QLa8ZSDjQcuRRaFQIERXMw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,190,1725346800"; d="scan'208";a="80825289" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.25]) by fmviesa005.fm.intel.com with ESMTP; 09 Oct 2024 10:08:28 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [PATCH 1/5] net/ice: detect stopping a flow-director queue twice Date: Wed, 9 Oct 2024 18:08:18 +0100 Message-ID: <20241009170822.344716-2-bruce.richardson@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241009170822.344716-1-bruce.richardson@intel.com> References: <20241009170822.344716-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 acd7539b5e..267c1b4a79 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", 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