]> Git Repo - qemu.git/commit - hw/e1000.c
e1000: verify we have buffers, upfront
authorMichael S. Tsirkin <[email protected]>
Tue, 15 Feb 2011 16:27:55 +0000 (18:27 +0200)
committerAurelien Jarno <[email protected]>
Sun, 20 Feb 2011 14:18:26 +0000 (15:18 +0100)
commit322fd48afbed1ef7b834ac343a0c8687bcb33695
tree82f95b267a611b09914fa0f8b028715e2a2f1aaf
parentee912ccfa007351a62ba42bd60499769f6c02c1e
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 <[email protected]>
Acked-by: Alex Williamson <[email protected]>
Acked-by: Kevin Wolf <[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
hw/e1000.c
This page took 0.025599 seconds and 4 git commands to generate.