Tests:r-car-gen3-gigabit

This document describes how to test gigabit communication of R-Car Gen3 based boards.

= Environment =


 * Hardware:
 * Salvator-X/r8a7796 (Gen 3 R-Car H3 SoC)
 * Firmware:
 * v2.12.0
 * Kernel:
 * https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git topic/ravb-gigabit (v4.10-rc6 + EthernetAVB gigabit patches)
 * User-Space
 * Debian Jessie
 * netperf 2.6.0-2

= Other Environments =

The kernel listed above should also support gigabit transfer speeds using ES1.1 or greater of the r8a7795 (Gen 3 R-Car H3 SoC) SoC.


 * Salvator-X/r8a7795 ES1.1+ (Gen 3 R-Car H3 SoC)
 * h3ulcb/r8a7795 ES1.1+ (Gen 3 R-Car H3 SoC)

Note: Gigabit transfer speeds are not supported on ES1.0 of the r8a7795 SoC. On that SoC link negotiation will be limited to a maximum of 100Mbit.

The ES version may be checked at run-time using dmesg.

[   0.053085] Detected Renesas R-Car Gen3 r8a7795 ES1.0
 * 1) dmesg | grep ES

= Prepare Kernel =

The kernel was build using the defconfig.

$ ARCH=arm64 make defconfig $ ARCH=arm64 make

= Install Netperf =

Netperf should be installed on both the Salvator-X board and another host which will be used test communication with. The board and the host should be connected appropriate cables and switches to allow gigabit communication.

Netperf is available in the non-free section of Debian and may be insalled using the following apt-sources line.

deb http://ftp.debian.org/debian jessie main non-free

With the above in place, e.g. in /etc/apt/sources.list, netperf may be installed using apt-get.


 * 1) apt-get update
 * 2) apt-get install netperf

Start Netperf Daemon
On the host where netperf has been installed ensure that the daemon has been started.

● netperf.service - LSB: network benchmark Loaded: loaded (/etc/init.d/netperf) Active: active (running) since Tue 2017-01-17 09:06:20 CET; 4 weeks 0 days ago CGroup: /system.slice/netperf.service └─1044 /usr/bin/netserver
 * 1) systemctl start netperf.service
 * 2) systemctl status netperf.service

Jan 17 09:06:16 reginn netperf[1018]: Starting network benchmark server. Jan 17 09:06:20 reginn systemd[1]: Started LSB: network benchmark. Feb 14 10:25:48 reginn systemd[1]: Started LSB: network benchmark.

= Verify Gigabit Link =

Gigabit link negotiation may be confirmed by inspecting dmesg

[   4.796374] ravb e6800000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
 * 1) dmesg | grep ravb

Or by using ethtool:

Speed: 1000Mb/s
 * 1) apt-get install ethtool
 * 2) ethtool eth0 | grep Speed

= Test communication speed =

Netperf may be used to test communication speed between the Salvator-X board and another host with netperf installed.

In the following example a TCP stream test is performed by running the netperf client the Salvator-X board. It connects to the netperf daemon running on the host 10.4.3.162. A transfer speed of 646.18 Mbits/s is reported.

$ netperf -H 10.4.3.162 MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 10.4.3.162 port 0 AF_INET : demo Recv  Send    Send Socket Socket Message  Elapsed Size  Size    Size     Time     Throughput bytes bytes   bytes    secs. 10^6bits/sec

87380 16384  16384    10.00     646.18