Forum Discussion

Silvan's avatar
Silvan
Icon for Occasional Contributor rankOccasional Contributor
5 years ago

is there a bug in the Ethernet MAC of Arria10 SoC devices?

Hi all,

I have an Arria10 SoC device on which an embedded Linux (4.14) is executed. It use the EMAC1 and an external Phy (Micrel KSZ9031RNX) connected through RGMII .

After the transfer of a huge amount of data from the SoC to a PC through the Gigabit Ethernet interface the following observations can be made:

  • Large communication latency. A device ping require around 1s
  • The EMAC1 gmacgrp_debug register (0xFF802024) has a value of 0x120

It seams, that something is wrong with the FIFO state in the MAC or with the FIFO flush mechanism?

The data transfer was done through the iperf3 tool with the PC as server and the SoC as client.

Does anyone know about an issue in the Ethernet drivers (MAC or PHY) when a lot of data is transferred? Or what could be the next step to solve the issue?

By the way: The high latency error state is exited by reinitialize the network connection in the SoC device with ifconfig eth0 down and ifconfig eth0 up

Thanks for any hints and proposals for a solution or debugging hints

19 Replies

  • Hi,

    I have not seen such issues occurs before. Did you change or modify any Uboot or devce tree configs?

    Also, you mentioned you are using EMAC1, but ifconfig eth0 down and ifconfig eth0 up to exit the high latency issue. Why are you doing it on the eth0 instead of eth1?

    Can you check if you have set the correct EMAC* in the device tree:

    "Ubootdirectory\arch\arm\dts"

    • Silvan's avatar
      Silvan
      Icon for Occasional Contributor rankOccasional Contributor

      Hi Eberlazare,

      Thanks for your feedback.

      This issue is not observed in u-boot but on a running Linux. Our hardware has only one Ethernet connection which use EMAC1 (EMAC0 is disabled). In the Linux device tree the EMAC1 configuration is connected to ethernet0 (aliases section) which result in the naming eth0 on Linux.

      Bellow you find the Linux device tree entry for the ethernet configuration.

      Do you think there is something wrong? Or what could be the reason for this high Ethernet latency?

      hps_gmac: ethernet@ff802000 {
      	compatible = "altr,socfpga-stmmac", "snps,dwmac-3.72a", "snps,dwmac";
      	altr,sysmgr-syscon = <&sysmgr 0x48 8>;
      	reg = <0xff802000 0x2000>;
      	interrupts = <0 93 4>;
      	interrupt-names = "macirq";
      	/* Filled in by bootloader */
      	mac-address = [00 00 00 00 00 00];
      	snps,multicast-filter-bins = <256>;
      	snps,perfect-filter-entries = <128>;
      	snps,axi-config = <&socfpga_axi_setup>;
      	tx-fifo-depth = <4096>;
      	rx-fifo-depth = <16384>;
      
      	clocks = <&l4_mp_clk>, <&peri_emac_ptp_clk>;
      	clock-names = "stmmaceth", "ptp_ref";
      
      	resets = <&rst 33>, <&rst 41>;
      	reset-names = "stmmaceth", "stmmaceth-ocp";
      		
      	phy-mode = "rgmii-id";
      	max-frame-size = <3800>;
      	/* probe for phy addr */
      	phy-addr = <0xffffffff>;
      
      	txd0-skew-ps = <420>; /* 0ps */
      	txd1-skew-ps = <420>; /* 0ps */
      	txd2-skew-ps = <420>; /* 0ps */
      	txd3-skew-ps = <420>; /* 0ps */
      	rxd0-skew-ps = <420>; /* 0ps */
      	rxd1-skew-ps = <420>; /* 0ps */
      	rxd2-skew-ps = <420>; /* 0ps */
      	rxd3-skew-ps = <420>; /* 0ps */
      	txen-skew-ps = <420>; /* 0ps */
      	rxdv-skew-ps = <420>; /* 0ps */
      	txc-skew-ps = <1440>; /* 540ps */
      	rxc-skew-ps = <1680>; /* 780ps */
      
      	status = "okay";
      };
      • EBERLAZARE_I_Intel's avatar
        EBERLAZARE_I_Intel
        Icon for Regular Contributor rankRegular Contributor

        Hi,

        How did you define the clock skews? Is it default? Where did you get them?

        Have you run on different versions of Linux? Preferably 5.4

  • Hi,

    Per communication, we will close this topic and you may re-open a new one with reference to this one, once your testing has been complete.