From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3051138BF7F for ; Sat, 25 Apr 2026 22:49:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777157390; cv=none; b=YThVcawC0y4py1b2rZSL2+w+JvT8pwJcDQc8L5ONg8nK3CadVJvLXdwObXwvtgOqXdCawECDwhwVqku4akmffwZsmi5xvO+IY23alP9shETYInRBZsa8MjYx5P7GeseSlntDyALdrX+fa8llDcUwDMeV9p0IHR0nM8G7yGUwTf8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777157390; c=relaxed/simple; bh=NlJmQ99Eo2O4AE5jLnxX5tS8FjtsFDwC/kEMUdhH/to=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=nknmmRyj25LKuwdEjAJRcB66tmFlAYTFA7OGEw/DL8fQzW0bXjSyHBo8xr6wrQMBQbNtyyFUi/ZB+jbXLAylRrgSeSlsSJ1Uzy3D2QmJ52ybqGRYD4516AaRr7UvGUWfbqv6F3+jnWK9Og/MvqM63FXawACcCakpu9YtcZZ9Rls= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=njUgew/0; arc=none smtp.client-ip=209.85.128.50 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.b="njUgew/0" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-488af96f6b2so116673525e9.0 for ; Sat, 25 Apr 2026 15:49:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777157387; x=1777762187; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=ylk6+welFEnDY94rahWQ7HvD0zJjqoxic/dx4PIJEZs=; b=njUgew/0gxIhEm89BpgDShxUIrYjheWBreT15WL/ta4TQe9um/zz0ZtYGzkOXNxm5L IwkT1qUE20boc9rhEXE2Q1JIYGA+bHOOnxG32g10Ja2QKPOEBNLihH5/v1T7MB07D+qZ Z5HmMYKDNZY9yD+88fMS6lJJkmFqefQJbuEBJXtWgYMbqFhtTmPxYHvF4LLthOu7wfnm Bvc2tfZdZmI0v3kBi2PIDuZcUCZab2pjrmWTkndhG0ATKze0s/1iggcM0FvR6PKPleGc MhHmVkmkkTZS2OnhlgS1PFl1WEkmN3bVyR9q7u0O6WvVL6b2NV72boLReMg8Aza6VXwf kQkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777157387; x=1777762187; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ylk6+welFEnDY94rahWQ7HvD0zJjqoxic/dx4PIJEZs=; b=VAy4Z9lHPXN9n3pMWgRGR19xZzH9jh+IsKqLyIbp8+XiAHRl7Z5Tjd2LFjMauUP9B9 wImdWpnLlxdWA08vlyAidahqRbZ6wJmpb4Ns5LXXsDx7AzxOE+bb5nYfEH4NEpK2g6TF RdB+ayNiGM1yaIRI2epnvNCa4275KW6NdcC4CzQHHdmsOFc5oMInUKYvSnkOSxuV0nau PA9oREHQnPD0yPDINSA5e9pyUtcCMkEPHfbNzRTz7YQWZ803IdSxRJz2/QpsnUMVO0fo tboeHElA6ysBcTVr7rAFCxRCwtw2NJHD4u19k4SdIYRMNr+AFJ2ysKoT+U20NQnIDhcr 825w== X-Forwarded-Encrypted: i=1; AFNElJ+bpJmfBcQOTK0cr/9xf4N13QLjALohMvWa6AaYvC4E0I0KV8v8Dq/jtYm3HRr3wxm8MXtPEpRAhs7Iips=@vger.kernel.org X-Gm-Message-State: AOJu0Yxj2O06LRDMOXLWw5X8BkRYxWM7yh/fz1CD1qcF6s58WFGGyhFg zvGFP70ZiCoBMKLuZ9Zozp3ChTgTwECJgruMzwUhz2XXJJYt0WYgiD2z X-Gm-Gg: AeBDietFEo2l4tgeHy+HKHeDXPe+qpVZi5v3bH/sxF6SmLKeO0sXUE/4APTcKMm/eTA XNo9cNAmXNgBb77ubsniCNMDFBVbHCH2ZWYW64LYbZ1zvceq+6AQ81zgY58i/CJBu/TJ2AoqTrs AdS6ufiGtxPdr5fSe3fhgK0a8MbEqJojufxrw7T7vKlAqRrdSKdUVr3ceUqMcNX9Se12siYNUhs mYfKkH6N+KYQcFnNbF2Cz57EPW17PnHe6TR8NoAZdQK+YiKefeBMy4iWsGEBIKBxILm4/+39Wab 6B6gWbkDIvU9kO1z/3exE+zlStY55DW5ayK7B5NksociKHF631beAs9zSWADsFoxxHPan4wwf1b eczYGm+RGD6w7KSg7vdEAMGc1N1k/XM8wrxyMg3SOLXKRNLl7XnVKK1dO5iyx45fW3rsVzR5ZpB WeZfRoMG5Z54wJ5S7XGD+y13UPfCeqCX203w37JY3kgZBHC4D6tsgyzlH/RlzvQqPWzDtHGaNRN 5mznFrH7ev6cMXERtjtUmhN4r9vGGGADlqQSUBJwZ1Jhyg5PScZ6FtXlpSUGulYFZDyJ34hHu4W X-Received: by 2002:a05:600c:8717:b0:48a:568f:ae6d with SMTP id 5b1f17b1804b1-48a568faffemr311297045e9.8.1777157387464; Sat, 25 Apr 2026 15:49:47 -0700 (PDT) Received: from ?IPV6:2003:ea:8f34:b800:6020:70f3:48c1:ca3e? (p200300ea8f34b800602070f348c1ca3e.dip0.t-ipconnect.de. [2003:ea:8f34:b800:6020:70f3:48c1:ca3e]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488fb754842sm210753475e9.8.2026.04.25.15.49.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 25 Apr 2026 15:49:47 -0700 (PDT) Message-ID: <39a35232-479f-4390-9957-dbafc3f3c468@gmail.com> Date: Sun, 26 Apr 2026 00:49:46 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Heiner Kallweit Subject: Re: [RFC Patch net-next v1 0/9] r8169: add RSS support for RTL8127 To: javen , nic_swsd@realtek.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260420021957.1756-1-javen_xu@realsil.com.cn> Content-Language: en-US In-Reply-To: <20260420021957.1756-1-javen_xu@realsil.com.cn> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 20.04.2026 04:19, javen wrote: > From: Javen Xu > > This series patch adds RSS support for RTL8127 in the r8169 driver. > > Currently, without RSS support, a single CPU core handles all incoming > traffic. Under heavy loads, this single core becomes a bottleneck, causing > high softirq usage and leading to unstable and degraded network throughput. > > As a result, we add rss support for RTL8127. This RFC patch is just for > discussing. And we do some experiments on AMD platform. Below is the > result. > > Platform: AMD Ryzen Embedded R2514 with Radeon Graphics(4 Cores/8 Threads) An older embedded CPU (AFAICS from 2019, refreshed in 2022) in reality is unlikely to be used with sustained 10GBit traffic. It would be too weak to handle userspace apps making use of this high throughput. This hw edge case IMO isn't really an argument for adding 1.000 LoC, blowing up driver structs, and adding the complexity of dealing with a register layout changing every two chip versions. It's really a problem that Realtek frequently changes register layout and/or register semantics in a not backward-compatible way (and doesn't provide documentation), resulting in ugly versioned stuff like the following. IMR_V2_SET_REG_8125 = 0x0d0c, IMR_V2_CLEAR_REG_8125 = 0x0d00, IMR_V4_L2_CLEAR_REG_8125 = 0x0d10, ISR_V2_8125 = 0x0d04, ISR_V4_L2_8125 = 0x0d14, case RTL_GIGA_MAC_VER_80: tp->HwSuppIsrVer = 6; default: tp->HwSuppIsrVer = 1; This messy hw design makes it hard to develop maintainable drivers. This is underlined by the fact that Realtek has separate r8125, r8126, r8127 drivers, even though they share most of the code. > Arch: x86_64 > Test command: > Server: iperf3 -s > Client: iperf3 -c 192.168.2.1 -P 20 -t 3600 > Monitor: mpstat -P ALL 1 > > Before this patch (Without RSS): > Throughput: Unstable, fluctuating between 3.76 Gbits/sec and > 8.2 Gbits/sec. > CPU Usage: A single CPU core is fully occupied with softirq reaching > up to 96%. > > After this patch (With RSS enabled): > Throughput: Stable at 9.42 Gbits/sec. > CPU Usage: The traffic load is evenly distributed across multiple CPU > cores. The maximum softirq on a single core dropped to 63%. > > Patch summary: > Patch 1: Adds necessary macro and register definitions for RSS. > Patch 2-4: Support NAPI and multi RX/TX queues. Driver supports NAPI already. > Patch 5-6: Support MSI-X and enables it specifically for RTL8127. Also MSI-X is used already. > Patch 7: Enables RSS for RTL8127. > Patch 8-9: Adds ethtool support to configure the number of RX queues. > > Javen Xu (9): > r8169: add some register definitions > r8169: add napi and irq support > r8169: add support for multi tx queues > r8169: add support for multi rx queues > r8169: add support for msix > r8169: enable msix for RTL8127 > r8169: add support and enable rss > r8169: move struct ethtool_ops > r8169: add support for ethtool > > drivers/net/ethernet/realtek/r8169_main.c | 1437 ++++++++++++++++++--- > 1 file changed, 1238 insertions(+), 199 deletions(-) > Series includes functions like rtl8169_desc_quirk() indicating a need to work around hw errata. Would be helpful to add comments describing the hw erratum, best with a link to documentation.