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 93F9F45B69; Fri, 18 Oct 2024 16:38:46 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8005540611; Fri, 18 Oct 2024 16:38:46 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by mails.dpdk.org (Postfix) with ESMTP id 792EE4025C; Fri, 18 Oct 2024 16:38:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1729262320; x=1760798320; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Y01m4O0PcfUwET+0xPTkJS7GlyKXxIXJ3//IAn3pVhM=; b=TQNkdUROCsA8wZuMXUMKk4g1zKj58zZunKALDpojrUcQI2eIvg6T9SSt hdnVKXfmapduqdJq/6Je2b+k9gnQz1rDhhaoiMBKh5HXxRIYJccllO7lw J19r4jylKm4+7h60bOjFlfyfV3rLRCAPsE+uXJinrXqhzZX+KIWnFrtbV EFJS6NxXKSf6TpU5Wao3ebRwYzANZUmJSHr01xAzQNrFgVhTPZMeCFPT8 JLwzCzCBG4Sawh9QxmpYJTV81McMeREvApYyNhQ6ed9Llm0z8oPq4u2F5 Qe/WylxjBBoaRza9l/QTfQTNRxe9Cl9fE+Z7YlVYH2h60PYJSzJ5SiP4L w==; X-CSE-ConnectionGUID: MHuXdkABQ9KeDHfHHDp40Q== X-CSE-MsgGUID: 1RcKa3IyQIWIXAh3yWGjhQ== X-IronPort-AV: E=McAfee;i="6700,10204,11229"; a="39422198" X-IronPort-AV: E=Sophos;i="6.11,214,1725346800"; d="scan'208";a="39422198" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2024 07:38:39 -0700 X-CSE-ConnectionGUID: pjv4uowmQvSBPQ47yZZaDw== X-CSE-MsgGUID: rE3oIZaYTiCNEkVCS43UzA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,214,1725346800"; d="scan'208";a="83510934" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.25]) by fmviesa004.fm.intel.com with ESMTP; 18 Oct 2024 07:38:38 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , stable@dpdk.org, Stephen Hemminger Subject: [PATCH v3 1/4] net/ice: detect stopping a flow-director queue twice Date: Fri, 18 Oct 2024 15:38:19 +0100 Message-ID: <20241018143822.2784548-2-bruce.richardson@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241018143822.2784548-1-bruce.richardson@intel.com> References: <20241009170822.344716-1-bruce.richardson@intel.com> <20241018143822.2784548-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. Fixes: 84dc7a95a2d3 ("net/ice: enable flow director engine") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson Acked-by: Stephen Hemminger --- 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 d2f9edc221..024d97cb46 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