DMA descriptors of Rx frames are being overwritten
Backgraound: I am using Ultrascale MPSoc+ hardware for Ethernet testing (GEM2 is being used presently). I have configured Rx buffer length as 512 bytes and total number of Rx buffers as 4. Extended descriptors are not being used as time stamping and 64 bit addressing is not used so only Word0 and Word 1 is used.
Testingscenario: I am sending 400 bytes initially and calling Eth_Receive API (Autosar API) to process the same frame. Next, the descriptor index gets incremented and I am sending 1236 bytes which gets updated in the subsequent 3 descriptors. Now the wrap around bit of word 0 4th descriptor is set as a result when I send 400 bytes again, the first descriptor is re-used. After this I am sending 400 bytes 3 more times.
Issue: Under such circumstance, descriptor which already contains 1236 bytes of data i.e. descriptor 1 (Start Bit is 1 and Used bit is 1) , descriptor 2 (Used bit is 1) are over written by new frames received by the GEM i.e. frames consist 400 bytes but descriptor 3 ( which also contains data of frame having length 1236 , End bit is 1 and Used bit is 1) is not over written by frames having length 400 bytes.
Question: Is this a know issue in the HW? and how GEM allows to over write the data all descriptors used bit is set to 1 (which means access of descriptor is with Application not with controller)