
Currently all the rx ring descriptor contents are left intact even after these entries are processed. This can, at times, lead to stale entries being processed, if the head pointer of any ring is updated before the updated contents of the ring descriptor gets reflected in the memory. This can lead to scenarios where the host driver reads a stale value of sw_cookie, and free/unmap a currently in-use buffer, thereby leading to the hardware accessing unmapped memory region. The sw_cookie is the integral part of al the rx ring processing. Hence we always mark the sw_cookie as invalid after dequeuing an entry from the REO2SW ring. Every time we check for the validity of the sw_cookie before we try to process an entry from REO2SW ring. if the invalid bit in the sw_cookie is set, we just skip this entry and move on to the next entry in the ring. Change-Id: I0e78fa662b8ba33e64687a4dee4d1a5875ddb4bf CRs-Fixed: 2730718
The below qca6290 and qca8074 folder has c files defining functions and structures to hold target specific definitions to handle differences between chips with respect to hal. Please ensure changes get applied to all platform specific files if the fixes are generic and applicable to all the folders. qca6290 hal_6290_rx.c - rx related target specific function hal_6290_srng_table.c - holds hw srng table and hal hw reg offsets array hal_6290_tx.c - tx related target specific function qca8074 hal_8074_rx.c - rx related target specific function hal_8074_srng_table.c - holds hw srng table and hal hw reg offsets array hal_8074_tx.c - tx related target specific function