]> git.proxmox.com Git - qemu.git/commit
net: fix usbnet_receive() packet drops
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Fri, 24 Aug 2012 12:37:29 +0000 (13:37 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Fri, 12 Oct 2012 02:44:18 +0000 (21:44 -0500)
commitd8f481188025e56c229e3fd41afa1d17f9e0cff0
tree0e0d279aea05d3d0d82c8f454c5e396187984d40
parent2747a3eee3d679bdffd35dc5bfa970fd80c4969e
net: fix usbnet_receive() packet drops

The USB network interface has a single buffer which the guest reads
from.  This patch prevents multiple calls to usbnet_receive() from
clobbering the input buffer.  Instead we queue packets until buffer
space becomes available again.

This is inspired by virtio-net and e1000 rxbuf handling.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
(cherry picked from commit 190563f9a90c9df8ad32fc7f3e4b166deda949a6)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/usb/dev-network.c