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 F3DA945B42; Tue, 15 Oct 2024 17:20:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BE2C4402EE; Tue, 15 Oct 2024 17:20:08 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by mails.dpdk.org (Postfix) with ESMTP id BA9B74029C; Tue, 15 Oct 2024 17:20:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1729005605; x=1760541605; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Y01m4O0PcfUwET+0xPTkJS7GlyKXxIXJ3//IAn3pVhM=; b=XcRVilMuUa5gWQELks3y7nGX+a1V++lH2OuXWAHiyo9vqScmBbqTCW9m TGGXcuJVPz0I1KZQyh5hIgb4Vds+KAvRchPRbOlDNJVmwdhG4ySLFPr8k Jzb3ZnlKjDQ+DFZJWuKKZiMmg4+Qc+/QoOL6DPDbN59bAIj0+4clAHyYW zYrNwWbLWBTVv2E9pWlLOLNFrnkkhJeVSH+7G//4yqqQucpvYBEg8fmCd +/H26tPL7vZuLFxwEtSX+ZKnRT/ps7601DezgD+6RqPYkwLShNjqwYywh 61nLKOzTYCi2E5TTPtbeM8v5LQnKtQXPvHDPsc3qUrOyoYULI611Jvdtg w==; X-CSE-ConnectionGUID: dYyS2JHaRBSPLFvrsYJXag== X-CSE-MsgGUID: UWOtVvBgT6i/EBPNd0cWoA== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="28549675" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="28549675" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2024 08:20:04 -0700 X-CSE-ConnectionGUID: rpJJJippQ92ywhyC/c+b/w== X-CSE-MsgGUID: uhuoecVySDGP/MRd7eNfcw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,205,1725346800"; d="scan'208";a="78393712" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.25]) by orviesa007.jf.intel.com with ESMTP; 15 Oct 2024 08:20:04 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , stable@dpdk.org, Stephen Hemminger Subject: [PATCH v2 1/5] net/ice: detect stopping a flow-director queue twice Date: Tue, 15 Oct 2024 16:19:53 +0100 Message-ID: <20241015151957.1413286-2-bruce.richardson@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241015151957.1413286-1-bruce.richardson@intel.com> References: <20241009170822.344716-1-bruce.richardson@intel.com> <20241015151957.1413286-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