From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 14C8E184101; Tue, 10 Sep 2024 09:49:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725961779; cv=none; b=e8U0yYJBbU+cBLPemT9ExZJ9hJgx4g81RlmxkHPAPuLTI10y768HB1T+jk8V0urgVj4lUa4j9yQAaZmoFamhuHlIsD2RfXJX10NcBFFGbHlBQ400T7tqRBkQvCNWSX1jMe15RciJ41rGeTDllo/OHQdadbjWPttuWuoZwp16K/U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725961779; c=relaxed/simple; bh=3rxlzAdpcDnYZqMk+HouWEOzjOzmEJFTRZKCMnGS+uo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FEXaYL05aaDSfcNGKV0QdTDlHCGHkov98JrMEhQ3sLAvGJ84jE8h9OgGhzPY1BtHZtU0WZtIfG0VsUzmZ7nq96JVy8xKcNFv+h80G1zfd9eQuVwpFCAFNVo9Z51JOoc0bMq3W/vHlAncj4METOd9BQcAItToc3oHXsGjXypqiQk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=HMAIyAAj; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="HMAIyAAj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 91B2CC4CEC3; Tue, 10 Sep 2024 09:49:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1725961779; bh=3rxlzAdpcDnYZqMk+HouWEOzjOzmEJFTRZKCMnGS+uo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HMAIyAAj2wK0JYnIwMJR0k2bPE8LC/TQbF6A69sVtV8IbzzzMPwGjf5b+1+yj+oyt heo/HAN+rSNSoEQwHrbFIFTIajHb8kPMRzq7DhfhWv4uczsksWZlhzT2Di+qWcfz+O /uxJ/NqWrXD5sYu+uYdZV3rnbqCh4bpGqHVNsbps= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Wojciech Drewek , Jacob Keller , Chandan Kumar Rout , Maciej Fijalkowski , Larysa Zaremba , Tony Nguyen , Sasha Levin Subject: [PATCH 6.10 185/375] ice: remove ICE_CFG_BUSY locking from AF_XDP code Date: Tue, 10 Sep 2024 11:29:42 +0200 Message-ID: <20240910092628.705850189@linuxfoundation.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240910092622.245959861@linuxfoundation.org> References: <20240910092622.245959861@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Larysa Zaremba [ Upstream commit 7e3b407ccbea3259b8583ccc34807622025e390f ] Locking used in ice_qp_ena() and ice_qp_dis() does pretty much nothing, because ICE_CFG_BUSY is a state flag that is supposed to be set in a PF state, not VSI one. Therefore it does not protect the queue pair from e.g. reset. Remove ICE_CFG_BUSY locking from ice_qp_dis() and ice_qp_ena(). Fixes: 2d4238f55697 ("ice: Add support for AF_XDP") Reviewed-by: Wojciech Drewek Reviewed-by: Jacob Keller Tested-by: Chandan Kumar Rout Reviewed-by: Maciej Fijalkowski Signed-off-by: Larysa Zaremba Signed-off-by: Tony Nguyen Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/ice/ice_xsk.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/ice_xsk.c b/drivers/net/ethernet/intel/ice/ice_xsk.c index a659951fa987..87a5427570d7 100644 --- a/drivers/net/ethernet/intel/ice/ice_xsk.c +++ b/drivers/net/ethernet/intel/ice/ice_xsk.c @@ -165,7 +165,6 @@ static int ice_qp_dis(struct ice_vsi *vsi, u16 q_idx) struct ice_q_vector *q_vector; struct ice_tx_ring *tx_ring; struct ice_rx_ring *rx_ring; - int timeout = 50; int fail = 0; int err; @@ -176,13 +175,6 @@ static int ice_qp_dis(struct ice_vsi *vsi, u16 q_idx) rx_ring = vsi->rx_rings[q_idx]; q_vector = rx_ring->q_vector; - while (test_and_set_bit(ICE_CFG_BUSY, vsi->state)) { - timeout--; - if (!timeout) - return -EBUSY; - usleep_range(1000, 2000); - } - synchronize_net(); netif_carrier_off(vsi->netdev); netif_tx_stop_queue(netdev_get_tx_queue(vsi->netdev, q_idx)); @@ -261,7 +253,6 @@ static int ice_qp_ena(struct ice_vsi *vsi, u16 q_idx) netif_tx_start_queue(netdev_get_tx_queue(vsi->netdev, q_idx)); netif_carrier_on(vsi->netdev); } - clear_bit(ICE_CFG_BUSY, vsi->state); return fail; } -- 2.43.0