AXI EMACLITE Linux driver for Microblaze and Zynq and Zynq Ultrascale+ MPSoC

Introduction

This page gives an overview of Axi EmacliteLinux driver which is available as part of the Xilinx Linux distribution or Open source Linux distribution as drivers/net/ethernet/xilinx/xilinx_emaclite.c

HW IP features

Features supported


  • Parameterized AXI4 slave interface based on the AXI4 or AXI4-Lite specification for transmit and receive data dual port memory access
  • Media Independent Interface (MII) for connection to external 10/100 Mb/s PHY transceivers
  • Independent internal 2K byte TX and RX dual port memory for holding data for one packet
  • Optional dual buffer memories, 4K byte ping-pong, for TX and RX
  • Receive and Transmit Interrupts support
  • Optional Management Data Input/Output (MDIO) interface for PHY access
  • Internal loopback support

Features Supported in the driver

  • Media Independent Interface (MII) for connection to external 10/100 Mb/s PHY transceivers
  • Independent internal 2K byte TX and RX dual port memory for holding data for one packet

Missing Features and Known Issues/Limitations in Driver

  • Internal loopback is not supported in the Linux kernel
  • Need to validate the driver on Zynq Ultrascale+ MPSoc

Kernel Configuration

The following config options should be enabled in order to build the Axi Emaclite driver
CONFIG_ETHERNET
CONFIG_NET_VENDOR_XILINX
CONFIG_XILINX_EMACLITE


emaclitemenuconfig.png

Devicetree

 axi_ethernetlite_1: ethernet@40e00000 {
                        compatible = "xlnx,axi-ethernetlite-3.0", "xlnx,xps-ethernetlite-1.00.a";
                        device_type = "network";
                        interrupt-parent = <&axi_intc_1>;
                        interrupts = <1 0>;
                        local-mac-address = [00 0a 35 00 00 00];
                        phy-handle = <&phy0>;
                        reg = <0x40e00000 0x10000>;
                        xlnx,duplex = <0x1>;
                        xlnx,include-global-buffers = <0x1>;
                        xlnx,include-internal-loopback = <0x0>;
                        xlnx,include-mdio = <0x1>;
                        xlnx,instance = "axi_ethernetlite_inst";
                        xlnx,rx-ping-pong = <0x1>;
                        xlnx,s-axi-id-width = <0x1>;
                        xlnx,tx-ping-pong = <0x1>;
                        xlnx,use-internal = <0x0>;
                        mdio {
                                #address-cells = <1>;
                                #size-cells = <0>;
                                phy0: phy@7 {
                                        compatible = "marvell,88e1111";
                                        device_type = "ethernet-phy";
                                        reg = <7>;
                                } ;
                        } ;
                } ;
 


Test Procedure


Diagnostic and Protocol Tests

PING

This utility used to test the reachability of a host on an Internet Protocol(IP) network and to measure the round trip time for messages sent from the originating host to a destination computer

How to Run
ping <Remote IP Address>


Telnet

telnet <Server IP Address>


Pkt Generator

Please refer the below link for how to run and various options

https://www.kernel.org/doc/Documentation/networking/pktgen.txt


Stress Test


Iperf with option -d

Run iperf in dual testing mode. This will cause the server to connect back to the client on the port specified in the -L option (or defaults to the port the client connected to the server on). This is done immediately therefore running the tests simultaneously.

./iperf -c <Server IP> -d

Ping flood test
Users can send hundred or more packets per second using -f option. It prints a ‘.’ when a packet is sent, and a backspace is printed when a packet is received

ping -f localhost

Performance Tests


Netperf


More information please refer the below link
http://www.netperf.org/netperf/
How to Run
Server:
netserver

Client:
taskset 2 ./netperf -H <Server IP> -t TCP_STREAM
taskset 2 ./netperf -H <Server IP> -t UDP_STREAM

Iperf
More information please refer the below link
http://en.wikipedia.org/wiki/Iperf

How to Run
Server:
./iperf -s -u
./iperf -s

Client:
./iperf -c <Server IP> -u -b <banwidth>
./iperf -c <Server IP>

Mainline status

  • The current driver available in the Xilinx Linux distribution is in sync with the open source driver except commits mentioned in 2018.1 changelog.

Change Log

2018.2
  • None
2018.1
Summary:
  • Fix MDIO bus unregister bug
  • Trivial code cleanup
Commits:
b18b92c Fix position of lp->mii_bus assignment
71a9e68 net: emaclite: Fix MDIO bus unregister bug
b84ccbb net: emaclite: Remove unused 'has_mdio' flag.
de198c9 net: emaclite: Remove xemaclite_mdio_setup return check
228f3b6 net: emaclite: Fix line over 80 characters
39a9dc6 net: emaclite: Use func instead of hardcoded name
5b234f7 net: emaclite: Balance braces in else statement
b99200f net: emaclite: Remove obsolete else
4b83e2a6 net: emaclite: Add 'maxlen' description
2017.4
  • None
2017.3
  • None
2017.2
  • None
2017.1
  • None
2016.3
  • None
2016.4
  • None

Related Links