Linux-RISC-V Archive on lore.kernel.org
 help / Atom feed
* Ethernet performance issue on HiFive Unleashed with kernel 4.20
@ 2019-01-11 12:12 Jan Vrany
  2019-01-11 13:15 ` Andreas Schwab
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Vrany @ 2019-01-11 12:12 UTC (permalink / raw)
  To: linux-riscv; +Cc: Boris Shingarov

Hi, 

I'm trying to get Linux 4.20 on HiFive Unleashed working. With some patches
it does boot and runs Debian, however the ethernet is slow and unstable. 
ing shows ~20% packet loss when Unleashed is connected directly to my laptop 
ethernet port. With 4.15 kernel I have no issues: Also RTT time is several orders 
of magnitude higher than when runnin 4.15.

Following is ping output for 4.20:

    ...
    64 bytes from 10.42.0.136: icmp_seq=15 ttl=64 time=986 ms
    64 bytes from 10.42.0.136: icmp_seq=16 ttl=64 time=1920 ms
    64 bytes from 10.42.0.136: icmp_seq=17 ttl=64 time=1000 ms
    ^C
    --- 10.42.0.136 ping statistics ---
    18 packets transmitted, 15 received, 16.6667% packet loss, time 165ms
    rtt min/avg/max/mdev = 287.276/1249.659/2292.006/550.116 ms, pipe 3

If I take interface down manually (after being brought up by DHCP during 
Debian boot) and then bring it up again, it stop working completely
(cannot ping it anymore). This makes it practically unusable 

For comparison, following is taken when running 4.15:

    ...
    64 bytes from 10.42.0.136: icmp_seq=7 ttl=64 time=0.145 ms
    64 bytes from 10.42.0.136: icmp_seq=8 ttl=64 time=0.171 ms
    64 bytes from 10.42.0.136: icmp_seq=9 ttl=64 time=0.155 ms
    ^C
    --- 10.42.0.136 ping statistics ---
    9 packets transmitted, 9 received, 0% packet loss, time 202ms
    rtt min/avg/max/mdev = 0.108/0.140/0.172/0.028 ms

The sources I'm using are here: 
https://github.com/janvrany/riscv-linux/tree/users/jv/riscv-linux-4.20
config is here: 
https://gist.github.com/janvrany/a44b955eff75453ffb7aac524a5b7fc8

Is it known issue? Does anyone have working linux 4.20 running on 
Unleashed? I'd appreciate any hints how to fix this.

Best, 

Jan


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: Ethernet performance issue on HiFive Unleashed with kernel 4.20
  2019-01-11 12:12 Ethernet performance issue on HiFive Unleashed with kernel 4.20 Jan Vrany
@ 2019-01-11 13:15 ` Andreas Schwab
  2019-01-13 23:03   ` Jan Vrany
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Schwab @ 2019-01-11 13:15 UTC (permalink / raw)
  To: Jan Vrany; +Cc: linux-riscv, Boris Shingarov

On Jan 11 2019, Jan Vrany <jan.vrany@fit.cvut.cz> wrote:

> The sources I'm using are here: 
> https://github.com/janvrany/riscv-linux/tree/users/jv/riscv-linux-4.20

I'm using essentially the same patches, but there is no issue with
networking.

https://github.com/andreas-schwab/linux/commits/master

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: Ethernet performance issue on HiFive Unleashed with kernel 4.20
  2019-01-11 13:15 ` Andreas Schwab
@ 2019-01-13 23:03   ` Jan Vrany
       [not found]     ` <878szneeao.fsf@igel.home>
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Vrany @ 2019-01-13 23:03 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: linux-riscv, Boris Shingarov

On Fri, 2019-01-11 at 14:15 +0100, Andreas Schwab wrote:
> On Jan 11 2019, Jan Vrany <jan.vrany@fit.cvut.cz> wrote:
> 
> > The sources I'm using are here: 
> > https://github.com/janvrany/riscv-linux/tree/users/jv/riscv-linux-4.20
> 
> I'm using essentially the same patches, but there is no issue with
> networking.
> 
> https://github.com/andreas-schwab/linux/commits/master
> 

Thanks! I compiled your very version (8d1cfe95) with my config
and the problem is still there. Could you please send me your 
config? Perhaps I'm missing some option or something like that.

Jan

> Andreas.
> 


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: Ethernet performance issue on HiFive Unleashed with kernel 4.20
       [not found]     ` <878szneeao.fsf@igel.home>
@ 2019-01-15  9:20       ` Jan Vrany
  2019-01-15 19:57         ` Andreas Schwab
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Vrany @ 2019-01-15  9:20 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: linux-riscv, Boris Shingarov

On Mon, 2019-01-14 at 11:14 +0100, Andreas Schwab wrote:
> I have already moved to 5.0-rc1, so here is the updated config.
> 

Thabks a lot! 

I think I found the problem.. The issue  was that RX/TX rings were
for some reason too small: 

root@unleashed:~# ethtool -g eth0
Ring parameters for eth0:
Pre-set maximums:
RX:             8192
RX Mini:        0
RX Jumbo:       0
TX:             4096
Current hardware settings:
RX:             512
RX Mini:        0
RX Jumbo:       0
TX:             512

Setting them to max before bringing the interface up
seem to solve the problem:

ethtool -G eth0 rx 8192
ethtool -G eth0 tx 4096

Thanks for your help! 

Jan


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: Ethernet performance issue on HiFive Unleashed with kernel 4.20
  2019-01-15  9:20       ` Jan Vrany
@ 2019-01-15 19:57         ` Andreas Schwab
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Schwab @ 2019-01-15 19:57 UTC (permalink / raw)
  To: Jan Vrany; +Cc: linux-riscv, Boris Shingarov

On Jan 15 2019, Jan Vrany <jan.vrany@fit.cvut.cz> wrote:

> Setting them to max before bringing the interface up
> seem to solve the problem:
>
> ethtool -G eth0 rx 8192
> ethtool -G eth0 tx 4096

It works for me without that adjustments.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-11 12:12 Ethernet performance issue on HiFive Unleashed with kernel 4.20 Jan Vrany
2019-01-11 13:15 ` Andreas Schwab
2019-01-13 23:03   ` Jan Vrany
     [not found]     ` <878szneeao.fsf@igel.home>
2019-01-15  9:20       ` Jan Vrany
2019-01-15 19:57         ` Andreas Schwab

Linux-RISC-V Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-riscv/0 linux-riscv/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-riscv linux-riscv/ https://lore.kernel.org/linux-riscv \
		linux-riscv@lists.infradead.org infradead-linux-riscv@archiver.kernel.org
	public-inbox-index linux-riscv


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-riscv


AGPL code for this site: git clone https://public-inbox.org/ public-inbox