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.
Hi ,
I have connected my c66x board to an external PC through an Ethernet cable. Am streaming UDP packets to the broad through VLC application .
I face a packet loss on the number of packet read from the pHostDesc. Please find the VerifyPacket() code snippet below, here am copying the data packets from the pHostDesc to my local circular queue( GigeRxDataBufQ[tgigeRxQHeadPtr].ReceivePacketBuffer[index1] ) .
I have following questions :
1) When copying the data from pHostDesc* to a circular buffer, if a new ISR is generated will the data be overwritten in the pHostDesc ?
2) if YES , is there any mechanism to resolve the issue ?
Int32 VerifyPacket (Cppi_Desc* pCppiDesc) { Cppi_HostDesc *pHostDesc; UInt8 *pDataBuffer; UInt32 infoLen; pasahoLongInfo_t *pinfo; UInt8 portNum; int index1; pHostDesc = (Cppi_HostDesc *)pCppiDesc; /* Verify the application software info we received is same * as what we had sent earlier. */ if (pHostDesc->softwareInfo0 != 0xaaaaaaaa) { System_printf ("VerifyPacket: Found an entry in receive queue with swinfo0 = 0x%08x, expected 0x%08x\n", pHostDesc->softwareInfo0, 0xaaaaaaaa); pHostDesc->buffLen = pHostDesc->origBufferLen; Qmss_queuePush (gRxFreeQHnd, (Ptr)pHostDesc, pHostDesc->buffLen, SIZE_HOST_DESC, Qmss_Location_TAIL); return -1; } /* Get the parse information, make sure there is an L4 offset */ if (Cppi_getPSData (Cppi_DescType_HOST, Cppi_PSLoc_PS_IN_DESC, (Cppi_Desc *)pHostDesc, (UInt8 **)&pinfo, &infoLen) != CPPI_SOK) { System_printf ("VerifyPacket: Error getting control info from received data packet\n"); return (-1); } else if(!cpswSimTest) { /* Verify the input port number */ portNum = PASAHO_LINFO_READ_INPORT(pinfo); if (portNum != pa_EMAC_PORT_1) { System_printf ("VerifyPacket: receive packet from unexpected EMAC PORT %d (expected %d)\n", portNum - 1, pa_EMAC_PORT_1 - 1); System_flush(); } } /* Verify the packet matches what we had sent */ pDataBuffer = (UInt8 *) pHostDesc->buffPtr; GigeRxDataBufQ[tgigeRxQHeadPtr].ReceivePacketLength=(int) pHostDesc->buffLen; for(index1=0 ; index1 < pHostDesc->buffLen ;index1++) { GigeRxDataBufQ[tgigeRxQHeadPtr].ReceivePacketBuffer[index1] = pDataBuffer[index1]; } tgigeRxQHeadPtr = (Uint32)(tgigeRxQHeadPtr + 1) % GIGE_RX_QUEUE_LIMIT; tgigeRcvPktCount++; /* Reset the buffer lenght and put the descriptor back on the free queue */ pHostDesc->buffLen = pHostDesc->origBufferLen; Qmss_queuePush (gRxFreeQHnd, (Ptr)pHostDesc, pHostDesc->buffLen, SIZE_HOST_DESC, Qmss_Location_TAIL); /* Verify packet done. Return success. */ return 0; }
CCS Version : 5.5
MCSDK version : 2.2.1.03
SYSBIOS version : 6.35.4.50
IPC version : 1.25.03.15
Compiler : c6000_7.4.4
thank you ,
Regards ,
Vinodh