sob., 19 paź 2019 o 20:26 kumaraparameshwaran rathinavel <kumaraparames...@gmail.com> napisał(a): > > Hi All, > > In the ENA poll mode driver I see that every request in the admin queue is > associated with a completion context and this is preallocated during the > device initialisation. When the completion context is used we check for > occupied to be true in the 16.X version if the occupied flag is set to true > we assert and in the latest version I see that this is an error log. But > there is a time window where if the completion context would be available > to the other consumer but still the old consumer did not set the occupied > to false. The new consumer holds the admin queue lock to get the completion > context but the update by the old consumer to set the the occupied flag is > not done under lock. So should we make sure that the new consumer should > get the completion context only when the occupied flag is set to false. Any > thoughts on this?
Hi Param, Both the producer and the consumer are holding the spinlock while getting the completion context. If you see any situation where it isn't (besides the release function), please let me know. As it is protected by the lock, returning error while completion context is occupied (and it shouldn't) it fine, as it will stop the admin queue and allow the DPDK user application to execute the reset of the device. Thanks, Michal > If required I can try to make a patch where the completion context would be > available only after setting the occupied flag to false. > > Thanks, > Param.