[openwrt/openwrt] realtek: Increase maximum RX ring buffer length

LEDE Commits lede-commits at lists.infradead.org
Fri Oct 8 23:26:17 PDT 2021


blogic pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/2ab4d4029386849664d152949188c40590cfdd5f

commit 2ab4d4029386849664d152949188c40590cfdd5f
Author: Birger Koblitz <git at birger-koblitz.de>
AuthorDate: Sun Sep 5 20:22:59 2021 +0200

    realtek: Increase maximum RX ring buffer length
    
    Increase the maximum ring buffer length in order to improve
    performance on RTL839x devices.
    
    Signed-off-by: Birger Koblitz <git at birger-koblitz.de>
---
 .../linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c  | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c b/target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c
index 4711efbcdc..dfec2e55ee 100644
--- a/target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c
+++ b/target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c
@@ -30,11 +30,12 @@ extern struct rtl83xx_soc_info soc_info;
  * Maximum number of RX rings is 8 on RTL83XX and 32 on the 93XX
  * The ring is assigned by switch based on packet/port priortity
  * Maximum number of TX rings is 2, Ring 2 being the high priority
- * ring on the RTL93xx SoCs. MAX_RING_SIZE * RING_BUFFER gives
- * the memory used for the ring buffer.
+ * ring on the RTL93xx SoCs. MAX_RXLEN gives the maximum length
+ * for an RX ring, MAX_ENTRIES the maximum number of entries
+ * available in total for all queues.
  */
 #define MAX_RXRINGS	32
-#define MAX_RXLEN	100
+#define MAX_RXLEN	200
 #define MAX_ENTRIES	(200 * 8)
 #define TXRINGS		2
 #define TXRINGLEN	160
@@ -437,7 +438,7 @@ static irqreturn_t rtl83xx_net_irq(int irq, void *dev_id)
 
 	/* RX buffer overrun */
 	if (status & 0x000ff) {
-		pr_info("RX buffer overrun: status %x, mask: %x\n",
+		pr_debug("RX buffer overrun: status %x, mask: %x\n",
 			 status, sw_r32(priv->r->dma_if_intr_msk));
 		sw_w32(status, priv->r->dma_if_intr_sts);
 		rtl838x_rb_cleanup(priv, status & 0xff);



More information about the lede-commits mailing list