All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] net: ethernet: microchip: lan743x: Increase rx ring size to improve rx performance
@ 2021-10-28 15:03 Yuiko Oshino
  2021-10-28 15:13 ` Jakub Kicinski
  2021-10-28 16:03 ` Andrew Lunn
  0 siblings, 2 replies; 5+ messages in thread
From: Yuiko Oshino @ 2021-10-28 15:03 UTC (permalink / raw)
  To: davem, netdev; +Cc: bryan.whitehead, UNGLinuxDriver, Yuiko Oshino

Increase the rx ring size (LAN743X_RX_RING_SIZE) to improve rx performance on some platforms.
Tested on x86 PC with EVB-LAN7430.
The iperf3.7 TCPIP improved from 881 Mbps to 922 Mbps, and UDP improved from 817 Mbps to 936 Mbps.

Fixes: 23f0703c125b ("lan743x: Add main source files for new lan743x driver")
Signed-off-by: Yuiko Oshino <yuiko.oshino@microchip.com>
---
 drivers/net/ethernet/microchip/lan743x_main.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/microchip/lan743x_main.h b/drivers/net/ethernet/microchip/lan743x_main.h
index 34c22eea0124..aaf7aaeaba0c 100644
--- a/drivers/net/ethernet/microchip/lan743x_main.h
+++ b/drivers/net/ethernet/microchip/lan743x_main.h
@@ -831,7 +831,7 @@ struct lan743x_rx_buffer_info {
 	unsigned int    buffer_length;
 };
 
-#define LAN743X_RX_RING_SIZE        (65)
+#define LAN743X_RX_RING_SIZE        (128)
 
 #define RX_PROCESS_RESULT_NOTHING_TO_DO     (0)
 #define RX_PROCESS_RESULT_BUFFER_RECEIVED   (1)
-- 
2.25.1


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

* Re: [PATCH net] net: ethernet: microchip: lan743x: Increase rx ring size to improve rx performance
  2021-10-28 15:03 [PATCH net] net: ethernet: microchip: lan743x: Increase rx ring size to improve rx performance Yuiko Oshino
@ 2021-10-28 15:13 ` Jakub Kicinski
  2021-10-28 15:17   ` Yuiko.Oshino
  2021-10-28 16:03 ` Andrew Lunn
  1 sibling, 1 reply; 5+ messages in thread
From: Jakub Kicinski @ 2021-10-28 15:13 UTC (permalink / raw)
  To: Yuiko Oshino; +Cc: davem, netdev, bryan.whitehead, UNGLinuxDriver

On Thu, 28 Oct 2021 11:03:15 -0400 Yuiko Oshino wrote:
> Increase the rx ring size (LAN743X_RX_RING_SIZE) to improve rx performance on some platforms.
> Tested on x86 PC with EVB-LAN7430.
> The iperf3.7 TCPIP improved from 881 Mbps to 922 Mbps, and UDP improved from 817 Mbps to 936 Mbps.
> 
> Fixes: 23f0703c125b ("lan743x: Add main source files for new lan743x driver")
> Signed-off-by: Yuiko Oshino <yuiko.oshino@microchip.com>

You seem to be posting performance optimizations as fixes.
800Mbps is not "broken" for a 1G interface. Please remove 
the Fixes tag and re-post this with [PATCH net-next].

Thank you!

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

* RE: [PATCH net] net: ethernet: microchip: lan743x: Increase rx ring size to improve rx performance
  2021-10-28 15:13 ` Jakub Kicinski
@ 2021-10-28 15:17   ` Yuiko.Oshino
  0 siblings, 0 replies; 5+ messages in thread
From: Yuiko.Oshino @ 2021-10-28 15:17 UTC (permalink / raw)
  To: kuba; +Cc: davem, netdev, Bryan.Whitehead, UNGLinuxDriver

>-----Original Message-----
>From: Jakub Kicinski <kuba@kernel.org>
>Sent: Thursday, October 28, 2021 11:14 AM
>To: Yuiko Oshino - C18177 <Yuiko.Oshino@microchip.com>
>Cc: davem@davemloft.net; netdev@vger.kernel.org; Bryan Whitehead - C21958
><Bryan.Whitehead@microchip.com>; UNGLinuxDriver
><UNGLinuxDriver@microchip.com>
>Subject: Re: [PATCH net] net: ethernet: microchip: lan743x: Increase rx ring size
>to improve rx performance
>
>EXTERNAL EMAIL: Do not click links or open attachments unless you know the
>content is safe
>
>On Thu, 28 Oct 2021 11:03:15 -0400 Yuiko Oshino wrote:
>> Increase the rx ring size (LAN743X_RX_RING_SIZE) to improve rx performance
>on some platforms.
>> Tested on x86 PC with EVB-LAN7430.
>> The iperf3.7 TCPIP improved from 881 Mbps to 922 Mbps, and UDP improved
>from 817 Mbps to 936 Mbps.
>>
>> Fixes: 23f0703c125b ("lan743x: Add main source files for new lan743x
>> driver")
>> Signed-off-by: Yuiko Oshino <yuiko.oshino@microchip.com>
>
>You seem to be posting performance optimizations as fixes.
>800Mbps is not "broken" for a 1G interface. Please remove the Fixes tag and re-
>post this with [PATCH net-next].
>
>Thank you!

Hi Jakub,
no problem.
Thank you for your comment.
Yuiko

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

* Re: [PATCH net] net: ethernet: microchip: lan743x: Increase rx ring size to improve rx performance
  2021-10-28 15:03 [PATCH net] net: ethernet: microchip: lan743x: Increase rx ring size to improve rx performance Yuiko Oshino
  2021-10-28 15:13 ` Jakub Kicinski
@ 2021-10-28 16:03 ` Andrew Lunn
  2021-10-29 12:57   ` Yuiko.Oshino
  1 sibling, 1 reply; 5+ messages in thread
From: Andrew Lunn @ 2021-10-28 16:03 UTC (permalink / raw)
  To: Yuiko Oshino; +Cc: davem, netdev, bryan.whitehead, UNGLinuxDriver

On Thu, Oct 28, 2021 at 11:03:15AM -0400, Yuiko Oshino wrote:
> Increase the rx ring size (LAN743X_RX_RING_SIZE) to improve rx performance on some platforms.
> Tested on x86 PC with EVB-LAN7430.
> The iperf3.7 TCPIP improved from 881 Mbps to 922 Mbps, and UDP improved from 817 Mbps to 936 Mbps.
> 
> Fixes: 23f0703c125b ("lan743x: Add main source files for new lan743x driver")
> Signed-off-by: Yuiko Oshino <yuiko.oshino@microchip.com>
> ---
>  drivers/net/ethernet/microchip/lan743x_main.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/microchip/lan743x_main.h b/drivers/net/ethernet/microchip/lan743x_main.h
> index 34c22eea0124..aaf7aaeaba0c 100644
> --- a/drivers/net/ethernet/microchip/lan743x_main.h
> +++ b/drivers/net/ethernet/microchip/lan743x_main.h
> @@ -831,7 +831,7 @@ struct lan743x_rx_buffer_info {
>  	unsigned int    buffer_length;
>  };
>  
> -#define LAN743X_RX_RING_SIZE        (65)

65 is interesting. 2^N + 1. So there might be a reason for this?

> +#define LAN743X_RX_RING_SIZE        (128)

129?

	Andrew

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

* RE: [PATCH net] net: ethernet: microchip: lan743x: Increase rx ring size to improve rx performance
  2021-10-28 16:03 ` Andrew Lunn
@ 2021-10-29 12:57   ` Yuiko.Oshino
  0 siblings, 0 replies; 5+ messages in thread
From: Yuiko.Oshino @ 2021-10-29 12:57 UTC (permalink / raw)
  To: andrew; +Cc: davem, netdev, Bryan.Whitehead, UNGLinuxDriver

>-----Original Message-----
>From: Andrew Lunn <andrew@lunn.ch>
>Sent: Thursday, October 28, 2021 12:03 PM
>To: Yuiko Oshino - C18177 <Yuiko.Oshino@microchip.com>
>Cc: davem@davemloft.net; netdev@vger.kernel.org; Bryan Whitehead - C21958
><Bryan.Whitehead@microchip.com>; UNGLinuxDriver
><UNGLinuxDriver@microchip.com>
>Subject: Re: [PATCH net] net: ethernet: microchip: lan743x: Increase rx ring size
>to improve rx performance
>
>EXTERNAL EMAIL: Do not click links or open attachments unless you know the
>content is safe
>
>On Thu, Oct 28, 2021 at 11:03:15AM -0400, Yuiko Oshino wrote:
>> Increase the rx ring size (LAN743X_RX_RING_SIZE) to improve rx performance
>on some platforms.
>> Tested on x86 PC with EVB-LAN7430.
>> The iperf3.7 TCPIP improved from 881 Mbps to 922 Mbps, and UDP improved
>from 817 Mbps to 936 Mbps.
>>
>> Fixes: 23f0703c125b ("lan743x: Add main source files for new lan743x driver")
>> Signed-off-by: Yuiko Oshino <yuiko.oshino@microchip.com>
>> ---
>>  drivers/net/ethernet/microchip/lan743x_main.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/ethernet/microchip/lan743x_main.h
>b/drivers/net/ethernet/microchip/lan743x_main.h
>> index 34c22eea0124..aaf7aaeaba0c 100644
>> --- a/drivers/net/ethernet/microchip/lan743x_main.h
>> +++ b/drivers/net/ethernet/microchip/lan743x_main.h
>> @@ -831,7 +831,7 @@ struct lan743x_rx_buffer_info {
>>       unsigned int    buffer_length;
>>  };
>>
>> -#define LAN743X_RX_RING_SIZE        (65)
>
>65 is interesting. 2^N + 1. So there might be a reason for this?

The original developer wanted to give the hardware a power of 2 usable (which is the ring size -1) number of descriptors, but that is not required by the hardware so for this update we decided to take it back to "rounder" power of 2 memory request from the OS.
>
>> +#define LAN743X_RX_RING_SIZE        (128)
>
>129?
>
>        Andrew

Thank you!
Yuiko

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

end of thread, other threads:[~2021-10-29 12:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-28 15:03 [PATCH net] net: ethernet: microchip: lan743x: Increase rx ring size to improve rx performance Yuiko Oshino
2021-10-28 15:13 ` Jakub Kicinski
2021-10-28 15:17   ` Yuiko.Oshino
2021-10-28 16:03 ` Andrew Lunn
2021-10-29 12:57   ` Yuiko.Oshino

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.