TI E2E Community
Digital Signal Processors (DSP)
C6000 Multicore DSP
Keystone Multicore Forum (C66, 66A, AM5)
PA LLD workaround when command buffer is greater than 256 bytes
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.
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.
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.
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.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.