My goal is to use the QMSS, CPPI and PA to handle as much of my specific network traffic as possible. I have two UDP ports that will be used. One port to send and receive packets, and the other port just to receive a continuous packet stream.
I started with the PA Multicore Example. It was easy enough to take it and reconfigure so my rx/tx port worked within my app. However getting the second port, the receive data stream port, running has been a little tricky.
What I did on the second port: I copied the Add_Port() function and modified it for my desired port number and changed the Rx queue destination setup
/* Setup the Rx queue as destination for the packets */
rxQInfo = Qmss_getQueueNumber (g_imagerx_qhnd);
routeInfo.queue = rxQInfo.qNum;
routeInfo.flowId = (uint8_t)Cppi_getFlowId(g_imagerx_flowhnd);
This is a fairly minor change and I 'feel' the problem must be with my new mem region, descriptor config, or rx flow configuration. I basically copied the setup for the multicore demo but changed the buffer sizes/locations. Also I do not need EPIB or PS info.
The configuration successfully completes but none of the stream packets are received, the FDQ is always full and RxQueue is always empty on this port!
Also, one minor thing I found, and maybe it is because I have done something incorrectly, is if you configure the linkram as follows (which is like the QMMS InfrastructureMode example) :
/* Use internal linking RAM */
qmssInitConfig.linkingRAM0Base = (UInt32)&g_image_lram[0];
qmssInitConfig.linkingRAM0Size = ((NUM_HOST_DESC + NUM_IMAGE_HOST_DESC));
qmssInitConfig.linkingRAM1Base = 0;
qmssInitConfig.maxDescNum = (NUM_HOST_DESC + NUM_IMAGE_HOST_DESC);
But if ((NUM_HOST_DESC + NUM_IMAGE_HOST_DESC)) is greater than the internal link ram size it will error out. Even though I am using an external mem region. In qmmss_drv, function Qmss_init(), this is the line causing the problem:
/* Check if LinkingRAM0 can hold all the descriptors if LinkingRAM1 is NULL */
if (initCfg->linkingRAM1Base == 0)
So I just set
qmssInitConfig.linkingRAM1Base = 1;
and it is happy.
Reading the linkram memory area that pertains to the NUM_IMAGE_HOST_DESC (my stream port config), the index entries all have a value of 0x80000 + index. I was wondering if that 0x80000 indicates some configuration issue?