SNLA450 July   2024 DP83822H , DP83822HF , DP83822I , DP83822IF , DP83826E , DP83826I , DP83848-EP , DP83848Q-Q1 , DP83867CR , DP83867CS , DP83867E , DP83867IR , DP83867IS , DP83TC812R-Q1 , DP83TC812S-Q1 , DP83TC813R-Q1 , DP83TC813S-Q1 , DP83TC814R-Q1 , DP83TC814S-Q1 , DP83TG720R-Q1 , DP83TG720S-Q1 , DP83TG721S-Q1

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Texas Instruments Ethernet PHY Drivers
  5. 2Ethernet PHY Driver Overview
    1. 2.1 Exploring Linux Driver Types
      1. 2.1.1 U-Boot Driver
      2. 2.1.2 Kernel Driver
  6. 3Driver Integration
    1. 3.1 Linux Device Tree
    2. 3.2 Integrating Driver
  7. 4Common Terminal Commands
    1. 4.1 Initialization Commands
      1. 4.1.1 dmesg | grep -i mdio
      2. 4.1.2 ifconfig
    2. 4.2 Functional Commands
      1. 4.2.1 Phytool
      2. 4.2.2 Ethtool
      3. 4.2.3 Forced Master/Slave
    3. 4.3 Diagnostic Commands
      1. 4.3.1 SQI
      2. 4.3.2 TDR
      3. 4.3.3 Throughput Testing - Ping and iPerf
  8. 5Summary
  9. 6References

Throughput Testing - Ping and iPerf

Throughput testing refers to sending data from one board to another. An initial ping test can be performed first to confirm communication with the destination is possible. The following example demonstrates the most basic type of ping, where the host is directly connected to the destination. This example does not include any kind of switch, hub, or router.

Ping Example:A testboard running Linux is connected to a Linux PC through an Ethernet cable.

  1. On the Linux PC, open a terminal and run the ifconfig command to find the IPV4 Address
    1. (169.254.132.246 in this example, labeled inet)
  2. On the testboard, run ifconfig 169.254.132.250 to assign a static IP address
    1. Note that the address only has the final three decimals changed to be unique
      1. Known as the host ID
    2. The rest of the address (169.254.132) must be the same
      1. Known as the network ID
  3. From the testboard, run ping 169.254.132.246(the IP address of the Linux PC)
    1. Ping begins and can be stopped by pressing 'ctrl' and 'c' at the same time.
The codeblock below is captured from the testboard pinging to the Linux PC, but ping can be performed both ways, for example, Linux PC can also ping the testboard.

 Ping Block Diagram
                    Example Figure 4-1 Ping Block Diagram Example
root@j7-evm:~# ifconfig eth0 169.254.132.250
root@j7-evm:~# ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500  metric 1
        inet 169.254.132.250  netmask 255.255.0.0  broadcast 169.254.255.255
        inet6 fe80::3608:e1ff:fe59:5cd2  prefixlen 64  scopeid 0x20<link>
        ether 34:08:e1:59:5c:d2  txqueuelen 1000  (Ethernet)
        RX packets 133  bytes 16347 (15.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 481  bytes 117318 (114.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

root@j7-evm:~# ping 169.254.132.246
PING 169.254.132.246 (169.254.132.246): 56 data bytes
64 bytes from 169.254.132.246: seq=0 ttl=64 time=0.579 ms
64 bytes from 169.254.132.246: seq=1 ttl=64 time=0.546 ms
64 bytes from 169.254.132.246: seq=2 ttl=64 time=0.587 ms
64 bytes from 169.254.132.246: seq=3 ttl=64 time=0.557 ms
64 bytes from 169.254.132.246: seq=4 ttl=64 time=0.518 ms
64 bytes from 169.254.132.246: seq=5 ttl=64 time=0.574 ms
64 bytes from 169.254.132.246: seq=6 ttl=64 time=0.548 ms
64 bytes from 169.254.132.246: seq=7 ttl=64 time=0.561 ms
^C
--- 169.254.132.246 ping statistics ---
8 packets transmitted, 8 packets received, 0% packet loss
round-trip min/avg/max = 0.518/0.558/0.587 ms
root@j7-evm:~#

With ping successfully working, we can attempt to perform a throughput test using iPerf, an open-source tool used to measure network performance/bandwidth. iPerf needs to be installed on both machines (testboard and Linux PC) to function.

iPerf Example:

  1. On the test board, run the command iperf -s to configure the test board as the server.
  2. On the Linux PC, run the command iperf -c 169.254.132.250 (the IP address of the server), to configure the Linux PC as a client and connects to the server.
The codeblock below is captured from the testboard. Here we can see 1.09 GB of data successfully transferred and the Bandwidth is very close to the advertised speed of the network port (1000Mbps).
root@j7-evm:~# iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size:  128 KByte (default)
------------------------------------------------------------
[  4] local 169.254.132.250 port 5001 connected with 169.254.132.246 port 37356
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.0 sec  1.09 GBytes   933 Mbits/sec    //This step happens after the Linux PC connects as a client