]> Git Repo - qemu.git/commit
vmxnet3: Fix incorrect small packet padding
authorBrian Kress <[email protected]>
Tue, 23 Jun 2015 15:49:25 +0000 (11:49 -0400)
committerStefan Hajnoczi <[email protected]>
Tue, 7 Jul 2015 12:10:26 +0000 (13:10 +0100)
commitb83b5f2ef9753713c2fb64ff4cae7cb1e080624e
tree80f91c01a7ce5080df54288dce1c4ecb54600138
parent5df6a1855b62dc653515d919e48c5b6f00c48f32
vmxnet3: Fix incorrect small packet padding

When running ESXi under qemu there is an issue with the ESXi guest
discarding packets that are too short.  The guest discards any packets
under the normal minimum length for an ethernet packet (60).  This
results in odd behaviour where other hosts or VMs on other hosts can
communicate with the ESXi guest just fine (since there's a physical NIC
somewhere doing padding), but VMs on the host and the host itself cannot
because the ARP request packets are too small for the ESXi host to
accept.

Someone in the past thought this was worth fixing, and added code to the
vmxnet3 qemu emulation such that if it is receiving packets smaller than
60 bytes to pad the packet out to 60. Unfortunately this code is wrong
(or at least in the wrong place). It does so BEFORE before taking into
account the vnet_hdr at the front of the packet added by the tap device.
As a result, it might add padding, but it never adds enough.
Specifically it adds 10 less (the length of the vnet_hdr) than it needs
to.

The following (hopefully "obviously correct") patch simply swaps the
order of processing the vnet header and the padding.  With this patch an
ESXi guest is able to communicate with the host or other local VMs.

Signed-off-by: Brian Kress <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Reviewed-by: Dmitry Fleytman <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
hw/net/vmxnet3.c
This page took 0.022513 seconds and 4 git commands to generate.