[virtio] Use separate RX and TX empty header buffers
authorMichael Brown <mcb30@ipxe.org>
Mon, 23 Jan 2017 13:23:31 +0000 (13:23 +0000)
committerMichael Brown <mcb30@ipxe.org>
Mon, 23 Jan 2017 13:27:26 +0000 (13:27 +0000)
commit0dc4814ca83b8b7ca226c4a9c4bdcc050af2882b
tree4a8a98344a3d814acd651154f7f90be0ed7ace99
parentb6f524388ba5a02cf95ffa3fb3bfd5f0feae7bb6
[virtio] Use separate RX and TX empty header buffers

Some host implementations (notably Google Compute Platform) are known
to unconditionally write back VIRTIO_NET_HDR_F_DATA_VALID to
header->flags for received packets, regardless of the features
negotiated by the driver.  This breaks the transmit datapath by
effectively setting an illegal flag for all subsequent transmitted
packets.

Work around this problem by using separate empty header buffers for
the receive and transmit queues.

Debugged-by: Ladi Prosek <lprosek@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/net/virtio-net.c