Article View: linux.kernel.netdev
Article #25179Re: [PATCH net v4 05/10] net: au1000: serialize TX completion with packet submission
From: Simon Horman
Date: Tue, 01 Dec 2026 11:00
Date: Tue, 01 Dec 2026 11:00
23 lines
9392 bytes
9392 bytes
On Fri, Nov 20, 2026 at 04:48:04PM -0800, Florian Fainelli wrote:
> TX completion runs in hard IRQ context while ndo_start_xmit updates the
> same descriptors and ring state without locking. An interrupt between
> netif_stop_queue() and setting tx_full can miss the wakeup and leave the
> queue stopped until the watchdog runs. Use the existing IRQ-safe device
> lock in both paths to serialize reclamation and queue state changes.
> Keep the packet copy and padding outside this lock so uncached DMA
> buffer writes do not extend the IRQ-disabled critical section.
>
> When submission reclaims a completed descriptor at tx_head, advance
> tx_tail and clear TX_T_DONE before dropping the lock so the interrupt
> handler cannot reclaim it twice. The TX queue lock reserves the idle
> descriptor while its buffer is filled; completion stops at a descriptor
> without TX_T_DONE and never accesses its payload. Reacquire the device
> lock to publish the length, DMA ownership and tx_head together. Consume
> the copied skb after releasing the lock with dev_consume_skb_any(),
> which also handles netpoll entry with hardware interrupts disabled.
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Technical Details
Message-ID:
<20261201110059.GS804035@horms.kernel.org>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374957-linux-kernel-netdev=dewy.ruReferences:
<20261121004809.1690280-1-f.fainelli@gmail.com> <20261121004809.1690280-6-f.fainelli@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374957-linux-kernel-netdev=dewy.ru From: horms@kernel.org (Simon Horman) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net v4 05/10] net: au1000: serialize TX completion with packet submission Date: Tue, 1 Dec 2026 11:00:59 +0000 Organization: Usenet Network Message-ID: <20261201110059.GS804035@horms.kernel.org> References: <20261121004809.1690280-1-f.fainelli@gmail.com> <20261121004809.1690280-6-f.fainelli@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="1691546"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:b3Tl4TsPLG49U7oFpNYEvqnEfUI= sha256:/4BCZlncDsCZx97VQyL8DEWPRAJ+sAeYBLlySUDkcQM= sha1:exwnZuWGlA21J1tcQJpvxOV4z7M= sha256:N2PQbDuGYcsRreXTUWs4mQO4MJ7p2Y8IBK9QNXFy19s= Content-Disposition: inline List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 1932B11733B; Tue, 1 Dec 2026 14:01:21 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.501 X-Spam-Status: No, score=-3.501 tagged_above=-9999 required=6.31 tests=[DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HgJIg6QfQWrT; Tue, 1 Dec 2026 14:01:18 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-374957-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id C93B6117240; Tue, 1 Dec 2026 14:01:09 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 84F1B26C7E; Tue, 1 Dec 2026 11:01:08 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796122866; b=tEOBm3W1EpbtNDUYYR1gPl7rzon0WK6OKFYRTRaEkcnFPTz5cSIGQn1rC+jYjQZurfG6 lSTcl29s00RrJl79GM4h0CY7sDjbgA72/OJ4FVJHoVHCHiWCrbyW0XV2GhhSz3aYnYk5q 1e9DwYYRxa5y6VmkLNXTLeyetuSZmCQrXsITejVakHC6lvDsvqYF2ISpsPZIAR2UdoHja qJ3rJEagdNY1dkG1OVvOlwHChMVAew5mIl+akRnbZp1AoEe1BzBhfcv4vvwfrRCxY/TVl 5R1Z/mrwV0lfPJvDc2g5o5/mz7902KdZe1SDaQpAlu89uL471CjwPiimhW2HvOT3k1g== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796122866; h=X-Original-To:Received:Received:DKIM-Signature:Date:From:To:Cc: Subject:Message-ID:References:X-Mailing-List:List-Id:List-Post: List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence: MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=fsVklzjLZ22znfj5YIAQhmlmrGiygnMWe14j6EI4Eq8=; b=bMVycQotAmqdYs1V+EZitmGx8wJlDS5MErzhOb3e+URrwjVGC/Faio6WDQucaFyqmoVN NAySj9dFbAo16xglcts74kXFHMWHzCOSTdVChvR20HMh+jfcVVUYflEtFFUbsNtnBCCij 4MIIAgZ5PkEAVjfk5kOVwy2k3E/fZsJNhaClGnBjSne9thuskxKH3A2bfFz8NV8BN5Awk ATSVo3wNRBz5TI4PVyfZbW1XZ0yNHE+mVLJwIlyPSf7KwDuQnsUbuc1YQ1SA4TfsXS/vm L0rdSYuT5hZ+IFJ+poI52JSoKWkgp6XiKUc9RlO1ne0e82THg9jD4uVCVHVYzb+8ulA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Niky7cr4; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 69132606A32D; Tue, 1 Dec 2026 11:01:06 +0000 (UTC) X-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=Niky7cr4 X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796122865; b=D/B0ul4Z80SBmbjtTyyt0acXTt25Oh7Po5eTgfq/JQk0HeklSu+EW3YaUQtUwyYml5BZ HKX8O20wMUQZx30lTJ0MR22DEPb4kLmCWsK07Bn0wGvd33SFm0PDUq7BkCBeI34gi4D5h vUUwirlcUM+wJOmTqfLusUy+D7aUOUUbDR8m1XsE18vWfzBYVf4W7ZdzDJn1MQmrjeVoO snTiAugQbAecVAGIaqar3VZh0ogCdWh/x41VQoNZBYqgUf4qTR8ikyCgC1WZgR6hMbi/U E9GM+wus6JoA6QoF+RD5Ah8kqnP1d/PIC1rEsl2fCXVyiEMeNABEeHUGw/LG9aRcA9Q== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796122865; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=fsVklzjLZ22znfj5YIAQhmlmrGiygnMWe14j6EI4Eq8=; b=Mbp27GlNYIE59FbHyK9Qrbe967xW2MtErHbIzr3TEWvPzVyHCQXhb6NRtD7+C6WaZYVo Rphq816x2yR2E+4uhHJIWujEifxHRV/zYZGIefTYtTD9gsOlc1STtWhJLWzVl0hLvSq8c b4jefk6j3rLqyTK4LGR8O4nOFDcGXZrjVtn/zdDfXni5Rzef377lWYE85t6g/jWDX7P1u q5ptl4phESVu79bEqn56RhL8EDDXcKoF3xAjUA6spvelRVXL1uK1JWiC1HD3y6O2AbujZ u0p7LY/v+CANdWcrM32ej5tmU8hBpXw3f7yHfLP7xfI0dseSRieqcQTM24jAjS3cUYQ== X-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=Niky7cr4; arc=none smtp.remote-ip=100.103.45.18 X-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 865EF606A31A; Tue, 1 Dec 2026 11:01:05 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id E16581F000C1; Tue, 1 Dec 2026 11:01:01 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796122865; bh=fsVklzjLZ22znfj5YIAQhmlmrGiygnMWe14j6EI4Eq8=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=Niky7cr4ocJiB5rnhBOfl4Pks0pvqeFBHMzL7tF/ebsl/MmQRFo8xMCPKTl5uDVg/ sU1c1QFIkCmDH14X6vEtRWK8pY4RWmK3K1WYCYTNZQMVdypoXZJwCQntqXYW9SHYDt as13fZ9flztAOjKc6ZFbk92FI8tAFiA9mNpmYuYYuF/WIgQQV7AigFZcvivWp2GCgZ KrPGIxvoRmQJfDkP8hOuqjqu5y2x2xwnwFCBrpnG4xk0oO8czVx6yqgqLi/2TC5Ykv A7vQoRo9ot3Ff1HZzmNrxmG9inQo/j6pluMHBhFNIUV/2RYomf5AmePW3KI9KMlYUX oic4I5ETdcWSQ== X-Cc: netdev@vger.kernel.org, Andrew Lunn <andrew+netdev@lunn.ch>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Heiner Kallweit <hkallweit1@gmail.com>, Russell King <linux@armlinux.org.uk>, Jijie Shao <shaojijie@huawei.com>, Runyu Xiao <runyu.xiao@seu.edu.cn>, David Yang <mmyangfl@gmail.com>, Herbert Valerio Riedel <hvr@gnu.org>, Danny Kukawka <danny.kukawka@bisect.de>, Mugunthan V N <mugunthanvnm@ti.com>, Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>, open list <linux-kernel@vger.kernel.org>, Manuel Lauss <manuel.lauss@gmail.com> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-In-Reply-To: <20261121004809.1690280-6-f.fainelli@gmail.com>