xen-netback: correctly schedule rate-limited queues
Add a flag to indicate if a queue is rate-limited. Test the flag in NAPI poll handler and avoid rescheduling the queue if true, otherwise we risk locking up the host. The rescheduling will be done in the timer callback function. Reported-by: Jean-Louis Dupond <jean-louis@dupond.be> Signed-off-by: Wei Liu <wei.liu2@citrix.com> Tested-by: Jean-Louis Dupond <jean-louis@dupond.be> Reviewed-by: Paul Durrant <paul.durrant@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -106,7 +106,11 @@ static int xenvif_poll(struct napi_struct *napi, int budget)
|
||||
|
||||
if (work_done < budget) {
|
||||
napi_complete_done(napi, work_done);
|
||||
xenvif_napi_schedule_or_enable_events(queue);
|
||||
/* If the queue is rate-limited, it shall be
|
||||
* rescheduled in the timer callback.
|
||||
*/
|
||||
if (likely(!queue->rate_limited))
|
||||
xenvif_napi_schedule_or_enable_events(queue);
|
||||
}
|
||||
|
||||
return work_done;
|
||||
|
||||
Reference in New Issue
Block a user