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=1796128893; b=yGZTj25Cm6HryfGhA4QV6606Bjg+BBElWkKMCRBT6KsU2WK3438qiAentQj6h3RmhuTL EbWZLLbiBjCRrPSH7aUps4IsZgO3Lbf8kxfk782m5sFRUpqPp5e2KwMSS5pZRNzdqVsfo niDvf12T7NrxiS8TGDXX+1eF2ojyhMLg5GxR+jD+IDnXBNSVWlK9HtAXbPk7vCpC+eVXL KFPcoJcawgevv+yjZbPIiDjFmpJ3tz/D9xj2cyjCEHHTJV7aDPg1BdcmtCCM3LuDvyIBD rn100n85fWw6HmYtNyQ3cjvr2QyLWQvc1f0yqU7+z0jy801Y/0x0WpIn/D1MaZLa/CA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796128893; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=U1B6U3ZzSW6lYKHApxk411RiWoxSabJ4GuSRkPFKWkI=; b=ejPWME0mpLm4EizGB64Dj4N1huRse7EUkkYknMiLgTc/0LOAT+6q4RheXRR4hoTSkc3E 7b7gknkJGW1OfODCEzfmTrEa6tIPAH6NVq73t1tXUFTsRDby9A0qyTDGy7nkKF0HKUh2y JDmoBQCw0sAiwVunSjmsipfmwyFSHMgX0YrMsSTpBueQJXJesi0EItArcV/NhWofVVEER M+USUbR3FqtBSMpbxSW8J9TyI4O310D5AKlrWzPrV6c+73rcVim26ctJA5uX2nMxoyv8K TDiKtBip9jCdacIjzEzibdtWYS/e3wOCjN66K+Ausfaeeul/MjShgfiIzvf//ETPv4w== 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=BD1EGXvp; 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 001B2606A31A for ; Tue, 1 Dec 2026 12:41:32 +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=BD1EGXvp Received: by smtp.kernel.org (Postfix) with ESMTPSA id 38A031F000C1; Tue, 1 Dec 2026 12:41:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796128892; bh=U1B6U3ZzSW6lYKHApxk411RiWoxSabJ4GuSRkPFKWkI=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=BD1EGXvpLijj28qKHQ5TlQIWIWoCqbjj5J6jA51TZN8IADs2MwtxymK8EAOILtcJv EeiCYWguIfFprR9k5l6ByeG64BHA8oidX728xF/Twr/BmcCzUHL7HgI4/0ISqRB38s 6r4ftlETUpsAzQ5iPQe83HkpWW3doRjRqgBue497DufC4hDdjKajikeAmBdcB9oy1B tjqmjQJZjl+/lMRUBUPHSvCP3aa1Reu2DJN2o6pLthJO6ut5WO8U9t7M+/dcTpl0db YqnX72dHM9E+tTWk4Dy59Br3SNY+nyTBvYcucxU5WS9zkycgTxrMqtAzf/hkRQszsP BIIuZzrmnRTmg== Date: Tue, 1 Dec 2026 12:41:28 +0000 From: Simon Horman To: Dimitri Daskalakis Cc: "David S. Miller" , Alexander Duyck , Jakub Kicinski , kernel-team@meta.com, Andrew Lunn , Eric Dumazet , Paolo Abeni , Willem de Bruijn , =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= , Bobby Eshleman , Mina Almasry , Dimitri Daskalakis , netdev@vger.kernel.org Subject: Re: [PATCH net 4/4] eth: fbnic: wait for both TWQs of a Tx queue to go idle Message-ID: <20261201124128.GA804035@horms.kernel.org> References: <20261121033215.1020506-1-dimitri.daskalakis1@gmail.com> <20261121033215.1020506-5-dimitri.daskalakis1@gmail.com> X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261121033215.1020506-5-dimitri.daskalakis1@gmail.com> On Fri, Nov 20, 2026 at 07:32:15PM -0800, Dimitri Daskalakis wrote: > From: Dimitri Daskalakis > > TWQ_IDLE, TQS_IDLE and TDE_IDLE have a bit per Tx work queue. Bit 2q > is for TWQ0, and bit 2q+1 is for TWQ1. fbnic_wait_queue_idle() only > tests bit q, which belongs to queue q/2. Thus, the wait covers a TWQ > of the wrong queue (except when q = 0). > > Test both of the queue's TWQ bits in those registers. > > This bug was found by AI and verified in QEMU. > > Forced TWQ1 of Tx queue 3 to never read idle in QEMU, with rx 2 tx 2 > (queue 3 is the XDP Tx queue of rxq 1's vector), and bound devmem to > rxq 1: > before: bind succeeds > after: bind fails with ETIMEDOUT: > wait for queue Tx3 idle failed 0x0800(0): ffffff7f (mask: 000000c0) > > Fixes: da43127a8edc ("eth: fbnic: support queue ops / zero-copy Rx") > Signed-off-by: Dimitri Daskalakis Reviewed-by: Simon Horman