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.

RTOS/TMDSEVM6678: NDK emac client example: send raw packets error

Part Number: TMDSEVM6678
Other Parts Discussed in Thread: FFTLIB, MATHLIB

Tool/software: TI-RTOS

Hello. I'm continuing with the example and get some unexpected behavior. I made a modification: set infinite loop for sending raw packet like this

while(1)
{

bytes = sendnc(sraw, (char *)pBuffer, PACKET_SIZE, hPkt, 0);


if( bytes < 0 ){

NIMU_testLog("Error: Raw Eth Send failed Error:%d\n", fdError());

sendncfree(hPkt);

fdCloseSession( TaskSelf() );

fdClose(sraw);

TaskExit();
}

}

And after some period it got an error...

It leads me to the file "raweth.c" and function "RawEthTxPacketNC" where the error occurs

if ((pPkt->pDataBuffer + pPkt->DataOffset) != (UINT8 *)pBuffer)
{
raweths.SndNoPacket++;
return (EINVAL);
}

What happens here and why the handle is wrong? What should I do to get rid of this?

  • Hi Sergey,

    We're looking into this.

    Best Regards,
    Yordan
  • Please provide what Processor SDK RTOS release, NDK release and what exact test application you tried. We only have NIMU example for C6678, is your send raw packet based on modified NIMU example?

    Regards, Eric
  • CCSv7.3.0.00019

    SDK v04.01.00.06

    • CG_XML 2.41.00
    • CTools Library 2.2.0.0
    • DSPLIB 3.4.0.0
    • EDMA3 LLD 2.12.05.29
    • FFTLIB 3.1.0.0
    • Framework Components 3.40.02.07
    • IMGLIB 3.1.1.0
    • IPC 3.46.02.04
    • LIBARCH 1.0.0.0
    • LINALG 1.2.0.0
    • MATHLIB 3.1.1.0
    • NDK 2.25.01.11
    • OpenMP 2.06.02.00
    • PDK C667X 2.0.7
    • Processor SDK RTOS C667X 04.01.00.06
    • SYS/BIOS 6.46.05.55
    • TI CGT 6x 8.1.3
    • UIA 2.00.06.52
    • XDAIS 7.24.00.04
    • XDCtools 3.32.01.22

    Yes, it's modified NIMU_emacClientExample from "c:\ti\pdk_c667x_2_0_7\packages\ti\transport\ndk\nimu\example\client\c6678\c66\bios\". I tried to make less modifications and changed only one string

    for(j = 0; /*j < PACKET_COUNT*/; j++)

    {

    ...

    }

    but it gives another error 

  • I added a delay between sendings (100,000,000 usecs ) and it's the same error: getsendncbuff failed Error: 55 after only 34 packets sent. Please try to reproduce the error and help me.

  • Can you send me your modified files?

    Regards, Eric
  • Hello, thanks for quick response. This is the whole project. I changed only the client.c.

    test_NIMU_emacClientExample.zip

  • Hi,

    I tried the same project, the change is only at client.c. I tried to send out PACKET_COUNT = 1000 without inserting of delay. I didn't see any issue. Do you used the GEL file to initialize the C66x core 0?

    [C66xx_0] QMSS successfully initialized
    CPPI successfully initialized
    PA successfully initialized

    TCP/IP Stack Example Client
    Configuring DHCP client
    Service Status: DHCPC : Enabled : : 000
    Service Status: Telnet : Enabled : : 000
    Service Status: HTTP : Enabled : : 000
    Service Status: DHCPC : Enabled : Running : 000
    Network Added: If-1:158.218.109.166
    Service Status: DHCPC : Enabled : Running : 017
    Raw Eth Task Started ...
    Raw Eth Task Ended ...

    Regards, Eric
  • Hello.
    If there's no delay it stucks after lot more than 1000 packets. Try, for example PACKET_COUNT=1,000,000,000. In my case it printed an error after 6,220,192 packets sent (gTxCounter). The same number of PACKET_COUNT with delay = 100,000,000 cycles gives an error after gTxCounter=583.