From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.218.44 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796205381; b=0sEgn9iCAzET54m12dkPaqzj7EWAkiwH1wCOY99lH55Fgk3EBc97THYItugKLTP9Y9jA ARe9FFeBcHfbh5FpzaE+ir3nd/I/boRZ2Xv93jrW+VcXU5HJvTD11Swx794BjL/u2qvo8 gItgPXBiK3Gxhy0ha0JYGqaYKLJRDn2I/2DKpXXdxckifIUx8qmLq7NGg7xAlXkxv5GpB 2db46tZ92K2WX8l08zJKGV9deX1VO2qbwaUGr+2d5OxjlcR33Rkk5om4Ff+MlBstGnpOY YXDSsyaOjj7ILL9XirmGoizavIY6pXQRhgJmx5SNfIad+PxIqI4ER11wMeLbD51OPWg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796205381; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject: Date:Message-ID:X-Mailer:MIME-Version:Content-Transfer-Encoding; bh=xUJvNuw0Nz9tdh3jOfDwd24yd18cl8wo3hvvCwgyTaQ=; b=5Vm2bZugdG7+IF4YCjGHGj9ZMUSU2XGmJCaloNQ64d4jor9I7REKcorjrjP/IAMvLerg 5tMMP2Rkunz2stAT5d83bNAfq/IrtORMszgC69uVdcsuavCorqf1yMHzGBqgZqU8VpO6G JJVWWIDgOBjo29xoIjS2trD1L45o+KzSlEDqoeyptAbu0HiAYfxzja3o31/kC/0IfC3oV 955Uv9Pxad8fK5IZXWEoJIw4ILb118/wTBnWDHWVA3MyagVDkv3qe7DQX+MTWWBFXZb+z qjE7ZEbcm4nqNRGVfykE6KTk8Be13uPmUVGXryxRD1qcrk7Z/uN88dJRqDvD7Hbizyw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=xyxPfxoL; arc=none smtp.remote-ip=209.85.218.44 Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC612606A31A for ; Wed, 2 Dec 2026 09:56:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BC612606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=xyxPfxoL Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-c51c294cef6so669415566b.3 for ; Wed, 02 Dec 2026 01:56:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796205379; x=1796810179; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=xUJvNuw0Nz9tdh3jOfDwd24yd18cl8wo3hvvCwgyTaQ=; b=xyxPfxoLBBFKf/ZUq2cdvHm15bHO0sDDemZgc+cbyy+AzKb0TkI7sWlZ1IscVdpP3Q nITVHrdMxez3OYEIBCwdF3lZRWXLMfc/7ovHBRwzr9q3g6Xh/Yn+0/FU6NDDAF3anBKw JyTxqtPuto8swAugRZUtgZDLFqlrcU3eQ5Sv7h4mwVIRqmY2VjD3U4v+npTHtHkk+35G g6jI3g1mCEei3BYmjdh5rrokyt3Y4+Th9Prgn1foi55i+iXd1m6hGC/QuSzAq4wRSR1l 6uxt2Ve1YbURHkIkFjc9DAaYBS98Wjn5TNGk3tPFAvnYqHcpsAay5R2mNx0T8LaL1Goz VMSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796205379; x=1796810179; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=xUJvNuw0Nz9tdh3jOfDwd24yd18cl8wo3hvvCwgyTaQ=; b=VvJ1OACzELzKje3BaIOV2OHd0mhTskZkHcChDPzfx0MzGkZnTdg5vFGI8b7IXoNnVM W6DxLZ7hS1VLcw1KvuJTgB2YtPjNmPjl7uSXsNAV/lIahMVsrLIfNc5DBYGKrUVunQBR ty6utXVOHLHJmga5yixugvtgkpd2FSJvPZAaX3zuZQxKGcKmEpkA1O+B03jwkWgiUCyA oRM1GmTKCmZ2vF5z9v+Bp92M4APD0xWuHamJTDWi68YLI1TrN59C65B3lyXd7cq4RA3g a4OA2BhCBxEFF3co/7XBbk+j7QAJVdXcliDN9cpbHHJ6MGGmr42Af7+o2qaXtCP1cecE qRVw== X-Gm-Message-State: APuU4Z/qBUNfkzBZn/uTuNlrpJ6mwzEttzQfEx5RwW++O9gkWcw/ddfA nJ3zu5He2uTuTqGHqZxy7VMPfUUSB9E6odv65TTBkOP3EwdBBEa40+7fOcJeNbIU X-Gm-Gg: AZFdTZdc3AxK8e9I0DU3LDP3vKXbbtvWJykFcGepHrsCub9vCoL2LRuey26kyJzRS+t FJIAnqeFoZ8hHg+R0ajJF0IYXFRDDgL0TZUht2FMsQ4thH04Q335x6AW2nOhvrYbLIZdo/BppA8 QTavRVr64+61Z7ozRAfGmnSmS7ychSNl8HITi7ivXyfEBIxexWFzzLfbOGHUTwc/J4XqGFKAGxN zTFuFN9x7Z7qPHUjRZmwHt4FO0nD6f04dOFCwcgrSPLvJy3U1MUwq88Sy/vC8U+OCUXE6HXDLHB oZv0ChWXzjBET809GpnPuc9wtfrihVui0aXVQKF2FlxsQwoS8IgrrrcZR5iKDQteZiLi9aevWWL KUdXEBjhCUOKiVpHBrtvNQMuzTgsR30Eiup6z4SmCj+wFPo30/QUfnXaZ2uUGpR/fSvLrEbUVm1 wQJFmu7bpSY7p7GSL/T3GYH5Bka3zOegEIS246c/P1n06unDmNaYVyDW2E1kTW2TNWXnwQAHZ2z RWnZAHtRWeObfRKXwDJK+H8JlEfGLg3DcA5cweoWFFXbMYl8wQtLU5kH8jv/O+iZUX5xMyHW/qO 0/ZFM2oi6o5tQWMcJphVGrm2xakq4JRhvkV1TUwp X-Received: by 2002:a17:906:9c8a:b0:c41:9228:baef with SMTP id a640c23a62f3a-c513aacec15mr3217672566b.8.1796205379012; Wed, 02 Dec 2026 01:56:19 -0800 (PST) Received: from kordpc.lan ([2a13:e746:396c:c600::8f9]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c513afdee82sm1186142766b.66.2026.12.02.01.56.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 01:56:18 -0800 (PST) From: Kordian Chmielewski To: netdev@vger.kernel.org Cc: Florian Fainelli , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , bcm-kernel-feedback-list@broadcom.com, Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-kernel@vger.kernel.org Subject: [PATCH net 0/2] net: bcm4908_enet: RX buffer fixes Date: Wed, 2 Dec 2026 10:56:09 +0100 Message-ID: <20261202095611.156840-1-kudzo51@gmail.com> X-Mailer: git-send-email 2.56.1 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-Transfer-Encoding: 8bit Two follow-ups to the TX ring series that is now in net [1]. Both are about RX buffers, and Sashiko's reviews of that series pointed out both. Patch 1 keeps the old buffer in its slot when the RX refill fails, so that a failed allocation drops one frame instead of leaving the slot without a buffer. Patch 2 makes stop() leave the RX buffers to the DMA when the RX channel does not stop in time, as that series did for the TX buffers. It also waits for the channel with read_poll_timeout(), because the 2 ms deadline in jiffies can pass after a single read at HZ=100 or 250. Tested on an Archer AX6000 with OpenWrt and Linux 6.18.55, with the LAN going through this driver, whose code differs from net with this series only in one tree-wide change, two test-only module parameters and two comments. TX and RX ran at line rate (941 Mbit/s TCP). With every 50th RX buffer allocation made to fail, RX averaged 787 Mbit/s over 30 s and dropped 41579 of 2079029 frames (2.0%), with no errors in the counters or in the kernel log. With the RX stop made to report a timeout after the channel had stopped, each of 45 down/up cycles of the conduit logged the "Timeout waiting for DMA RX stop" warning once. Five of them were made while the router was receiving at line rate, and RX came back after each. 45 cycles without that parameter did not log it. I have not seen the RX channel time out for real, and the parameter does not make the DMA keep writing. Fixes for some other points from those reviews will follow separately: open() ignores a failure to fill the RX ring and calls napi_alloc_frag() outside NAPI, the driver does not work without its optional TX interrupt, and a TX completion can still be missed. [1] https://lore.kernel.org/netdev/20261113235847.517308-1-kudzo51@gmail.com/ Kordian Chmielewski (2): net: bcm4908_enet: keep the RX buffer when the refill fails net: bcm4908_enet: keep the RX buffers when the RX channel does not stop drivers/net/ethernet/broadcom/bcm4908_enet.c | 114 +++++++++++++------ 1 file changed, 81 insertions(+), 33 deletions(-) base-commit: 4d67cf2fd2352f130c42494a933ba9158b925c65 -- 2.56.1