Changes between Initial Version and Version 1 of ventana/ethernet


Ignore:
Timestamp:
10/22/2017 05:28:45 AM (5 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ventana/ethernet

    v1 v1  
     1[[PageOutline]]
     2
     3= Ventana Ethernet =
     4The Ventana Family of SBC's has different configurations of ethernet ports across the family.
     5
     6[=#hardware]
     7== Hardware Configuration ==
     8||= Board =||= Configuration =||= eth0 =||= eth1 =||
     9|| GW51xx  || Single GigE     || IMX6 FEC || - ||
     10|| GW52xx  || Single GigE     || IMX6 FEC || - ||
     11|| GW53xx  || Dual GigE       || IMX6 FEC (J16)   || Marvell SKY2 (J17) ||
     12|| GW54xx  || Dual GigE       || IMX6 FEC (J19)   || Marvell SKY2 (J20) ||
     13|| GW552x  || Dual GigE       || Intel I210 (J12) || Intel I210 (J9)  ||
     14
     15[=#throughput]
     16== Drivers and throughput ==
     17Here are some notes on the various Linux drivers that support the Gigabit Ethernet ports discussed above:
     18 * Freescale FEC MAC:
     19  * Used on the GW51xx,GW52xx,GW53xx,GW54xx (Port 1 on boards with 2 ports)
     20  * [http://cache.freescale.com/files/32bit/doc/errata/IMX6DQCE.pdf i.MX6 errata: ERR004512] discusses a throughput limitation limiting the device to appx 470mbps
     21  * [http://lxr.missinglinkelectronics.com/linux/drivers/net/ethernet/freescale/fec.c fec linux driver]
     22  * hardware supports common hardware accelerations such as NAPI, checksum offload, and jumbo frames. The driver used in the Yocto and OpenWrt 16.01 BSPs support this, yet the upstream driver used in OpenWrt 14.08 does not.
     23 * Marvell Yukon2 MAC/PHY:
     24  * Used on GW552x, GW54xx,GW53xx (Port 2 on boards with 2 ports)
     25  * [http://lxr.missinglinkelectronics.com/linux/drivers/net/ethernet/marvell/sky2.c sky2 linux driver]
     26  * hardware and driver appear to support common hardware accelerations such as NAPI, checksum offload, and jumbo frames
     27 * Intel i210 MAC/PHY
     28  * [http://lxr.missinglinkelectronics.com/linux/drivers/net/ethernet/intel/igb/ igb linux driver]
     29  * hardware and driver appear to support common hardware accelerations such as NAPI, checksum offload, and jumbo frames
     30
     31Throughput test results:
     32||= NIC        =||= Software               =||||= Throughput(UDP/TCP) Mbps =||
     33||              ||                          || TX         ||  RX            ||
     34|| IMX6 FEC     || yocto 1.8 (gw 3.14.48)   || 406/423    || 493/588        ||
     35|| Intel I210   || yocto 1.8 (gw 3.14.48)   || 943/599    || 503/607        ||
     36|| Marvell SKY2 || yocto 1.8 (gw 3.14.48)   || 829/648    || 730/615        ||
     37|| ||
     38|| IMX6 FEC     || OpenWrt 14.08 (3.14.16)  || 270/317    || 495/439        ||
     39|| Intel I210   || OpenWrt 14.08 (3.14.16)  || 941/600    || 630/411        ||
     40|| Marvell SKY2 || OpenWrt 14.08 (3.14.16)  || 871/480    || 670/485        ||
     41|| ||
     42|| IMX6 FEC     || OpenWrt 16.02 (4.4.0)    || 394/392    || 530/560        ||
     43|| Intel I210   || OpenWrt 16.02 (4.4.0)    || 940/680    || 870/758        ||
     44|| Marvell SKY2 || OpenWrt 16.02 (4.4.0)    || 794/534    || 862/878        ||
     45 * test results using {{{iperf3}}} with iptables/ebtables modules removed where applicable
     46
     47== ethtool/mii-tool ==
     48These two tools ({{{ethtool}}}/{{{mii-tool}}}) are tools used to talk to the Ethernet PHY.
     49
     50In general, we recommend {{{ethtool}}} because it is kept up to date. {{{mii-tool}}} is now '''deprecated''' and so we will not include it by default in our BSPs moving forward.
     51
     52Below are two examples getting information from the Ventana FEC Ethernet device using both {{{ethtool}}} and {{{mii-tool}}}:
     53* {{{ethtool}}}
     54{{{
     55#!bash
     56root@OpenWrt:/# ethtool eth0
     57Settings for eth0:
     58        Supported ports: [ TP MII ]
     59        Supported link modes:   10baseT/Half 10baseT/Full
     60                                100baseT/Half 100baseT/Full
     61                                1000baseT/Full
     62        Supported pause frame use: Symmetric
     63        Supports auto-negotiation: Yes
     64        Advertised link modes:  10baseT/Half 10baseT/Full
     65                                100baseT/Half 100baseT/Full
     66                                1000baseT/Full
     67        Advertised pause frame use: Symmetric
     68        Advertised auto-negotiation: Yes
     69        Link partner advertised link modes:  10baseT/Half 10baseT/Full
     70                                             100baseT/Half 100baseT/Full
     71                                             1000baseT/Full
     72        Link partner advertised pause frame use: Symmetric Receive-only
     73        Link partner advertised auto-negotiation: Yes
     74        Speed: 1000Mb/s
     75        Duplex: Full
     76        Port: MII
     77        PHYAD: 0
     78        Transceiver: external
     79        Auto-negotiation: on
     80        Supports Wake-on: d
     81        Wake-on: d
     82        Link detected: yes
     83}}}
     84
     85* {{{mii-tool}}}
     86{{{
     87#!bash
     88root@OpenWrt:/# mii-tool eth0
     89eth0: negotiated 1000baseT-FD flow-control, link ok
     90}}}
     91
     92[=#portconfig]
     93=== Setting the Ethernet Port Speed ===
     94For customers who would like to force a specific speed, you can use the following:
     95
     96* Using {{{ethtool}}}
     97{{{
     98#!bash
     99# In order to change link speed, you must also turn autonegotiation off
     100root@OpenWrt:/# ethtool -s eth0 autoneg off speed 100
     101root@OpenWrt:/# [  261.516832] libphy: 2188000.ethernet:00 - Link is Down
     102[  265.516787] libphy: 2188000.ethernet:00 - Link is Up - 100/Full
     103}}}
     104
     105* Using {{{mii-tool}}}
     106{{{
     107#!bash
     108# Change link to 10mbps
     109root@OpenWrt:/# mii-tool eth0 -F 10baseT-FD
     110root@OpenWrt:/# [  259.359135] libphy: 2188000.ethernet:00 - Link is Down
     111[  259.364390] br-lan: port 1(eth0) entered disabled state
     112[  261.359160] libphy: 2188000.ethernet:00 - Link is Up - 10/Full
     113[  261.365045] br-lan: port 1(eth0) entered forwarding state
     114[  261.370543] br-lan: port 1(eth0) entered forwarding state
     115[  263.368898] br-lan: port 1(eth0) entered forwarding state
     116}}}
     117
     118[=#duplex]
     119=== Duplex ===
     120Most Ethernet NICs can be configured to be either full or half duplex. For information on what this means, please see [https://en.wikipedia.org/wiki/Duplex_%28telecommunications%29 this page].
     121
     122* Using {{{ethtool}}}
     123{{{
     124#!bash
     125# To set duplex, autonegotiaion must be turned off
     126root@OpenWrt:/# ethtool -s eth0 autoneg off duplex half
     127root@OpenWrt:/# [  465.514658] libphy: 2188000.ethernet:00 - Link is Down
     128root@OpenWrt:/# ethtool eth0 | grep Duplex
     129        Duplex: Half
     130}}}
     131
     132[=#flowcontrol]
     133=== Ethernet PAUSE frames for flow control (802.3x) ===
     134The IEEE 802.3x standard introduced Ethernet PAUSE frames which can be used at the MAC level as a mechanism of flow-control much like that used in UARTs. A transmitter can send a PAUSE frame to a receiver to tell them to stop sending for a specified period of time if they can't keep up with the data flow.
     135
     136This is typically only used if one end of the transmission can't keep up with the line-speed of the medium (ie a board supporting GigE that can't keep up with 1gbps).
     137
     138Because the Fast Ethernet Controller (FEC) integrated into the IMX6 can't perform at 1000mbps the use of PAUSE frames may be desirable in certain cases.
     139
     140Ethernet PAUSE frames are not supported across all the various Network Interface Controllers (NICs) used on the Ventana product line (in some cases the hardware can't support it, in others the drivers may not support it):
     141 * IMX6 FEC: (used as eth0 on GW51xx/GW52xx/GW53xx/GW54xx/GW55x) supports PAUSE frames (yet tx/rx must be set the same)
     142 * Intel i210: (used on GW5520 and GW16083) supports symmetric PAUSE frames with independent control
     143 * Marvell SKY2: (used as eth1 on GW54xx/GW53xx) supports PAUSE frames but no autonegotiation
     144
     145To configure:
     146* Using {{{ethtool}}}
     147{{{
     148#!bash
     149# Show pause-frame status
     150root@OpenWrt:/# ethtool --show-pause eth0
     151Pause parameters for eth0:
     152Autonegotiate:  on
     153RX:             off
     154TX:             off
     155RX negotiated:  on
     156TX negotiated:  on
     157
     158# Disable pause frame support
     159root@OpenWrt:/# ethtool --pause eth0 autoneg off rx off tx off
     160rx unmodified, ignoring
     161tx unmodified, ignoring
     162root@OpenWrt:/# [   92.519412] libphy: 2188000.ethernet:00 - Link is Up - 1000/Full
     163
     164# Enable pause frame
     165root@OpenWrt:/# ethtool --pause eth0 autoneg on # enable pause frame autoneg
     166root@OpenWrt:/# [  137.518636] libphy: 2188000.ethernet:00 - Link is Up - 1000/Full
     167}}}
     168
     169Notes:
     170 * Note that FEC tx/rx pause frame support must be the same (you can't enable tx and disable rx for example)
     171 * If PAUSE frames are supported by the NIC/driver their default configuration is auto-negotiated.
     172 * If autonegotiation of PAUSE frames is enabled from a disabled state the link will go down and come back up
     173
     174
     175See also:
     176 * https://en.wikipedia.org/wiki/Ethernet_flow_control