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 9D0964575B; Wed, 7 Aug 2024 11:34:30 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CB2A840E18; Wed, 7 Aug 2024 11:34:19 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) by mails.dpdk.org (Postfix) with ESMTP id DC0144029C for ; Wed, 7 Aug 2024 11:34:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723023257; x=1754559257; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dsMeQYQMD84RlgK6NKVflTBI/D9ELWC/eMpFhKbzYRI=; b=drKMpdiRcZuU1DBDBqRq1O+xyfvPU+v5A7XEigA8XmflFLj9LS7+qFbQ isQ/RhgmKXcQehwrWRTnPnMU21u0sZnEbwt8lp9Ps0OLdvRFI94tocQPs cgGrOQOjcg2zu3v7ste9vZTYr7GwSNMIzs613czCBB2AwktCa4p0VijrS bmWtKocM7cFr/lc6PGfKa0wEIJ7yVnlcXvKG9ZWfPD7QTl5wZrCWUlWBf D24jMJfMTJXb42Fdjgji0svSgqLSbggNT6y6Px7pqr1eweB9htwhEObJH Vox+c4g+2w1ytrxT3mfUXLNXpdobEFO8GjhCvh0BBX2sSZk8eEid++M4A w==; X-CSE-ConnectionGUID: 3q0Z1qJvTVeAYVa2PjAJmQ== X-CSE-MsgGUID: 9z48Z9z7RDC1fZgZcq9z0A== X-IronPort-AV: E=McAfee;i="6700,10204,11156"; a="12897948" X-IronPort-AV: E=Sophos;i="6.09,269,1716274800"; d="scan'208";a="12897948" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Aug 2024 02:34:16 -0700 X-CSE-ConnectionGUID: v9u8FW3ST+uhnC+1+mnJIA== X-CSE-MsgGUID: uTX2p2OyTfaqp0PVrhLBWg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,269,1716274800"; d="scan'208";a="87730972" Received: from silpixa00400562.ir.intel.com (HELO silpixa00401385.ir.intel.com) ([10.237.214.39]) by fmviesa001.fm.intel.com with ESMTP; 07 Aug 2024 02:34:16 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [PATCH 02/15] net/ice: detect stopping a flow-director queue twice Date: Wed, 7 Aug 2024 10:33:54 +0100 Message-ID: <20240807093407.452784-3-bruce.richardson@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240807093407.452784-1-bruce.richardson@intel.com> References: <20240807093407.452784-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