]> git.ipfire.org Git - thirdparty/qemu.git/commit
net: invoke callback when purging queue
authorMichael S. Tsirkin <mst@redhat.com>
Thu, 4 Sep 2014 08:39:10 +0000 (11:39 +0300)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 10 Sep 2014 14:30:58 +0000 (09:30 -0500)
commitd9c06c0d794a3729be7f9772b0ee654ddfc7f5a7
tree833e38109924e8f2689d3775774f06752ed1d320
parentf321710cd48a7623e25bc10049b5fa166bf7dd68
net: invoke callback when purging queue

devices rely on packet callbacks eventually running,
but we violate this rule whenever we purge the queue.
To fix, invoke callbacks on all packets on purge.
Set length to 0, this way callers can detect that
this happened and re-queue if necessary.

Cc: qemu-stable@nongnu.org
Cc: Jason Wang <jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit 07d8084624b3f5cbde7777849147a6a3a862e90a)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
net/queue.c