This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Ethernet issue when only using native 100base switch...

We've had our 8148 design up and running for a few months now.  When connected to a native 1000base switch at speeds of 10, 100 or 1000 we operate with no errors detected.  But when we connect to a native 100base switch we autonegotiate 100base speed, but when we perform some simple FTP tests we are getting alot of tx_dropped statistics that appear to be generated by a TX DMA error called desc_alloc_fail. We also notice decreased throughput when this occurs, particularly when transmitting files.

In looking at the TI supplied Linux code it appears that there is 8kb of TX buffer space which get sliced up into a TX buffer pool, and apparently, it is this pool that is running our of buffers that causes this desc_alloc_fail statistic.

Why is this occurring and what might the cause of this be?

The statistics come rom the following locations running under Linux:

     /sys/devices/platform/cpsw.0/net/eth0/hw_stats

     /sys/devices/platform/cpsw.0/net/eth0/statistics/rx_packets

     /sys/devices/platform/cpsw.0/net/eth0/statistics/rx_bytes

     /sys/devices/platform/cpsw.0/net/eth0/statistics/rx_dropped

     /sys/devices/platform/cpsw.0/net/eth0/statistics/tx_packets

     /sys/devices/platform/cpsw.0/net/eth0/statistics/tx_bytes

     /sys/devices/platform/cpsw.0/net/eth0/statistics/tx_dropped

  • Some information that wasn't included about this issue in the original post:

    1) We're using the RGMII mode of operation.

    2) We're using a different PHY than the TI8148EVM, we're using a Micrel 9021 or 9031 PHY.

    3) All tests have been build using the v5.03 SDK.

    4) I've repeated these exact same tests using the TI 8148 EVM and there are no issues like I've noted above when the test are run on our platform.  The build used for these tests was the pre-built images included in the v5.03 SDK.

    5) Our build has a slight mod to the cpsw driver to enable the In-Band Mode of Operation for all speeds, not just 10base speed.  In prior talks some months ago with TI network folks they indicated that the other speeds should work fine, they just hadn't tested them yet, and subsequent SDK's would have this important feature enabled for all speeds.

  • Below are the results of two other tests we've run.

    First, we've disabled the cpsw mod that enabled In-Band Mode of Operation for all speeds, not just 10base speeds.

    1) Using our H/W, we wait until Linux boots before plugging in the ethernet.  Manually, we disable auto-negotiation and set the speed for 100 and full duplex (used ethtool for this).  We then plug in ethernet to a native 100base switch.  Link gets established.  Ethtool reports that link is up, speed is 100 and duplex is full.  The other remote system is also set to full duplex (from ethtool). I then repeat the FTP transfer test as in previous tests.  After examining the test results we do not see any tx_dropped or desc_alloc_fail numers, but we do see that there are a number of rxcrcerrors, rxaligncodeerrors and rxfragments.

    2) Ran some tests from U-Boot using the MII utilities that U-Boot has. PHY indicates that it is set to auto-negotiate.  Using an older Cisco Catalyst 2900 XL switch (10/100 managed switch), we connected ethernet, booted our system and it auto-negotiates link when attempting TFTP transfer.  U-Boot detects PHY has link and starts transfer, but switch still has yellow light (no link, negotiation in progress???).  After approx 10 seconds it gets green light on switch (100base link up???).  Some TFTP packets had timed out, but transmission starts when switch light goes green. After transfer U-Boot doesn't automatically take the link down, the PHY still has link.  When the PHY is interrogated it indicates that auto-negotiation is enabled, speed is 100, duplex full and link is up.  Turning off PHY auto-negotiation causes link to drop.  Re-enabling auto-negotiation does not result in link establishment.

  • Hi Joe Cossette

    Here is the ethtool command to change the log level of the Driver
    ethtool -s eth0 msglvl 0xffff
    Can you provide the kernel log and pcap captured in the server while doing FTP test.

    with regards
    Mugunthan V N