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.

C6670, generating checksum using Packet Accelerator (PA)

Hi, I'm using the "/ti/drv/pa/example/emacExample" to send data out of the DSP.

Now I'd like to send data out of the DSP using the PA calculating the checksum.

I did the following:

  1. Call "Pa_format_TxRoute()"  for getting parameters for the psData.
  2. set psData via "Cppi_setPSData()"
  3. Link the packet via "Cppi_setData()"
  4. send data out via "QMSS_queuePush()

But I only get a packet with a wrong IP-checksum out of the DSP.

The "0xffff" is set there instead of "0x5856"

Does anybody knows what I have to use for properties in the route?

  • Frank,

    Below are some references :

     Quoting from the other e2e post : http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/t/135555.aspx

    " Please refer to PA LLD Doxygen, pa.h and test3.c at PA Unit test for details"

    \packages\ti\drv\pa\test\PAUnitTest\tests\test3.c 
  • Hi Varada,

    I almost followed the suggested things.

    I set in the Pa_formatTxRoute(  &chk0, 0, &route,  &panr, &cmdSize);

    the chk0 to :

     /* configure struct for checksum definition */
        chk0.startOffset = 14;         /* Start offset of IP header */
        chk0.lengthBytes = 20;        /* Length of IP header */
        chk0.resultOffset = 10;        /* Offset to checksum location RELATIVE TO THE START OF THE IP HEADER */
        chk0.initialSum = 0;        /* Initial sum */
        chk0.negative0 = 1;            /* computed value of 0 written as -0 */

    and the route to

    route.dest = pa_DEST_EMAC;
        route.flowId = 0;
        route.queue =0;
        route.mRouteIndex = 0;
        route.swInfo0 = 0;
        route.swInfo1 = 0;
        route.customType = 0;
        route.customIndex = 0;
        route.pktType_emacCtrl = 0;
        route.pCmd = NULL;

    after that i set the pa data and the data.

    Than I pushed the data to gPaTxQHnd[5] which should be PDSP5 if I'm correct.

    But the result is the same.

    Do i have to use the Pa_formatTxCmd() instead of the Pa_formatTxRoute() ?

    Best regards Frank



  • Frank,

    I think both the functions need to be called, but I have asked the expert to chime in.

    In the meanwhile, have you tried running the functions in test3.c of PA, as is without modification ? That  might be a good starting point.

  • Hi Varada,

    I tried to run those excamples on the DSP but everytime I would run the project I got  the message

    "verifyTestFramework: Expected 60 entry count in the free descriptor queue (900), found 121"

    and other error messages

    so I could not start the test successfully.

    Regards Frank

  • Hi Varada,

    I solved my problem!

    The reason for the 0xffff as checksum was, that the checksum in the passed packet was not 0x0000.

    So the Packet Accelerator adds the Checksum to the existing data field in the packet and do not replace the fields.

    Best regards Frank

  • Hi Frank,

    Glad to hear you found the solution. Just to clarify you need only Pa_formatTxRoute() . Pa_formatTxCmd() is an old API for the checksum. It would still work, but the recommended and latest API for CRC generation is Pa_fomratTXRoute(). You certainly do not need both.

    Regards

    Javier