From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796424821; b=aKTzLMqaf4Omx/mNmBxidK7C0a1mdPgPU0Xmm4O9cH2+aBcpO+dDRk4wCSD9hSAaybvF OqVQpbWGWQB7vtLhccE3g8zo48qtuNUZPH2SHGV0ffVpb8cW3OYEQluAwE9JNd3/eNoJ9 Mfs84nuunBw3yabDkvSrhYLd+yEBUz9CS03d6m2qIr8T8ub+eZzyK/PxsYpbxRp19lpUe LQuuZJHityScwF4daBWMG+2psUdE8+jYH3hHj/p8/NOEfmbcR/kgh09YTPqA7TbRUAzdz Wo+5ij0yNpnFZSFREnLSI7ryUyaUgQqScvbnHBfJ4MTxqAyFO8fX9x3tlWxzO/1jsqw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796424821; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=t05yhjKhonmR6kUdKzRabzCA/mOJsksQxnoBquOafMI=; b=IfiS5aaV5t8XvnUlpQZqU2V5+/GpbwdTO/EwNML2vpg/ySl6/vABQD39K5Tv/mSLlH5n y1DBYcuyzSGvfHY4NLf2VmauvziZVP/ts8IW7oI4NW+wd3PHGaptLe0KdUMESBxiS8nbD z+K2gxjS7WlW6+nfbe6ku2gkXasCbZHRKWjHLiMYri/NbujWZwzeWe1rqUoQnlNMF7tw+ WTJSUAsYcOXPtc3bMc2dE7FFoBRzcKdEKBlq8zgOwJDw/ybe3mo9ys+E5txsMcrVjXkUT /rKwVqjt1oEADjLPZuGoAxAHxeDpBUhLWvZGKuMb/3VtGBBYE/aSCYtZ+i+FsZ59wqw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=QFwwpjnU; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8EDBE606A322 for ; Fri, 4 Dec 2026 22:53:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=QFwwpjnU Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2AC0B1F00936; Fri, 4 Dec 2026 22:53:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796424821; bh=t05yhjKhonmR6kUdKzRabzCA/mOJsksQxnoBquOafMI=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=QFwwpjnU6T3Qf4WC2QS0E/CvRhUu0jzrpQWkcqovmcwhcsQ/t15x/esDAmWvxW8P9 JOeS4ozl9wXTefmjcMKzQ7VU488VRIoro+3498q5T4JmbEVvE5Oo8tJlaScIzWi9lk 02QWTf+xxxkR3QqxFf7jLJjPSqKW8qR8rW6xf1yQifGw0H6O1x6+KHLLiCmnBH81jF wq2ZYGNxCr9e3nZJFLTjKKpzR0vUigVWfo6BKta18DsKK17x1KdiHsRzRB8+l7ZPuq a8Toc1T6gTLez3ipdNBlbJyoFoqLcejdWS6rzgqWj2tLAb25pfrlpZnMamW8MBYoJ0 HEoAUEYK0aO+g== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH net v2] i40e: stop XSK queue pairs in VSI shutdown order Reply-To: sashiko-reviews@lists.linux.dev To: "Matt Thompson" Cc: intel-wired-lan@lists.osuosl.org, bpf@vger.kernel.org In-Reply-To: <20261203-b4-i40e-xsk-queue-order-v2-1-e14b712d5fc2@boondocker.io> References: <20261203-b4-i40e-xsk-queue-order-v2-1-e14b712d5fc2@boondocker.io> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 22:53:40 +0000 X-Mailing-List: bpf@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 2 potential issues to consider: - [Medium] i40e: i40e_pf_txq_wait() 20 ms timeout multiplies sequentially across VFs - [Low] i40e: Rx enable timeout log dropped in i40e_queue_pair_toggle_rings() -- commit 93f51afdbe4fd98b091222e08a53b9e822832e16 Author: Matt Thompson i40e: stop XSK queue pairs in VSI shutdown order This commit updates i40e_queue_pair_toggle_rings() to match the whole-VSI shutdown and startup sequence, shares the per-queue disable wait with i40e_vsi_wait_queues_disabled(), and converts i40e_pf_txq_wait() to read_poll_timeout() with a 20 ms disable timeout. > diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/et= hernet/intel/i40e/i40e_main.c > index abbc71e815ae3..555eac07e28b8 100644 > --- a/drivers/net/ethernet/intel/i40e/i40e_main.c > +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c [ ... ] > @@ -4660,6 +4661,8 @@ static void i40e_netpoll(struct net_device *netdev) > #endif > =20 > #define I40E_QTX_ENA_WAIT_COUNT 50 > +#define I40E_TXQ_ENABLE_TIMEOUT_US 1000 > +#define I40E_TXQ_DISABLE_TIMEOUT_US 20000 > =20 > /** > * i40e_pf_txq_wait - Wait for a PF's Tx queue to be enabled or disabled > @@ -4674,20 +4677,16 @@ static void i40e_netpoll(struct net_device *netde= v) > **/ > static int i40e_pf_txq_wait(struct i40e_pf *pf, int pf_q, bool enable) > { > - int i; > u32 tx_reg; > =20 > - for (i =3D 0; i < I40E_QUEUE_WAIT_RETRY_LIMIT; i++) { > - tx_reg =3D rd32(&pf->hw, I40E_QTX_ENA(pf_q)); > - if (enable =3D=3D !!(tx_reg & I40E_QTX_ENA_QENA_STAT_MASK)) > - break; > - > - usleep_range(10, 20); > - } > - if (i >=3D I40E_QUEUE_WAIT_RETRY_LIMIT) > - return -ETIMEDOUT; > - > - return 0; > + /* QENA_STAT stays set until the disable marker leaves the Tx pipe. > + * The pipe can take milliseconds to drain even when the ring is empty. > + */ > + return read_poll_timeout(rd32, tx_reg, > + enable =3D=3D !!(tx_reg & I40E_QTX_ENA_QENA_STAT_MASK), > + 200, enable ? I40E_TXQ_ENABLE_TIMEOUT_US : > + I40E_TXQ_DISABLE_TIMEOUT_US, false, &pf->hw, > + I40E_QTX_ENA(pf_q)); > } [Severity: Medium] Can the 20 ms disable timeout in i40e_pf_txq_wait() multiply into a multi-second stall across VFs? i40e_reset_all_vfs() and i40e_free_vfs() call i40e_vsi_wait_queues_disabled() per VF and ignore -ETIMEDOUT. If a wedged Tx pipe or PCIe link loss (rd32() returning 0xffffffff) leaves QENA_STAT set, up to 128 VFs wait 20 ms each sequentially (up to 2.56 s). When i40e_rebuild() runs with lock_acquired true (such as from i40e_do_reset_safe()), i40e_reset_all_vfs() holds global rtnl_lock() across the whole loop. Exiting early on tx_reg =3D=3D ~0U and aborting or sharing a deadline across VFs would avoid this. [ ... ] > @@ -13408,46 +13412,38 @@ static int i40e_queue_pair_toggle_rings(struct = i40e_vsi *vsi, int queue_pair, > bool enable) [ ... ] > - i40e_control_rx_q(pf, pf_q, enable); > - ret =3D i40e_pf_rxq_wait(pf, pf_q, enable); > - if (ret) { > - dev_info(&pf->pdev->dev, > - "VSI seid %d Rx ring %d %sable timeout\n", > - vsi->seid, pf_q, (enable ? "en" : "dis")); > - return ret; > - } [ ... ] > + /* The whole-VSI enable path brings RX up before TX. */ > + i40e_control_rx_q(pf, pf_q, true); > + ret =3D i40e_pf_rxq_wait(pf, pf_q, true); > + if (ret) > + return ret; > + ret =3D i40e_control_wait_tx_q(vsi->seid, pf, pf_q, false, true); > + if (ret || !has_xdp) > + return ret; > + return i40e_control_wait_tx_q(vsi->seid, pf, xdp_q, true, true); > } [Severity: Low] Should this keep the dev_info() Rx ring enable timeout log and reuse i40e_control_wait_rx_q()? Unlike i40e_control_wait_tx_q() below, i40e_pf_rxq_wait() does not log on timeout, so an Rx ring enable failure now returns -ETIMEDOUT silently. i40e_vsi_enable_rx() calls i40e_control_wait_rx_q() and logs the timeout explicitly. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203-b4-i40e-xs= k-queue-order-v2-1-e14b712d5fc2@boondocker.io?part=3D1