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 8307C45BA3 for ; Tue, 22 Oct 2024 18:39:54 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7202740670; Tue, 22 Oct 2024 18:39:54 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) by mails.dpdk.org (Postfix) with ESMTP id 89C5B40272; Tue, 22 Oct 2024 18:39:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1729615191; x=1761151191; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Y01m4O0PcfUwET+0xPTkJS7GlyKXxIXJ3//IAn3pVhM=; b=WJTTBZJ/yVuWI/TcoC35corRf1G9rATyO9IZxoK4DNWmmzFbFwYgGd5r MVviRxGqAEjXKU0qzFwSiYRlszBpZHF93LqWjFqy+XgbLS1wQJepz+U+e /gqooYIBLOO+mFjOLdEUmSGcQ+aQB5EPv3Z2x4/j6MfcrWI1wYKh1sHLh /tl9BiQtUnd76qMhycgzlNIu4bRVs2WhIUqmwUGlqbp7H9oPe8qiGLxbq Rh2kNZFVgMTQuUoJiVdY/BSbk++2lUKlvWNh7Xe8zofcH1DZbqO8of2vk BDo9fXZILmaClrrxAzWgFMDH9czF8ZbiNJh5aowf4tAovrIuMbGyhEIkQ A==; X-CSE-ConnectionGUID: 9qlW6tilQOWJsO5bqYw2gQ== X-CSE-MsgGUID: 7HcHdLi/R2yiGPIe23Q4Cg== X-IronPort-AV: E=McAfee;i="6700,10204,11233"; a="40538710" X-IronPort-AV: E=Sophos;i="6.11,223,1725346800"; d="scan'208";a="40538710" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Oct 2024 09:39:50 -0700 X-CSE-ConnectionGUID: kRxRVw9jRqicvpcygYcJ3A== X-CSE-MsgGUID: XPzELPgjSLeUC7SVmnjC3w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,223,1725346800"; d="scan'208";a="103217657" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.25]) by fmviesa002.fm.intel.com with ESMTP; 22 Oct 2024 09:39:49 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , stable@dpdk.org, Stephen Hemminger Subject: [PATCH v4 1/4] net/ice: detect stopping a flow-director queue twice Date: Tue, 22 Oct 2024 17:39:41 +0100 Message-ID: <20241022163944.3564662-2-bruce.richardson@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241022163944.3564662-1-bruce.richardson@intel.com> References: <20241009170822.344716-1-bruce.richardson@intel.com> <20241022163944.3564662-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-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