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.

Keystone K2L NETCP Host Port cannot receive packets

We are developing our own network driver for the Keystone K2L device.  We can send packets to a PC connected to the PHY but cannot receive packets from the PC.

The Ethernet statistic counters show that packets are being received from the PHY but the host port does not receive them.  We have the ALE in bypass mode and all ports configured to FORWARD packets.

We are developing on a K2L EVM board.

Can someone help diagnose where the packets are going as I understand that in ALE bypass mode all packets go to the host port ?

  • Below are the port statistics before and after a PC ping command. As can be seen the port 1 received broadcast (RXBC) has gone up by 12. This is the number of ARP requests sent me the PC as shown by Wireshark.
    Statistics before ping from PC:Host Port Stats ...TXGF:3TXBC:1TXMC:2TXPF:0RXGF:0
    RXBC:0RXMC:0RXPF:0RXER:0ROCT:0TOCT:192ALDP:0ALOD:0PTMD:0Port 1 Stats ...TXGF:0
    TXBC:0TXMC:0TXPF:0RXGF:2RXBC:1RXMC:1RXPF:0RXER:0ROCT:311TOCT:0ALDP:0ALOD:0PTMD:0
    Statistics after ping from PC:Host Port Stats ...TXGF:3TXBC:1TXMC:2TXPF:0RXGF:0
    RXBC:0RXMC:0RXPF:0RXER:0ROCT:0TOCT:192ALDP:0ALOD:0PTMD:0Port 1 Stats ...TXGF:0
    TXBC:0TXMC:0TXPF:0RXGF:15RXBC:13RXMC:2RXPF:0RXER:0ROCT:1143TOCT:0ALDP:0ALOD:0
    PTMD:0
  • Hi John,
    Sorry for the delayed response.
    Since its your own driver, difficult to guess what could be the problem.
    I hope that PHY was configured good since we able to send the packet.
    Could you please check your receive interrupt that configured correctly.
    Also check the status register.
  • We are not using interrupts at the moment.  We have a loop that checks for packets arriving at the QMSS that we have setup.  As I said before the packet statistics show we are receiving packets on the Ethernet port.  The statistics also show that these packets are not being transfered to the host port.  Apart from the ALE do I need to setup any registers to directed the received packets at the host port ?

  • John,

    Have you tried the MCSDK example too?
    For sanity check you could compare those code example with your own code.

    Some examples are provided at:
    - NETCP (PA and EMAC):
    C:\ti\pdk_keystone2_3_01_xx_xx\packages\exampleProjects\PA_UnitTest_K2L_testProject
    There is an online training that explain the concept of the drivers that are provided:
    http://software-dl.ti.com/public/hpmp/KeyStone/08_NETCP_PA/index.html

    - NDK (ie TI TCP IP stack) example:
    C:\ti\mcsdk_bios_3_01_xx_xx\examples\ndk

    A.

  • We used the uboot source code for the KS2 K2L as a reference to setting up the Ethernet.  I will look at the MCSDK code.

  • Hi John,

    Not sure if you need additional help for this issue. But, I agree with Titus and Anber that MCSDK should be the proper reference for the GBE kernel driver. In case you are using ports 2 & 3, note that they share SERDES I/O with PCI-E and you need to make sure you have programmed the I/O mux to use GBE SERDES instead of PCI-E SERDES.

    Also, if packets are reaching your host port but not your queues. Double check the Packet Streaming Interface register to understand where the packets are trying to be forwarded: PKTDMA or Cluster 0 at PA? If PKTDMA, then ensure the RX channels have the proper RX flows enabled.

    Sincerely,

    Javier

     

  • The host MAC statistics are not showing any packets received.  But the Ethernet port MAC statistics are showing received packets.  And as I said the ALE is in bypass mode so all received packets should go to the host port.

  • I see, thanks for that update. Do you see any errors in the MAC statistic side that would suggest an issue? Undersize frame? Oversize frame? CRC or Code Alignment errors?

    Could you double check the ALE_PORT0_CONTROL register to make sure that it set to forwarding mode (i.e. value of 3 on bits 1:0).

    Regards,

    Javier