From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 82ADB606A322 for ; Fri, 4 Dec 2026 22:53:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=aPoIeSgl; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=QFwwpjnU Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 5A6FD60A38; Fri, 4 Dec 2026 22:53:46 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id c75M6Co13d0G; Fri, 4 Dec 2026 22:53:44 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp3.osuosl.org 1ECCF608AD Authentication-Results: smtp3.osuosl.org; arc=none smtp.remote-ip=140.211.166.142 ARC-Seal: i=1; d=osuosl.org; s=arc; a=rsa-sha256; cv=none; t=1796424824; b=d6LTwWasNrSr6Mf2hHNs2F+IKH5m8k9Os+EyeGi0BCIXxeN1gvGrNlgYwfFYk5Tr4XmL nE7SIMkGpAq1mtiXKnV0SsSOQszS1WFaW6Hfr+bPio7QPeUUUnnwsdeo1k1h+PdxhtYwx Xf0bXXVMkHgD5MwYmIxPvGLSspqWsM/9E7Bu7WvRUazd6HnHPLcENqIUOWJQQVxLJbckc mOpmaKOriQlHI9xE7SjzTcoChBZ+NuZwAvafXQ0TJCWcZZQhBYAuxWyWMcEiPA8NZw2dk jfWpEfukK9KMM9aL6Uo3l/VxK5qQtdEM0EGWVhrwZPFR86FvR0jlCoj2thO9y/Fkszw== ARC-Message-Signature: i=1; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1796424824; h=X-Comment:DKIM-Signature:X-Original-To:Delivered-To:Received: Received:X-Virus-Scanned:X-Spam-Flag:X-Spam-Score:X-Spam-Level: X-Spam-Status:Received:ARC-Filter:Received-SPF:Received:Received: Received:DKIM-Signature:Message-ID:From:Subject:To:Cc:In-Reply-To: References:Content-Type:Content-Transfer-Encoding:Date:X-BeenThere: X-Mailman-Version:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:Reply-To:Errors-To; bh=t05yhjKhonmR6kUdKzRabzCA/mOJsksQxnoBquOafMI=; b=A+IT6ffo/nEALvkn6gyz65hi5Jduwn29G8ZHxmxvdkBZvzS7CmI23bl6lx2ZkzLFFOHZ 2KY2Bpmd8PyurxTgok7OaTjkLy3Ro1ShvIfn4Yj0OFMdnaonb8CzOvKMgxLpCktKDfW8R i1ftxZgwAH9hIVAGBIxs9yMNsuyS7m6ktBHj2OB0Gfp3t0hZsfwrS94RpKt0k9ZCCNtnU hQS1QFXKkOBfsTNObdcnJaZSxyHYthschPmegeXMvAyUNNUtLNq6TtBhj9FEuwi/wDP2y rr25wANkhpjznIDeMiJ5LsmI3ZRyF5CdiW9ijJ2puyvm/9+BXovWGAxOJpvaxDtoK/Q== ARC-Authentication-Results: i=1; smtp3.osuosl.org; arc=none smtp.remote-ip=140.211.166.142 X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1796424824; bh=t05yhjKhonmR6kUdKzRabzCA/mOJsksQxnoBquOafMI=; h=From:Subject:To:Cc:In-Reply-To:References:Date:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To:From; b=aPoIeSgl24FPOlBJGl8Vnv8O0MIaExPC3mID2nQSXIVXTgWWW+0fxqZdOFkmUzQ/A upkDGlrk/MB6xjRKu0IlgP6ako05HbA8k76RdPYV8SSFx/QPWnBAZQL4CJgBwNbkVf WZrSQlu7Blep+Lfo3CECFPj+LGFpdKiNpG1RCKHNNqQcnGRAdUahBajHuOsk41111T RIVP24zNP1a+3zIPVLRBTARnCv7a9lKs5ixoICGWvbQ48yfpoN+dTgUem2TXau/wQj qrl2imdaVan5innF7Ytq+wZtM5qFRPCJeENVil14faHq0fGZHcC0fMbqagqdnnqirc wgbxrl+Ug03fA== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id 1ECCF608AD; Fri, 4 Dec 2026 22:53:44 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists1.osuosl.org (Postfix) with ESMTP id 5390B158 for ; Fri, 4 Dec 2026 22:53:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 3950C81F99 for ; Fri, 4 Dec 2026 22:53:43 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id bXRJyyCWeY9G for ; Fri, 4 Dec 2026 22:53:42 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp1.osuosl.org 45E4281F8D Authentication-Results: smtp1.osuosl.org; arc=none smtp.remote-ip=172.234.252.31 Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.252.31; helo=sea.source.kernel.org; envelope-from=sashiko-bot@kernel.org; receiver= Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=QFwwpjnU Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by smtp1.osuosl.org (Postfix) with ESMTPS id 45E4281F8D for ; Fri, 4 Dec 2026 22:53:41 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 5E26545082; Fri, 4 Dec 2026 22:53:41 +0000 (UTC) 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 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-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sashiko-reviews@lists.linux.dev X-Spam-Status: No, score=-11.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 X-Archived-By: 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