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.

NDK2.2 + RAW ethernet Missing Packets

Hi,

  I am sending raw ethernet packet of size1514 from Linux PC to DM648. I am able to receive the packets correctly when I send one packet.

But DM648 is not able to receive all the packets when the packets are sent with high on 100mbps network. It is missing lots of packets.

There is no application involved. I have simply configured raw ethernet socket and kept in loop like this

 

while(1)

{

        bytes = recvnc)socket,(void**)&pBuf,0,&hBuffer);

        if(bytes<0)

              printf("error");

     else

          printf("\n%d",i++);

  recvncfree(hBuffer);

 

}

Can you please let me know why am I missing packets in high speed?

regards,

Sharanu

  • How are you handling the printf() functions? Is this using the C RTS HOST CIO library where the printf()'s go through JTAG to the CCS debugger? This style of printf() is relatively slow and intrusive to the target. Try doing a printf() for every 200 or so packets. Or eliminate the printf() altogether in the main loop and just print a status at the end.

    Mark

  • Thanks Mark.

    I have couple of questions.

    1. As we know that the maximum memory pool that can be allocated for PBM is 192*1664.

    My requirement is to receive and store a 3000 packets of size 1066 bytes each in realtime. I have defined a size of 330000KB for Memory pool through setsockopt().

    I am receiving the packets as mentioned in my previous mail. I am freeing buffer evertytime. So I should not miss any packets. But I am missing packets. Is printf() can only be the reason? Is this the right method or am I missing anything here.

    2.  The total size required for 3000 packets is 3198000 Bytes. Do i need to create such a big pool of memory?

    Regards,

    Sharanu