4521900526
This commit fixes a bug in which, when the sw PMD is reconfigured, it would leave stale IQ chunk pointers in each queue's IQ structure. Now, the PMD initializes all IQs at eventdev start time and releases all IQ chunk pointers at eventdev stop time (which has the consequence that any events in a queue when the eventdev is stopped will be lost). This approach should be resilient to any reconfiguration done between the stop and start, such as adding or removing queues. This commit also fixes two potential issues in iq_chunk.h. iq_init() now initializes the IQ's count field to 0, and iq_dequeue_burst() sets iq->head to the appropriate next pointer. Fixes: dca926ca9faa ("event/sw: use dynamically-sized IQs") Reported-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com> Signed-off-by: Gage Eads <gage.eads@intel.com> Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com> Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>