From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.218.50 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796205381; b=X1ogKmyUFjTOn/jplvt51GqZG0CP23GdG63CR1SSFMsdoZ1W0lx1uIqJ6fv86Z9nEkvr E/gpJBihe65WD97rC163lGxQHpcAVGOUEVD0GyX88MFE6Uj5JzNBb7niI3JWzaIQaakCR UggRKh7sQBrugMn4a0f1XBHTH0Sn72TNLm1GfWO97Hi6cJQ2mRyox6Kv4LDeXa9b5NVzl IBGy3mD+Oi7H4uKNYKAXPjOd8w/+SqoMAQpUK8QM9uZE582VQrShcR1+kwpjsjL2T70+H tx4zO8ECMWlwBbGbmcoXbk/+9ey2DkTuVykCQ5gsc3hR6repVOoTtly66tPEu/lrfiA== 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-Forwarded-Encrypted: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=KObaLOBnJYfidpU/re9CfJhI5YsM+2hhl3kxSh6Eg09ms0jvLaSPMY9229ztMUf+L37V AR4v26lBatpFXfySw/rlGfnjQOHruChTDzvFE1gRkOHbrPfWAuCcbPkDX7zrHlsKGR/ex x3RlzqZ9R/O3LEyhbVel7+RYr0ExbMrbtA15CsD+jaZdZpFb/B6LLY+HqFjPyEYBv0SnZ RmUzo8oCBfbTzZ5EjxNBsr9IN1hGYDNIOorN4ZW7DMGszSgic5pFswftU+dL3bVIhsTiU 7eaVyR/hF43lwhlRZF0taEQX1EPM8mOTh5hF2Jp95K2SWz80CkXTdV2jjLcZTfPq8kw== 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.50 Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) (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 C92DD606A322 for ; Wed, 2 Dec 2026 09:56:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C92DD606A322 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-f50.google.com with SMTP id a640c23a62f3a-c4d28f75d62so2163191066b.0 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=FV98zfftHfet/RQ1HxPpbJtqXhkmd/jecqFm4vU56uDJ3D9JM9j6Fzkd4KQ9GSsqnQ Nh4wfwhNCcVkLxfQu8HHwT8UIuE66KbeziIOKD7tOdFyisn0hMc61psH14CaO7Cle13K zH+w1kgXDMTFxZ32fRHjy2CaAQInLAaaLbfZhQGtQBk6NJsFbEFDNv27ntZP4uDlvix+ v6pHorozUEzcXyC9kSSdWUzm2T3s1Yv9oYhcx00Wrta5lThgPUpYRI4e7noZrhzgcrz6 Jw1rxMMpp/Nh8CM077OzxuD8MjnvoxL91ORHTl07NANHque5mg63bZ8Ay9zziB9mIhXP UZow== X-Forwarded-Encrypted: i=1; AL+hErEFPluAxKD/MlboOKLJbW48d2btC5Abb5K0ocBLttOre/qoKfeDlstEubnjP3iaiAbhCrHZyH1pRuLu7ac=@vger.kernel.org X-Gm-Message-State: APuU4Z+lN1NDhnyBtGyLR2pPvYTSXhE9YdY6HIfRfuJZC0zIrYN1mcp5 ss5Y5x4tMHDk7OlU37FUUIPD3LC2z1JZtfRGGy53mTg+1+eBMo3OMmUw X-Gm-Gg: AZFdTZfLLOCQBNS8spGQAXvdmoIi1quo09P+p5aEsfF+EQgTYfhfdPs1+fMjs48GDJk A6NQeIQlLvK6wQEM2MyST6DQttY9m5aKTGbqQbG6+aj9HJN5cJwKd4aHXZaGSyv26P70yO1d93n fSUrNzqdomFdq1ZwR9he6TGCdlT0tJsuxJl8Pmnw2ZpKhYMHpfiTE+vl4KzoJRjC+Dc42KP2sMr 7z6ao08+GrO4lMweHTRZHFQpvdPRm5N8cSyp7Oomr3FQolfx2/Zf46FaHUcrYPm97dAuhgwXeqr AdDu3HM7lH4sZ/kA2H16fSuY/nPjrySWBm+Ro4bpdvYy9hC0EdYfmwddSCtxo7FLsMN796F7yko 3r/QWBJQWm19zlW8zqBkmYLtbcmIR73Fg12yetaDDuxS6B1+ZpcvkXgMoffTeiBJVXKufODA+OQ 7MeIm8ocS6woq9P5dyGWSwhVuLS4UflwrV9BWfIspEnAsskWDUdserJxRWZHWo3+QrqDQeG2AB+ UcH2kyK/Z2BiMZB5Q+dnQ0pVv3Qaf/3Afdqroj1LkF4IboePXq+fid49WWwo50ra9B+4FzTBaW9 YsaYsBk5aekdXxA2IKzQ6MZt28VjKXHO7DW83B3K 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: linux-kernel@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