R-Car/Tests:ravb

From eLinux.org
Jump to: navigation, search

This document describes test procedures for Renesas Electronics Ethernet AVB.

Wake-on-Lan

Wake-on-Lan is supported using MagicPacket, this describes how to test it on the Renesas Salvator-X boards.

To test WoL the target and the host needs to have working network configuration. It's possible to have target and host on different subnets as long as packets can be routed directly from host to target. However for this test it is assumed target and host are directly connected and on the same subnet, that way we don't have to worry about routing and such. The network interface on target are named eth0 and the interface on the host are named net0.

1. Find out the MAC address of the target, for example by running the ip command on the target itself.

root@target ~ # ip address show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 2e:09:0a:00:83:90 brd ff:ff:ff:ff:ff:ff
    inet 10.0.1.7/24 brd 10.0.1.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::2c09:aff:fe00:8390/64 scope link 
       valid_lft forever preferred_lft forever

The MAC address 2e:09:0a:00:83:90 will be used in this example.

2. Set target to listen and wake-up by MagicPacket received on eth0 using ethtool.

root@target ~ # ethtool -s eth0 wol g

3. Suspend target.

root@target ~ # echo s2idle > /sys/power/mem_sleep
root@target ~ # echo mem > /sys/power/state

4. Wake target up by sending MagicPacket from host interface net0 to a target with MAC address 2e:09:0a:00:83:90 using the tool etherwake.

root@host ~ # etherwake -i net0 2e:09:0a:00:83:90

Different MTU settings

RAVB supports changing the MTU, this describes how to test it on the Renesas Salvator-XS board.

To test changing the MTU on the target (Salvator-XS) and the host needs to have working network configuration. The network interface on the host needs to support larger MTU values then 1500. For this test it is assumed target and host are directly connected. The network interface on target are named eth0 and the interface on the host are named net0.

1. On host set MTU to something larger then 1500. For this test the max value for RAVB 2026 is used.

ifconfig net0 mtu 2026 up

2. On target set MTU to match what is used on host.

ifconfig eth0 down
ifconfig eth0 mtu 2026 up

3. Send ping with large payload and observe that it works.

ping -M do -s 1998 <target>

The reason for 1998 instead of 2026:

  • On Linux the ICMP/ping implementation do not encapsulate the 28 byte ICMP (8) + IP (20).

4. For extra verification the packet flow is inspected using tcpdump to verify that there is no packet fragmentation.