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.

UDP packet loss

Hi

UDP packtes were getting lost when I send some 100 UDP packets continuously from PC. I am using DM642 DSP,code composer 2.2 and  NDK stack 2.0.  This project is a legacy project and the NDK stack library was bought from TI long time back. There is no source code available for the NDK stack. Now i have to debug the problem.

First I would like to run sample UDP test porject so that i will know whether any problem is there in my code. Can somebody send sample UDP receive project?

The ethernet contoller is LXT971A. Since the packets are dropped , i am thinking the devide driver buffer is not big enough. I would like to know how to change this.

Thanks

Raju

 

 

 

  • Hi Raju,

    I think you may want to take a look at section "3.4.1 Most Common Problems" of the NDK User's Guide (spru523_ug.pdf).  In there, there is a section titled "UDP application drops packets on send() calls" which may be of some use to you.

    Here's some other info and or ideas I have ...

    Raju Siravuri1 said:
    UDP packtes were getting lost when I send some 100 UDP packets continuously from PC

    Can you please provide some more details on your setup?  How is the PC connected to the DM642 board?  Is there a router or a switch in between them? Or is it going through the LAN or out through the internet?

    By definition, UDP is unreliable so it is not uncommon for packets to go missing when data is being sent over that protocol.

    Raju Siravuri1 said:
    There is no source code available for the NDK stack. Now i have to debug the problem.

    The NDK 2.0 shipped with full source code.  You should be able to find it in your NDK installation.  For example, I see it here on my machine:

        ndk_2_0_0\packages\ti\ndk\src

    Raju Siravuri1 said:
    First I would like to run sample UDP test porject so that i will know whether any problem is there in my code. Can somebody send sample UDP receive project?

    I guess you mean you are looking for a Windows side application that will test UDP transfers to the DM642?  The NDK 2.0 ships with a test program for that as well.

    You should see it here:

        ndk_2_0_0\packages\ti\ndk\winapps\testudp.exe

    Raju Siravuri1 said:
    The ethernet contoller is LXT971A. Since the packets are dropped , i am thinking the devide driver buffer is not big enough. I would like to know how to change this.

    The driver sources are also included:

    ndk_2_0_0\packages\ti\ndk\src\hal\evmdm642

    However, one possibility is that the UDP receive buffer within the stack (not the driver) is not big enough.  You can configure the size of the receive buffer at run time using the NDK configuration.  For example:

            Int receiveBufSize = 8192;
            CfgAddEntry(hCfg, CFGTAG_IP, CFGITEM_IP_SOCKUDPRXLIMIT,
                CFG_ADDMODE_UNIQUE, sizeof(uint), (UINT8 *)&receiveBufSize, 0);

    Steve