Searched hist:"322 fd48afbed1ef7b834ac343a0c8687bcb33695" (Results 1 – 1 of 1) sorted by relevance
/qemu/hw/net/ |
H A D | e1000.c | 322fd48afbed1ef7b834ac343a0c8687bcb33695 Tue Feb 15 16:27:55 UTC 2011 Michael S. Tsirkin <mst@redhat.com> e1000: verify we have buffers, upfront
The spec says: Any descriptor with a non-zero status byte has been processed by the hardware, and is ready to be handled by the software.
Thus, once we change a descriptor status to non-zero we should never move the head backwards and try to reuse this descriptor from hardware.
This actually happened with a multibuffer packet that arrives when we don't have enough buffers.
Fix by checking that we have enough buffers upfront so we never need to discard the packet midway through.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Alex Williamson <alex.williamson@redhat.com> Acked-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
|