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.

How to initialize a unique set of tables in the Packet Accelerator for C6678

The document of Packet Accelerator Low Level Driver describes the module can be used in two different configurations in multi-core devices. In common core mode the user will have the first core to initialize the table. Other cores will initialize their internal state but not initialize the table. In independent core mode each core in a device has a unique set of tables. How should the tables be initialized? Can each core initialize the tables independently of other cores through the queue manager in program of each core?

I have been able to find the program for a single core in MCSDK as follows: \pdk_C6678_1_1_2_6\packages\ti\drv\pa\example\emacExample

In the pa_mgmt.c the Setup_PASS() initializes the tables. For each core in independent core mode, is this available? What change is needed? The CycleDelay(1000) waits for 1,000 core clock cycles to poll on the PA response queue to see if response from PA has come. How many cycles is the waiting required?

Best regards,

Daisuke

 

  • Daisuke,In independent core mode is not possible as per your requirement.
    You can also refer the another mode like common core mode.
    In common core mode there is only one set of tables and they are shared by all cores.
    Each core that uses the module must initialize it, but each core will provide the exact same buffers to the module.
    The module user will have the first core to initialize the module also initialize the table.
    Other cores will initialize their internal state but not initalize the table.
    Go through the PA user guide(sprugs4a) to find more detailed information.
  • Hi Pubesh,

    Thank you for your reply.

    Can each core in a device not have a unique set of tables? Does C6678 support only the common core mode, not support the independent core mode?

    In the pa_mgmt.c there is waiting to poll on the PA response queue to see if response from PA has come. How many cycles is the waiting required?

        /* Poll on the PA response queue to see if response from PA has come */

        for (j = 0; j < 100; j++)

        {

            CycleDelay (1000);

    Best regards,

    Daisuke

     

  • Hi Pubesh,

    Daisuke Maeda said:
    Can each core in a device not have a unique set of tables? Does C6678 support only the common core mode, not support the independent core mode?

    Sorry. I cannot understand what is not possible in independent core mode. Please tell me that. Is it not possible that each core initialize the tables independently of other cores?  Should only the first core initialize the tables?

    Daisuke Maeda said:
    In the pa_mgmt.c there is waiting to poll on the PA response queue to see if response from PA has come. How many cycles is the waiting required?

    How long is the response time from the PA after to add the IP address to the table?

    In the test3.c there is waiting for a PA reply.

    \pdk_C6678_1_1_2_6\packages\ti\drv\pa\test\PAUnitTest\tests\test3.c

        /* L3 (IP) entries. In this test all IPs link to MAC index 0 */     cmdReply.replyId = TEST_SWINFO0_CMD_ID;     cmdReply.queue   = tf->QGen[Q_CMD_REPLY];

        for (i = 0; i < TEST_NUM_L3_HANDLES; i++)  {

            hd = testCommonAddIp (tf, pa_LUT1_INDEX_NOT_SPECIFIED, &testPaIpInfo[i], &ipMatchRoute, &nfailRoute,                               &l3Handles[i], l2Handles[0], tf->QGen[Q_CMD_RECYCLE], tf->QLinkedBuf1,                               &cmdReply, &cmdDest, &cmdSize, &paret);

            testHandlePaError (tf, pat, paret, l2Handles, l3Handles, l4Handles, hd, __LINE__);  /* no return on error */

            /* Send the command to the PA */         Qmss_queuePush (tf->QPaTx[cmdDest - pa_CMD_TX_DEST_0], (Ptr)hd, cmdSize, TF_SIZE_DESC, Qmss_Location_TAIL);         paTestTxFmtExptStats.classify1.nPackets += 1;

            /* Wait for a PA reply, and recycle the command descriptor/buffer */         if (testWaitCmdReply (tf, pat, tf->QGen[Q_CMD_REPLY], TEST_SWINFO0_CMD_ID, __LINE__))             testCleanup (tf, pat, l2Handles, l3Handles, l4Handles, PA_TEST_FAILED);

    Please give me an answer as soon as possible. Your prompt reply would be appreciated.

    Best regards,

    Daisuke