Linux Emaclite Driver

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


Ethernetlite driver is in minimal support mode and will be deprecated shortly

Table of Contents

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 Mbps 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 Mbps 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
  • Driver is validated only on Microblaze based platforms and not validated/maintained on ARM designs

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




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 <bandwidth>
./iperf -c <Server IP>

Mainline status

  • The current driver available in the Xilinx Linux distribution is in sync except remove #define ALIGNMENT and minor code refactoring.

Change Log

2024.2
Summary
  • Add clock adoption support to ensure that the clock framework is aware of emaclite as a consumer of FPGA clock.
Commit
2024.1
  • None
2023.2
  • None
2023.1
  • 6.1 kernel rebase
2022.2
  • None
2022.1
  • 5.15 kernel rebase and minor warning fixes (kernel-doc and coding style)

https://github.com/Xilinx/linux-xlnx/commits/xilinx-v2022.1/drivers/net/ethernet/xilinx/xilinx_emaclite.c

2021.2
No changes
2021.1
  • 5.10 kernel rebase
  • Misc cleanup (Remove advertising of 1G speed and auto negotiation, Remove custom BUFFER_ALIGN macro)

64870dcf8663 net: emaclite: Remove advertising of 1G speed and auto negotiation
b0be09613a6e net: emaclite: Remove custom BUFFER_ALIGN macro


2020.2
  • Coverity fixes.

ef553bd0e4ee net: emaclite: Add variable and conditions to check the return value

2020.1
  • None
2019.2
  • Add ethtool support.

Commits:

ee91a2c net: xilinx: emaclite: add minimal ndo_do_ioctl hook
aafe86f net: xilinx: emaclite: add minimal ethtool ops

2019.1
  • None
2018.3
  • None
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

© Copyright 2019 - 2022 Xilinx Inc. Privacy Policy