Fix virtio net handling of the header.
authorGan Shun <ganshun@gmail.com>
Thu, 17 Nov 2016 18:49:18 +0000 (10:49 -0800)
committerBarret Rhoden <brho@cs.berkeley.edu>
Sun, 20 Nov 2016 20:51:03 +0000 (15:51 -0500)
commit24f29c1568ab18e3c7e8e9e2031b8184857fc6b3
tree1b83b9ff970f3f6576f3955b7473428eda6a9e04
parent7e9610ff3a9e95f4774a09b29db231bf9321a8f6
Fix virtio net handling of the header.

We weren't stripping the header off correctly, and we didn't handle the
case where the guest would use a separate iov for the virtio net header.
This commit properly finds the offset where the ethernet frame begins
and writes that to the NIC.

Signed-off-by: Gan Shun <ganshun@gmail.com>
Change-Id: I6a2ad870d00752a60386bfde8b7b01287f95899d
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
user/vmm/virtio_net.c