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.

PA LLD workaround when command buffer is greater than 256 bytes

Eric,

We had a discussion about a work-around to the fact that the PA LLD requires a single linear buffer but I was wanting to make use of 256 byte buffers linked to descriptors so that when the host sends packets to the PA it makes use of a linked set of these buffers. I have attached a link to the previous discussion thread for your info.

http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/t/166399.aspx

I just wanted to run by you what I am planning on doing to make sure that their is no gotcha to what I intend to do.

I found that only the setCustomLUT2 command requires a buffer greater than 256 bytes for the call to the PA LLD and so if I made the size of the buffers 256 bytes long and overwrote the buffer (by allowing writing into the next consecutive buffer) that is tied to a particular descriptor, I could then push the descriptor with the length modified to be 512 instead of 256. In other words cmdSize = 512 and so is the buffLen in the host descriptor. As the configuration of the PA is happening at the beginning I Do not see any issue with doing this. If I needed to use the setCustomLUT2 rule in the middle then I guess it is possible that the next buffer to the buffer that is popped is currently being used and so my writing into it could cause problems.

BTW thanks for all your previous help on the PA side. I have been able to get the PA programmed to handle UDP and ICMP packets on 8 cores for IPv4 and IPv6 getting to individual cores based on UDP port #s.

Is there any document etc. that describes in more detail the .cfg files that are part of the projects as I want to modify them extensively and they appear quite different from the cdb files in older versions of Code composer studio.

Thanks, Aamir

  • Hi, Aamir:

    What version of PA LLD are you using? All the commands that you plan to use are smaller than 256-byte as indicated below:
    #define pa_SET_CUSTOM_LUT1_MIN_CMD_BUF_SIZE_BYTES    60
    #define pa_SET_CUSTOM_LUT2_MIN_CMD_BUF_SIZE_BYTES    36
    #define pa_ADD_LUT1_MIN_CMD_BUF_SIZE_BYTES          120
    #define pa_ADD_LUT2_MIN_CMD_BUF_SIZE_BYTES          44

    If you need to use a commad which is larger than 256-byte, I will recommend you to provide a large linear buffer to PA and then copy the command packet to few linkerd CPPI buffers to be delivered to PASS.


    For the document question, please post a seperate question to the CCS forum. I believe you will get better help that way.
    If I have answered your question, please click "Verify answer" button.

    Best regards,

    Eric

     

     

     

     

  • Eric,

    I am using pdk_c6678_1_0_0_14. I looked through the PA LLD code for pa_setCustomLUT2 and their is a line at the beginning

      csize = sizeof(pafrmCommand_t)+sizeof(pafrmCommandConfigPa_t)-sizeof(uint32_t);

    I looked through the size of the structures and they add up to more than 256 bytes. thanks for your suggestion though.

    Aamir