devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [-next v1 0/1] Fix StarFive JH7110 gmac TCP RX speed issue
@ 2023-08-10  7:46 Samin Guo
  2023-08-10  7:46 ` [-next v1 1/1] riscv: dts: starfive: jh7110: Fix GMAC configuration Samin Guo
  2023-08-10 15:37 ` [-next v1 0/1] Fix StarFive JH7110 gmac TCP RX speed issue Conor Dooley
  0 siblings, 2 replies; 8+ messages in thread
From: Samin Guo @ 2023-08-10  7:46 UTC (permalink / raw)
  To: linux-kernel, linux-riscv, devicetree
  Cc: Emil Renner Berthing, Emil Renner Berthing, Conor Dooley,
	Rob Herring, Krzysztof Kozlowski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Samin Guo, Hal Feng

This patch fixes the StarFive JH7110 gmac TCP RX slow issue. And it has been
tested on VisionFive 2.

Here is the result of the test (iperf3):

  Before:
      # iperf3 -s
      -----------------------------------------------------------
      Server listening on 5201 (test #1)
      -----------------------------------------------------------
      Accepted connection from 192.168.1.4, port 47604
      [  5] local 192.168.1.3 port 5201 connected to 192.168.1.4 port 47612
      [ ID] Interval           Transfer     Bitrate
      [  5]   0.00-1.00   sec  36.3 MBytes   305 Mbits/sec
      [  5]   1.00-2.00   sec  35.6 MBytes   299 Mbits/sec
      [  5]   2.00-3.00   sec  36.5 MBytes   306 Mbits/sec
      [  5]   3.00-4.00   sec  36.5 MBytes   306 Mbits/sec
      [  5]   4.00-5.00   sec  35.7 MBytes   300 Mbits/sec
      [  5]   5.00-6.00   sec  35.4 MBytes   297 Mbits/sec
      [  5]   6.00-7.00   sec  37.1 MBytes   311 Mbits/sec
      [  5]   7.00-8.00   sec  35.6 MBytes   298 Mbits/sec
      [  5]   8.00-9.00   sec  36.4 MBytes   305 Mbits/sec
      [  5]   9.00-10.00  sec  36.3 MBytes   304 Mbits/sec
      - - - - - - - - - - - - - - - - - - - - - - - - -
      [ ID] Interval           Transfer     Bitrate
      [  5]   0.00-10.00  sec   361 MBytes   303 Mbits/sec        receiver

  After:
      # iperf3 -s
      -----------------------------------------------------------
      Server listening on 5201 (test #1)
      -----------------------------------------------------------
      Accepted connection from 192.168.1.4, port 47710
      [  5] local 192.168.1.3 port 5201 connected to 192.168.1.4 port 47720
      [ ID] Interval           Transfer     Bitrate
      [  5]   0.00-1.00   sec   111 MBytes   932 Mbits/sec
      [  5]   1.00-2.00   sec   111 MBytes   934 Mbits/sec
      [  5]   2.00-3.00   sec   111 MBytes   934 Mbits/sec
      [  5]   3.00-4.00   sec   111 MBytes   934 Mbits/sec
      [  5]   4.00-5.00   sec   111 MBytes   934 Mbits/sec
      [  5]   5.00-6.00   sec   111 MBytes   935 Mbits/sec
      [  5]   6.00-7.00   sec   111 MBytes   934 Mbits/sec
      [  5]   7.00-8.00   sec   111 MBytes   935 Mbits/sec
      [  5]   8.00-9.00   sec   111 MBytes   934 Mbits/sec
      [  5]   9.00-10.00  sec   111 MBytes   934 Mbits/sec
      [  5]  10.00-10.00  sec   167 KBytes   933 Mbits/sec
      - - - - - - - - - - - - - - - - - - - - - - - - -
      [ ID] Interval           Transfer     Bitrate
      [  5]   0.00-10.00  sec  1.09 GBytes   934 Mbits/sec        receiver


For more information and support, you can visit RVspace wiki[1].

[1]: https://wiki.rvspace.org/

Samin Guo (1):
  riscv: starfive: jh7110: Fix GMAC configuration

 arch/riscv/boot/dts/starfive/jh7110.dtsi | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--
2.17.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [-next v1 1/1] riscv: dts: starfive: jh7110: Fix GMAC configuration
  2023-08-10  7:46 [-next v1 0/1] Fix StarFive JH7110 gmac TCP RX speed issue Samin Guo
@ 2023-08-10  7:46 ` Samin Guo
  2023-08-10 10:48   ` Conor Dooley
  2023-08-10 11:28   ` Emil Renner Berthing
  2023-08-10 15:37 ` [-next v1 0/1] Fix StarFive JH7110 gmac TCP RX speed issue Conor Dooley
  1 sibling, 2 replies; 8+ messages in thread
From: Samin Guo @ 2023-08-10  7:46 UTC (permalink / raw)
  To: linux-kernel, linux-riscv, devicetree
  Cc: Emil Renner Berthing, Emil Renner Berthing, Conor Dooley,
	Rob Herring, Krzysztof Kozlowski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Samin Guo, Hal Feng

Fixed configuration to improve the speed of TCP RX.

Before:
  # iperf3 -s
  -----------------------------------------------------------
  Server listening on 5201 (test #1)
  -----------------------------------------------------------
  Accepted connection from 192.168.1.4, port 47604
  [  5] local 192.168.1.3 port 5201 connected to 192.168.1.4 port 47612
  [ ID] Interval           Transfer     Bitrate
  [  5]   0.00-1.00   sec  36.3 MBytes   305 Mbits/sec
  [  5]   1.00-2.00   sec  35.6 MBytes   299 Mbits/sec
  [  5]   2.00-3.00   sec  36.5 MBytes   306 Mbits/sec
  [  5]   3.00-4.00   sec  36.5 MBytes   306 Mbits/sec
  [  5]   4.00-5.00   sec  35.7 MBytes   300 Mbits/sec
  [  5]   5.00-6.00   sec  35.4 MBytes   297 Mbits/sec
  [  5]   6.00-7.00   sec  37.1 MBytes   311 Mbits/sec
  [  5]   7.00-8.00   sec  35.6 MBytes   298 Mbits/sec
  [  5]   8.00-9.00   sec  36.4 MBytes   305 Mbits/sec
  [  5]   9.00-10.00  sec  36.3 MBytes   304 Mbits/sec
  - - - - - - - - - - - - - - - - - - - - - - - - -
  [ ID] Interval           Transfer     Bitrate
  [  5]   0.00-10.00  sec   361 MBytes   303 Mbits/sec        receiver

After:
  # iperf3 -s
  -----------------------------------------------------------
  Server listening on 5201 (test #1)
  -----------------------------------------------------------
  Accepted connection from 192.168.1.4, port 47710
  [  5] local 192.168.1.3 port 5201 connected to 192.168.1.4 port 47720
  [ ID] Interval           Transfer     Bitrate
  [  5]   0.00-1.00   sec   111 MBytes   932 Mbits/sec
  [  5]   1.00-2.00   sec   111 MBytes   934 Mbits/sec
  [  5]   2.00-3.00   sec   111 MBytes   934 Mbits/sec
  [  5]   3.00-4.00   sec   111 MBytes   934 Mbits/sec
  [  5]   4.00-5.00   sec   111 MBytes   934 Mbits/sec
  [  5]   5.00-6.00   sec   111 MBytes   935 Mbits/sec
  [  5]   6.00-7.00   sec   111 MBytes   934 Mbits/sec
  [  5]   7.00-8.00   sec   111 MBytes   935 Mbits/sec
  [  5]   8.00-9.00   sec   111 MBytes   934 Mbits/sec
  [  5]   9.00-10.00  sec   111 MBytes   934 Mbits/sec
  [  5]  10.00-10.00  sec   167 KBytes   933 Mbits/sec
  - - - - - - - - - - - - - - - - - - - - - - - - -
  [ ID] Interval           Transfer     Bitrate
  [  5]   0.00-10.00  sec  1.09 GBytes   934 Mbits/sec        receiver

Reviewed-by: Hal Feng <hal.feng@starfivetech.com>
Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
---
 arch/riscv/boot/dts/starfive/jh7110.dtsi | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi b/arch/riscv/boot/dts/starfive/jh7110.dtsi
index a608433200e8..76884cf373bf 100644
--- a/arch/riscv/boot/dts/starfive/jh7110.dtsi
+++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi
@@ -318,8 +318,8 @@

 	stmmac_axi_setup: stmmac-axi-config {
 		snps,lpi_en;
-		snps,wr_osr_lmt = <4>;
-		snps,rd_osr_lmt = <4>;
+		snps,wr_osr_lmt = <0xf>;
+		snps,rd_osr_lmt = <0xf>;
 		snps,blen = <256 128 64 32 0 0 0>;
 	};

@@ -839,7 +839,7 @@
 			rx-fifo-depth = <2048>;
 			tx-fifo-depth = <2048>;
 			snps,multicast-filter-bins = <64>;
-			snps,perfect-filter-entries = <8>;
+			snps,perfect-filter-entries = <256>;
 			snps,fixed-burst;
 			snps,no-pbl-x8;
 			snps,force_thresh_dma_mode;
@@ -870,7 +870,7 @@
 			rx-fifo-depth = <2048>;
 			tx-fifo-depth = <2048>;
 			snps,multicast-filter-bins = <64>;
-			snps,perfect-filter-entries = <8>;
+			snps,perfect-filter-entries = <256>;
 			snps,fixed-burst;
 			snps,no-pbl-x8;
 			snps,force_thresh_dma_mode;
--
2.17.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [-next v1 1/1] riscv: dts: starfive: jh7110: Fix GMAC configuration
  2023-08-10  7:46 ` [-next v1 1/1] riscv: dts: starfive: jh7110: Fix GMAC configuration Samin Guo
@ 2023-08-10 10:48   ` Conor Dooley
  2023-08-10 10:54     ` Guo Samin
  2023-08-10 11:28   ` Emil Renner Berthing
  1 sibling, 1 reply; 8+ messages in thread
From: Conor Dooley @ 2023-08-10 10:48 UTC (permalink / raw)
  To: Samin Guo
  Cc: linux-kernel, linux-riscv, devicetree, Emil Renner Berthing,
	Emil Renner Berthing, Conor Dooley, Rob Herring,
	Krzysztof Kozlowski, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Hal Feng

[-- Attachment #1: Type: text/plain, Size: 2670 bytes --]

On Thu, Aug 10, 2023 at 03:46:46PM +0800, Samin Guo wrote:
> Fixed configuration to improve the speed of TCP RX.
> 
> Before:
>   # iperf3 -s
>   -----------------------------------------------------------
>   Server listening on 5201 (test #1)
>   -----------------------------------------------------------
>   Accepted connection from 192.168.1.4, port 47604
>   [  5] local 192.168.1.3 port 5201 connected to 192.168.1.4 port 47612
>   [ ID] Interval           Transfer     Bitrate
>   [  5]   0.00-1.00   sec  36.3 MBytes   305 Mbits/sec
>   [  5]   1.00-2.00   sec  35.6 MBytes   299 Mbits/sec
>   [  5]   2.00-3.00   sec  36.5 MBytes   306 Mbits/sec
>   [  5]   3.00-4.00   sec  36.5 MBytes   306 Mbits/sec
>   [  5]   4.00-5.00   sec  35.7 MBytes   300 Mbits/sec
>   [  5]   5.00-6.00   sec  35.4 MBytes   297 Mbits/sec
>   [  5]   6.00-7.00   sec  37.1 MBytes   311 Mbits/sec
>   [  5]   7.00-8.00   sec  35.6 MBytes   298 Mbits/sec
>   [  5]   8.00-9.00   sec  36.4 MBytes   305 Mbits/sec
>   [  5]   9.00-10.00  sec  36.3 MBytes   304 Mbits/sec
>   - - - - - - - - - - - - - - - - - - - - - - - - -
>   [ ID] Interval           Transfer     Bitrate
>   [  5]   0.00-10.00  sec   361 MBytes   303 Mbits/sec        receiver
> 
> After:
>   # iperf3 -s
>   -----------------------------------------------------------
>   Server listening on 5201 (test #1)
>   -----------------------------------------------------------
>   Accepted connection from 192.168.1.4, port 47710
>   [  5] local 192.168.1.3 port 5201 connected to 192.168.1.4 port 47720
>   [ ID] Interval           Transfer     Bitrate
>   [  5]   0.00-1.00   sec   111 MBytes   932 Mbits/sec
>   [  5]   1.00-2.00   sec   111 MBytes   934 Mbits/sec
>   [  5]   2.00-3.00   sec   111 MBytes   934 Mbits/sec
>   [  5]   3.00-4.00   sec   111 MBytes   934 Mbits/sec
>   [  5]   4.00-5.00   sec   111 MBytes   934 Mbits/sec
>   [  5]   5.00-6.00   sec   111 MBytes   935 Mbits/sec
>   [  5]   6.00-7.00   sec   111 MBytes   934 Mbits/sec
>   [  5]   7.00-8.00   sec   111 MBytes   935 Mbits/sec
>   [  5]   8.00-9.00   sec   111 MBytes   934 Mbits/sec
>   [  5]   9.00-10.00  sec   111 MBytes   934 Mbits/sec
>   [  5]  10.00-10.00  sec   167 KBytes   933 Mbits/sec
>   - - - - - - - - - - - - - - - - - - - - - - - - -
>   [ ID] Interval           Transfer     Bitrate
>   [  5]   0.00-10.00  sec  1.09 GBytes   934 Mbits/sec        receiver
> 
> Reviewed-by: Hal Feng <hal.feng@starfivetech.com>
> Signed-off-by: Samin Guo <samin.guo@starfivetech.com>

This is
Fixes: 1ff166c97972 ("riscv: dts: starfive: jh7110: Add ethernet device nodes")
right?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [-next v1 1/1] riscv: dts: starfive: jh7110: Fix GMAC configuration
  2023-08-10 10:48   ` Conor Dooley
@ 2023-08-10 10:54     ` Guo Samin
  0 siblings, 0 replies; 8+ messages in thread
From: Guo Samin @ 2023-08-10 10:54 UTC (permalink / raw)
  To: Conor Dooley
  Cc: linux-kernel, linux-riscv, devicetree, Emil Renner Berthing,
	Emil Renner Berthing, Conor Dooley, Rob Herring,
	Krzysztof Kozlowski, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Hal Feng



on 2023/8/10 18:48:38, Conor Dooley wrote:
> On Thu, Aug 10, 2023 at 03:46:46PM +0800, Samin Guo wrote:
>> Fixed configuration to improve the speed of TCP RX.
>>
>> Before:
>>   # iperf3 -s
>>   -----------------------------------------------------------
>>   Server listening on 5201 (test #1)
>>   -----------------------------------------------------------
>>   Accepted connection from 192.168.1.4, port 47604
>>   [  5] local 192.168.1.3 port 5201 connected to 192.168.1.4 port 47612
>>   [ ID] Interval           Transfer     Bitrate
>>   [  5]   0.00-1.00   sec  36.3 MBytes   305 Mbits/sec
>>   [  5]   1.00-2.00   sec  35.6 MBytes   299 Mbits/sec
>>   [  5]   2.00-3.00   sec  36.5 MBytes   306 Mbits/sec
>>   [  5]   3.00-4.00   sec  36.5 MBytes   306 Mbits/sec
>>   [  5]   4.00-5.00   sec  35.7 MBytes   300 Mbits/sec
>>   [  5]   5.00-6.00   sec  35.4 MBytes   297 Mbits/sec
>>   [  5]   6.00-7.00   sec  37.1 MBytes   311 Mbits/sec
>>   [  5]   7.00-8.00   sec  35.6 MBytes   298 Mbits/sec
>>   [  5]   8.00-9.00   sec  36.4 MBytes   305 Mbits/sec
>>   [  5]   9.00-10.00  sec  36.3 MBytes   304 Mbits/sec
>>   - - - - - - - - - - - - - - - - - - - - - - - - -
>>   [ ID] Interval           Transfer     Bitrate
>>   [  5]   0.00-10.00  sec   361 MBytes   303 Mbits/sec        receiver
>>
>> After:
>>   # iperf3 -s
>>   -----------------------------------------------------------
>>   Server listening on 5201 (test #1)
>>   -----------------------------------------------------------
>>   Accepted connection from 192.168.1.4, port 47710
>>   [  5] local 192.168.1.3 port 5201 connected to 192.168.1.4 port 47720
>>   [ ID] Interval           Transfer     Bitrate
>>   [  5]   0.00-1.00   sec   111 MBytes   932 Mbits/sec
>>   [  5]   1.00-2.00   sec   111 MBytes   934 Mbits/sec
>>   [  5]   2.00-3.00   sec   111 MBytes   934 Mbits/sec
>>   [  5]   3.00-4.00   sec   111 MBytes   934 Mbits/sec
>>   [  5]   4.00-5.00   sec   111 MBytes   934 Mbits/sec
>>   [  5]   5.00-6.00   sec   111 MBytes   935 Mbits/sec
>>   [  5]   6.00-7.00   sec   111 MBytes   934 Mbits/sec
>>   [  5]   7.00-8.00   sec   111 MBytes   935 Mbits/sec
>>   [  5]   8.00-9.00   sec   111 MBytes   934 Mbits/sec
>>   [  5]   9.00-10.00  sec   111 MBytes   934 Mbits/sec
>>   [  5]  10.00-10.00  sec   167 KBytes   933 Mbits/sec
>>   - - - - - - - - - - - - - - - - - - - - - - - - -
>>   [ ID] Interval           Transfer     Bitrate
>>   [  5]   0.00-10.00  sec  1.09 GBytes   934 Mbits/sec        receiver
>>
>> Reviewed-by: Hal Feng <hal.feng@starfivetech.com>
>> Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
> 
> This is
> Fixes: 1ff166c97972 ("riscv: dts: starfive: jh7110: Add ethernet device nodes")
> right?

Hi Conor,

Yes. There is an issue with the configuration of the 1ff166c97972 that affects the speed of the GMAC TCP RX.

Best regards,
Samin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [-next v1 1/1] riscv: dts: starfive: jh7110: Fix GMAC configuration
  2023-08-10  7:46 ` [-next v1 1/1] riscv: dts: starfive: jh7110: Fix GMAC configuration Samin Guo
  2023-08-10 10:48   ` Conor Dooley
@ 2023-08-10 11:28   ` Emil Renner Berthing
  2023-08-11  1:38     ` Guo Samin
  1 sibling, 1 reply; 8+ messages in thread
From: Emil Renner Berthing @ 2023-08-10 11:28 UTC (permalink / raw)
  To: Samin Guo
  Cc: linux-kernel, linux-riscv, devicetree, Emil Renner Berthing,
	Conor Dooley, Rob Herring, Krzysztof Kozlowski, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Hal Feng

On Thu, 10 Aug 2023 at 09:46, Samin Guo <samin.guo@starfivetech.com> wrote:
>
> Fixed configuration to improve the speed of TCP RX.
>
> Before:
>   # iperf3 -s
>   -----------------------------------------------------------
>   Server listening on 5201 (test #1)
>   -----------------------------------------------------------
>   Accepted connection from 192.168.1.4, port 47604
>   [  5] local 192.168.1.3 port 5201 connected to 192.168.1.4 port 47612
>   [ ID] Interval           Transfer     Bitrate
>   [  5]   0.00-1.00   sec  36.3 MBytes   305 Mbits/sec
>   [  5]   1.00-2.00   sec  35.6 MBytes   299 Mbits/sec
>   [  5]   2.00-3.00   sec  36.5 MBytes   306 Mbits/sec
>   [  5]   3.00-4.00   sec  36.5 MBytes   306 Mbits/sec
>   [  5]   4.00-5.00   sec  35.7 MBytes   300 Mbits/sec
>   [  5]   5.00-6.00   sec  35.4 MBytes   297 Mbits/sec
>   [  5]   6.00-7.00   sec  37.1 MBytes   311 Mbits/sec
>   [  5]   7.00-8.00   sec  35.6 MBytes   298 Mbits/sec
>   [  5]   8.00-9.00   sec  36.4 MBytes   305 Mbits/sec
>   [  5]   9.00-10.00  sec  36.3 MBytes   304 Mbits/sec
>   - - - - - - - - - - - - - - - - - - - - - - - - -
>   [ ID] Interval           Transfer     Bitrate
>   [  5]   0.00-10.00  sec   361 MBytes   303 Mbits/sec        receiver
>
> After:
>   # iperf3 -s
>   -----------------------------------------------------------
>   Server listening on 5201 (test #1)
>   -----------------------------------------------------------
>   Accepted connection from 192.168.1.4, port 47710
>   [  5] local 192.168.1.3 port 5201 connected to 192.168.1.4 port 47720
>   [ ID] Interval           Transfer     Bitrate
>   [  5]   0.00-1.00   sec   111 MBytes   932 Mbits/sec
>   [  5]   1.00-2.00   sec   111 MBytes   934 Mbits/sec
>   [  5]   2.00-3.00   sec   111 MBytes   934 Mbits/sec
>   [  5]   3.00-4.00   sec   111 MBytes   934 Mbits/sec
>   [  5]   4.00-5.00   sec   111 MBytes   934 Mbits/sec
>   [  5]   5.00-6.00   sec   111 MBytes   935 Mbits/sec
>   [  5]   6.00-7.00   sec   111 MBytes   934 Mbits/sec
>   [  5]   7.00-8.00   sec   111 MBytes   935 Mbits/sec
>   [  5]   8.00-9.00   sec   111 MBytes   934 Mbits/sec
>   [  5]   9.00-10.00  sec   111 MBytes   934 Mbits/sec
>   [  5]  10.00-10.00  sec   167 KBytes   933 Mbits/sec
>   - - - - - - - - - - - - - - - - - - - - - - - - -
>   [ ID] Interval           Transfer     Bitrate
>   [  5]   0.00-10.00  sec  1.09 GBytes   934 Mbits/sec        receiver
>
> Reviewed-by: Hal Feng <hal.feng@starfivetech.com>
> Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
> ---
>  arch/riscv/boot/dts/starfive/jh7110.dtsi | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi b/arch/riscv/boot/dts/starfive/jh7110.dtsi
> index a608433200e8..76884cf373bf 100644
> --- a/arch/riscv/boot/dts/starfive/jh7110.dtsi
> +++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi
> @@ -318,8 +318,8 @@
>
>         stmmac_axi_setup: stmmac-axi-config {
>                 snps,lpi_en;
> -               snps,wr_osr_lmt = <4>;
> -               snps,rd_osr_lmt = <4>;
> +               snps,wr_osr_lmt = <0xf>;
> +               snps,rd_osr_lmt = <0xf>;

nit: this is a limit, so presumably counting things and not an address
or bitmask, so I'd prefer decimal numbers here, eg <15>.

It works fine either way, so
Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>

>                 snps,blen = <256 128 64 32 0 0 0>;
>         };
>
> @@ -839,7 +839,7 @@
>                         rx-fifo-depth = <2048>;
>                         tx-fifo-depth = <2048>;
>                         snps,multicast-filter-bins = <64>;
> -                       snps,perfect-filter-entries = <8>;
> +                       snps,perfect-filter-entries = <256>;
>                         snps,fixed-burst;
>                         snps,no-pbl-x8;
>                         snps,force_thresh_dma_mode;
> @@ -870,7 +870,7 @@
>                         rx-fifo-depth = <2048>;
>                         tx-fifo-depth = <2048>;
>                         snps,multicast-filter-bins = <64>;
> -                       snps,perfect-filter-entries = <8>;
> +                       snps,perfect-filter-entries = <256>;
>                         snps,fixed-burst;
>                         snps,no-pbl-x8;
>                         snps,force_thresh_dma_mode;
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [-next v1 0/1] Fix StarFive JH7110 gmac TCP RX speed issue
  2023-08-10  7:46 [-next v1 0/1] Fix StarFive JH7110 gmac TCP RX speed issue Samin Guo
  2023-08-10  7:46 ` [-next v1 1/1] riscv: dts: starfive: jh7110: Fix GMAC configuration Samin Guo
@ 2023-08-10 15:37 ` Conor Dooley
  2023-08-11  1:42   ` Guo Samin
  1 sibling, 1 reply; 8+ messages in thread
From: Conor Dooley @ 2023-08-10 15:37 UTC (permalink / raw)
  To: linux-kernel, linux-riscv, devicetree, Samin Guo
  Cc: conor, Conor Dooley, Emil Renner Berthing, Emil Renner Berthing,
	Rob Herring, Krzysztof Kozlowski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Hal Feng

From: Conor Dooley <conor.dooley@microchip.com>

On Thu, 10 Aug 2023 15:46:45 +0800, Samin Guo wrote:
> This patch fixes the StarFive JH7110 gmac TCP RX slow issue. And it has been
> tested on VisionFive 2.
> 
> Here is the result of the test (iperf3):
> 
>   Before:
>       # iperf3 -s
>       -----------------------------------------------------------
>       Server listening on 5201 (test #1)
>       -----------------------------------------------------------
>       Accepted connection from 192.168.1.4, port 47604
>       [  5] local 192.168.1.3 port 5201 connected to 192.168.1.4 port 47612
>       [ ID] Interval           Transfer     Bitrate
>       [  5]   0.00-1.00   sec  36.3 MBytes   305 Mbits/sec
>       [  5]   1.00-2.00   sec  35.6 MBytes   299 Mbits/sec
>       [  5]   2.00-3.00   sec  36.5 MBytes   306 Mbits/sec
>       [  5]   3.00-4.00   sec  36.5 MBytes   306 Mbits/sec
>       [  5]   4.00-5.00   sec  35.7 MBytes   300 Mbits/sec
>       [  5]   5.00-6.00   sec  35.4 MBytes   297 Mbits/sec
>       [  5]   6.00-7.00   sec  37.1 MBytes   311 Mbits/sec
>       [  5]   7.00-8.00   sec  35.6 MBytes   298 Mbits/sec
>       [  5]   8.00-9.00   sec  36.4 MBytes   305 Mbits/sec
>       [  5]   9.00-10.00  sec  36.3 MBytes   304 Mbits/sec
>       - - - - - - - - - - - - - - - - - - - - - - - - -
>       [ ID] Interval           Transfer     Bitrate
>       [  5]   0.00-10.00  sec   361 MBytes   303 Mbits/sec        receiver
> 
> [...]

Applied to riscv-dt-for-next with the conversion to decimal, thanks!

[1/1] riscv: dts: starfive: jh7110: Fix GMAC configuration
      https://git.kernel.org/conor/c/1273f7e96a70

Thanks,
Conor.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [-next v1 1/1] riscv: dts: starfive: jh7110: Fix GMAC configuration
  2023-08-10 11:28   ` Emil Renner Berthing
@ 2023-08-11  1:38     ` Guo Samin
  0 siblings, 0 replies; 8+ messages in thread
From: Guo Samin @ 2023-08-11  1:38 UTC (permalink / raw)
  To: Emil Renner Berthing
  Cc: linux-kernel, linux-riscv, devicetree, Emil Renner Berthing,
	Conor Dooley, Rob Herring, Krzysztof Kozlowski, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Hal Feng



On 2023/8/10 19:28:23, Emil Renner Berthing wrote:
> On Thu, 10 Aug 2023 at 09:46, Samin Guo <samin.guo@starfivetech.com> wrote:
>>
>> Fixed configuration to improve the speed of TCP RX.
>>
>> Before:
>>   # iperf3 -s
>>   -----------------------------------------------------------
>>   Server listening on 5201 (test #1)
>>   -----------------------------------------------------------
>>   Accepted connection from 192.168.1.4, port 47604
>>   [  5] local 192.168.1.3 port 5201 connected to 192.168.1.4 port 47612
>>   [ ID] Interval           Transfer     Bitrate
>>   [  5]   0.00-1.00   sec  36.3 MBytes   305 Mbits/sec
>>   [  5]   1.00-2.00   sec  35.6 MBytes   299 Mbits/sec
>>   [  5]   2.00-3.00   sec  36.5 MBytes   306 Mbits/sec
>>   [  5]   3.00-4.00   sec  36.5 MBytes   306 Mbits/sec
>>   [  5]   4.00-5.00   sec  35.7 MBytes   300 Mbits/sec
>>   [  5]   5.00-6.00   sec  35.4 MBytes   297 Mbits/sec
>>   [  5]   6.00-7.00   sec  37.1 MBytes   311 Mbits/sec
>>   [  5]   7.00-8.00   sec  35.6 MBytes   298 Mbits/sec
>>   [  5]   8.00-9.00   sec  36.4 MBytes   305 Mbits/sec
>>   [  5]   9.00-10.00  sec  36.3 MBytes   304 Mbits/sec
>>   - - - - - - - - - - - - - - - - - - - - - - - - -
>>   [ ID] Interval           Transfer     Bitrate
>>   [  5]   0.00-10.00  sec   361 MBytes   303 Mbits/sec        receiver
>>
>> After:
>>   # iperf3 -s
>>   -----------------------------------------------------------
>>   Server listening on 5201 (test #1)
>>   -----------------------------------------------------------
>>   Accepted connection from 192.168.1.4, port 47710
>>   [  5] local 192.168.1.3 port 5201 connected to 192.168.1.4 port 47720
>>   [ ID] Interval           Transfer     Bitrate
>>   [  5]   0.00-1.00   sec   111 MBytes   932 Mbits/sec
>>   [  5]   1.00-2.00   sec   111 MBytes   934 Mbits/sec
>>   [  5]   2.00-3.00   sec   111 MBytes   934 Mbits/sec
>>   [  5]   3.00-4.00   sec   111 MBytes   934 Mbits/sec
>>   [  5]   4.00-5.00   sec   111 MBytes   934 Mbits/sec
>>   [  5]   5.00-6.00   sec   111 MBytes   935 Mbits/sec
>>   [  5]   6.00-7.00   sec   111 MBytes   934 Mbits/sec
>>   [  5]   7.00-8.00   sec   111 MBytes   935 Mbits/sec
>>   [  5]   8.00-9.00   sec   111 MBytes   934 Mbits/sec
>>   [  5]   9.00-10.00  sec   111 MBytes   934 Mbits/sec
>>   [  5]  10.00-10.00  sec   167 KBytes   933 Mbits/sec
>>   - - - - - - - - - - - - - - - - - - - - - - - - -
>>   [ ID] Interval           Transfer     Bitrate
>>   [  5]   0.00-10.00  sec  1.09 GBytes   934 Mbits/sec        receiver
>>
>> Reviewed-by: Hal Feng <hal.feng@starfivetech.com>
>> Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
>> ---
>>  arch/riscv/boot/dts/starfive/jh7110.dtsi | 8 ++++----
>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi b/arch/riscv/boot/dts/starfive/jh7110.dtsi
>> index a608433200e8..76884cf373bf 100644
>> --- a/arch/riscv/boot/dts/starfive/jh7110.dtsi
>> +++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi
>> @@ -318,8 +318,8 @@
>>
>>         stmmac_axi_setup: stmmac-axi-config {
>>                 snps,lpi_en;
>> -               snps,wr_osr_lmt = <4>;
>> -               snps,rd_osr_lmt = <4>;
>> +               snps,wr_osr_lmt = <0xf>;
>> +               snps,rd_osr_lmt = <0xf>;
> 
> nit: this is a limit, so presumably counting things and not an address
> or bitmask, so I'd prefer decimal numbers here, eg <15>.
> 
> It works fine either way, so
> Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>

Thanks Esmil, that's right.
I refer to examples of snps,dwmac.yaml, so I use 0xf...

Best regards,
Samin
> 
>>                 snps,blen = <256 128 64 32 0 0 0>;
>>         };
>>
>> @@ -839,7 +839,7 @@
>>                         rx-fifo-depth = <2048>;
>>                         tx-fifo-depth = <2048>;
>>                         snps,multicast-filter-bins = <64>;
>> -                       snps,perfect-filter-entries = <8>;
>> +                       snps,perfect-filter-entries = <256>;
>>                         snps,fixed-burst;
>>                         snps,no-pbl-x8;
>>                         snps,force_thresh_dma_mode;
>> @@ -870,7 +870,7 @@
>>                         rx-fifo-depth = <2048>;
>>                         tx-fifo-depth = <2048>;
>>                         snps,multicast-filter-bins = <64>;
>> -                       snps,perfect-filter-entries = <8>;
>> +                       snps,perfect-filter-entries = <256>;
>>                         snps,fixed-burst;
>>                         snps,no-pbl-x8;
>>                         snps,force_thresh_dma_mode;
>> --
>> 2.17.1
>>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [-next v1 0/1] Fix StarFive JH7110 gmac TCP RX speed issue
  2023-08-10 15:37 ` [-next v1 0/1] Fix StarFive JH7110 gmac TCP RX speed issue Conor Dooley
@ 2023-08-11  1:42   ` Guo Samin
  0 siblings, 0 replies; 8+ messages in thread
From: Guo Samin @ 2023-08-11  1:42 UTC (permalink / raw)
  To: Conor Dooley, linux-kernel, linux-riscv, devicetree
  Cc: Conor Dooley, Emil Renner Berthing, Emil Renner Berthing,
	Rob Herring, Krzysztof Kozlowski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Hal Feng



On 2023/8/10 23:37:13, Conor Dooley wrote:
> From: Conor Dooley <conor.dooley@microchip.com>
> 
> On Thu, 10 Aug 2023 15:46:45 +0800, Samin Guo wrote:
>> This patch fixes the StarFive JH7110 gmac TCP RX slow issue. And it has been
>> tested on VisionFive 2.
>>
>> Here is the result of the test (iperf3):
>>
>>   Before:
>>       # iperf3 -s
>>       -----------------------------------------------------------
>>       Server listening on 5201 (test #1)
>>       -----------------------------------------------------------
>>       Accepted connection from 192.168.1.4, port 47604
>>       [  5] local 192.168.1.3 port 5201 connected to 192.168.1.4 port 47612
>>       [ ID] Interval           Transfer     Bitrate
>>       [  5]   0.00-1.00   sec  36.3 MBytes   305 Mbits/sec
>>       [  5]   1.00-2.00   sec  35.6 MBytes   299 Mbits/sec
>>       [  5]   2.00-3.00   sec  36.5 MBytes   306 Mbits/sec
>>       [  5]   3.00-4.00   sec  36.5 MBytes   306 Mbits/sec
>>       [  5]   4.00-5.00   sec  35.7 MBytes   300 Mbits/sec
>>       [  5]   5.00-6.00   sec  35.4 MBytes   297 Mbits/sec
>>       [  5]   6.00-7.00   sec  37.1 MBytes   311 Mbits/sec
>>       [  5]   7.00-8.00   sec  35.6 MBytes   298 Mbits/sec
>>       [  5]   8.00-9.00   sec  36.4 MBytes   305 Mbits/sec
>>       [  5]   9.00-10.00  sec  36.3 MBytes   304 Mbits/sec
>>       - - - - - - - - - - - - - - - - - - - - - - - - -
>>       [ ID] Interval           Transfer     Bitrate
>>       [  5]   0.00-10.00  sec   361 MBytes   303 Mbits/sec        receiver
>>
>> [...]
> 
> Applied to riscv-dt-for-next with the conversion to decimal, thanks!
> 
> [1/1] riscv: dts: starfive: jh7110: Fix GMAC configuration
>       https://git.kernel.org/conor/c/1273f7e96a70
> 
> Thanks,
> Conor.

Hi Conor,

Thank a lot for for merging into the next branch so promptly!
 
Best regards,
Samin

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-08-11  1:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-10  7:46 [-next v1 0/1] Fix StarFive JH7110 gmac TCP RX speed issue Samin Guo
2023-08-10  7:46 ` [-next v1 1/1] riscv: dts: starfive: jh7110: Fix GMAC configuration Samin Guo
2023-08-10 10:48   ` Conor Dooley
2023-08-10 10:54     ` Guo Samin
2023-08-10 11:28   ` Emil Renner Berthing
2023-08-11  1:38     ` Guo Samin
2023-08-10 15:37 ` [-next v1 0/1] Fix StarFive JH7110 gmac TCP RX speed issue Conor Dooley
2023-08-11  1:42   ` Guo Samin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).