Hi Ti Folks,
I have series of following questions on the Test10 of the PAUnitTest [IPV4 Fragmentation and Re-assembly]
1. what is the bug which is talked in this test10.c comments ??
#ifndef SIMULATOR_SUPPORT
/* There is a pending simulator timing prroblem. To be enabled after the simulator bug is fixed */
if ((j == (fragCnt - 1)) && (i == (mid -1)))
{
2. In the OuterIP fragmentation re-assembly code, is this always expected to ONLY work with 2 Streams of data [in other words, 2 traffic flows ] ?? ofcourse in example, the max traffic flows configured is two, so my question is, is this example can support only 2 or can go less also...[i mean single traffic flow case]?
/* Process OutIp fragments */
if (t10RxFrags(tencap, tencap->tf->QGen[Q_IP_REASSM1], tencap->tf->QPaTx[1], &expCount))
{
return (-1);
}
In other words, Is this example code DESIGNED ONLY FOR TWO Traffic flows at any given time. At every Send and Receive for 10 times
for (k = 0; k < T10_NUM_PACKET_GROUPS; k+=2)
{
for (i = 0; i < 2; i++) // Here two different streams of UDP packets are generated/Sent/Transmitted [Note: - each stream of packets has a UNIQUE IDENTIFICATION Field]
{
t10SendDataPkts (&t10Encap, paT10NumTestPkts, k + i, i == 0);
}
if (t10ReceiveDataPkts (&t10Encap, paT10NumTestPkts * i))
{
System_printf ("%s (%s:%d): Receive packets fail\n", tfName, __FILE__, __LINE__);
t10Cleanup (&t10Encap, PA_TEST_FAILED);
}
}
3. Elaborating more on point 2, if i make the FOR LOOP to iterate only ONCE, though the pa_control is for two traffic flows. only one stream of udp packets are sent [In other words, all UDP packets belong to same IDENTIFICATION FIELD]
for (i = 0; i < 1; i++) //
i see the code failing to reassemble the packet. I assume this is a bug in the example code.? please comment...
4. the assembly code fails for just two packet fragmented packets, both having same IDENTIFICATION FIELD.
Please confirm if this is fixed or any new example is provided in newer versions of PDK example projects [i am using PDK 21 Package]
5. if the FOR loop, is made for 1 iteration [Here i will talk about only first 2 Receives/Iterations of 10 Iterations]. In second iteration, there are ONLY two packets to be reassembled and the code fails in doing so.
Fragment Count 4 ===== first receive
protocol 17,id 0,saddr 9eda6d0b,daddr c8c9ca64
protocol 17,id 0,saddr 9eda6d0b,daddr c8c9ca64
protocol 17,id 0,saddr 9eda6d0b,daddr c8c9ca64
protocol 17,id 0,saddr 9eda6d0b,daddr c8c9ca64
Fragment Count 2 ===== second receive
protocol 17,id 0,saddr 9eda6d21,daddr c8c9ca66
protocol 17,id 0,saddr 9eda6d21,daddr c8c9ca66
Please check the second receive, at this below piece of code, that IF LOOP has to pass this condition and this doesn't pass and also the there is NO REASSEMBLED packet being pushed onto the qmss queue 641 [as the condition is never met (if(pReassemblyInfo)) ]
/* Check if the reassembly is complete? */
if (pIPReassemblyBlock->orignalLen == pIPReassemblyBlock->detectedLen)
if(pReassemblyInfo)
{
/* Reassembly packet is ready */
reassembledHd = pReassemblyInfo->pHostDesc;
ipHdr = (uint8_t *)(reassembledHd->buffPtr + ipOffset);
Also please let me know if any further issues/bugs were reported in this example, so that i can take care of those in my implementation.
Thanks
RC Reddy