Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1845471lql; Wed, 13 Mar 2024 09:39:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWM/e3GXMfNPDwA5ExdeP7/55HhDPIy/+9tuE/pk8bojIAxivOMt5yUesGZenS/LgULxFqBtItvRDXsJ3EtmkMU8OGkYpeERSX8mxUsqA== X-Google-Smtp-Source: AGHT+IG9/Dq3Hx9shLsHg/PZSMutvJfQn05MCwax6hTZdM+OkBvI0BMGphDrJI+syL40eh0HeVpx X-Received: by 2002:a17:90a:c386:b0:29c:7170:fa33 with SMTP id h6-20020a17090ac38600b0029c7170fa33mr771674pjt.29.1710347943966; Wed, 13 Mar 2024 09:39:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710347943; cv=pass; d=google.com; s=arc-20160816; b=hgkG/1wqNpVGiaObzYDNeO2nB/eszyN5rGRTTIijbnRv51viOk/672NMJZqUw/U3ln nv7zCLhX1ThcU+MEgOIB+0CmGc/lmF9vkZuAUCu4VQPuPR4Bl2IjJuiVDdkQ6QnBQ0D9 lW1iugNqZJOPi6DyPqbE9B+RFudTQAeVTinTsMwXTJ7JVcORVw2mmCZUjaVWe9GhXKqe Ac9D2nEcW9jqcmWyjvdvtcqFNDRTDIbGp+wnanWdAdckx/R4IGtsSqh5V1NClvMf2b3Y 8qWlo8iVU0n2zhA/737bkflMAgjCBxbkk+x4Qs3ELcM+YekPms6NBzBv2ga5jRPAvsuQ MDnQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=RH0XlH4C+FnrHBSBdMLOovjuqIa6ICLhwOOtdJYAnNc=; fh=eqxG9ZgQ7D5gp6Qq4M9r6uRPDgoBvrEdDCiYoLYhsV0=; b=DeTOLy+S7AJ8/bL7D9nCwVHtexvlpEPE9+vCt+M1vqEAg3qC2S93nIvUUrOT2PWpqR yaJs2CSg0ahLPSL3ALR24CmDq0oR33ShWowchDw1KyscnZ2BLh3M/59Gwu4I9BycgJ2P /VfA/OeIYXhaPlEqKlbYuS1KuQEGgrrncyHaH3rR8Fis64ZeEabOHrgk3CyOQmM6Svo9 cQ5svhwc2SkADtbx18eovOODTCmNzPH/kRloZkdHbj6UpktHV8C/guwdFkzAFzLV/xT1 yCX1Qw4kY7t0ThGza3skDirSLUp1ZXKbqkT+Y8AiV0wg5Zn7E2C2WzAtP7eC0g5g143Q YIEQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qbSFt1RR; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-101752-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101752-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id lx6-20020a17090b4b0600b0029c6237fd10si1484463pjb.153.2024.03.13.09.39.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 09:39:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-101752-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qbSFt1RR; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-101752-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101752-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 71EF5B2293E for ; Wed, 13 Mar 2024 16:35:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 12F9F5B68F; Wed, 13 Mar 2024 16:32:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qbSFt1RR" 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 3595D5A7BB; Wed, 13 Mar 2024 16:32:54 +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=1710347575; cv=none; b=f7PhkJV/NWtt5ni/P4wVMmOBMN/l6qKyVrmbLtsa0txjdfqf2wZyJ9X71qKghY9mBcdR4kGL7T9VD+YfrWETcr+YVEk/S0G7eERGKzlANK0WSBA3B2LBkCrcyocvH/1ngroErmt+hkh58urKrb0tUefwE8jGOSyqrPC1YKeSxWI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710347575; c=relaxed/simple; bh=3byDPYlkwxVV+C00ILl4INWk3sLQb2R+fROVXIniFyk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QFT0hMMCzmOP0hux6tCALpgz7QjHHPkvrwqXVamXkms+BxN7GB5bZM56BJ9b1572F0ebEgmLQ5fNcJ4AMuXfUda6z3o0S3dX4mZydl53GfdiRN4jxWk+CLAeYYZB95sl60c1i2QobLUTS3fzkwjHyzn6A0rh8Hzn3NHGculrbTA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qbSFt1RR; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D5F95C43394; Wed, 13 Mar 2024 16:32:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710347574; bh=3byDPYlkwxVV+C00ILl4INWk3sLQb2R+fROVXIniFyk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qbSFt1RR7UjDQPWRVJpeqrT+x/QeAW0KmX4UOHaWQdqxkfWTc/3fmKsttDh41kdnQ JdqwxNNM3SzPGDoovm8dXHVq2bsFPLrr5awgjW7nabboNAmyObC7vI6H4shcTnNYlt 2Dgb1zeoTCWET75Z3GqtMfNEvBN70csB/KQjIBPKct5x1Ceu9ay25U1KnlOo83oSqd v7nstUQD35PKrh0WF74HtoEyu/3ZZYj3avCB18VVLruYEO7IpOlnK6Lp7QJikNDyM1 7Nn70JUE3iuOqQ2ImrQsPxwGPOmrJ2f1vJLH+XkXz6QCxOEvcU7Ow6VLVRO1WRp77g f6vJgCXqVVg+g== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Maciej Fijalkowski , Chandan Kumar Rout , Magnus Karlsson , Tony Nguyen , Sasha Levin Subject: [PATCH 6.7 13/61] ice: reorder disabling IRQ and NAPI in ice_qp_dis Date: Wed, 13 Mar 2024 12:31:48 -0400 Message-ID: <20240313163236.613880-14-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240313163236.613880-1-sashal@kernel.org> References: <20240313163236.613880-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.7.10-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-6.7.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 6.7.10-rc1 X-KernelTest-Deadline: 2024-03-15T16:32+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Maciej Fijalkowski [ Upstream commit 99099c6bc75a30b76bb5d6774a0509ab6f06af05 ] ice_qp_dis() currently does things in very mixed way. Tx is stopped before disabling IRQ on related queue vector, then it takes care of disabling Rx and finally NAPI is disabled. Let us start with disabling IRQs in the first place followed by turning off NAPI. Then it is safe to handle queues. One subtle change on top of that is that even though ice_qp_ena() looks more sane, clear ICE_CFG_BUSY as the last thing there. Fixes: 2d4238f55697 ("ice: Add support for AF_XDP") Signed-off-by: Maciej Fijalkowski Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Acked-by: Magnus Karlsson Signed-off-by: Tony Nguyen Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/ice/ice_xsk.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/ice_xsk.c b/drivers/net/ethernet/intel/ice/ice_xsk.c index f3663b3f6390e..0fd5551b108ce 100644 --- a/drivers/net/ethernet/intel/ice/ice_xsk.c +++ b/drivers/net/ethernet/intel/ice/ice_xsk.c @@ -179,6 +179,10 @@ static int ice_qp_dis(struct ice_vsi *vsi, u16 q_idx) return -EBUSY; usleep_range(1000, 2000); } + + ice_qvec_dis_irq(vsi, rx_ring, q_vector); + ice_qvec_toggle_napi(vsi, q_vector, false); + netif_tx_stop_queue(netdev_get_tx_queue(vsi->netdev, q_idx)); ice_fill_txq_meta(vsi, tx_ring, &txq_meta); @@ -195,13 +199,10 @@ static int ice_qp_dis(struct ice_vsi *vsi, u16 q_idx) if (err) return err; } - ice_qvec_dis_irq(vsi, rx_ring, q_vector); - err = ice_vsi_ctrl_one_rx_ring(vsi, false, q_idx, true); if (err) return err; - ice_qvec_toggle_napi(vsi, q_vector, false); ice_qp_clean_rings(vsi, q_idx); ice_qp_reset_stats(vsi, q_idx); @@ -259,11 +260,11 @@ static int ice_qp_ena(struct ice_vsi *vsi, u16 q_idx) if (err) return err; - clear_bit(ICE_CFG_BUSY, vsi->state); ice_qvec_toggle_napi(vsi, q_vector, true); ice_qvec_ena_irq(vsi, q_vector); netif_tx_start_queue(netdev_get_tx_queue(vsi->netdev, q_idx)); + clear_bit(ICE_CFG_BUSY, vsi->state); return 0; } -- 2.43.0