diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2021-03-17 14:26:30 +0800 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2021-03-22 17:34:31 +0800 |
commit | d4c6293041ee7941191a91e4ca2d2af4b0959599 (patch) | |
tree | 6aa161b648eb629e2cae8ceffad5a1a198c45f6d /hw/net/virtio-net.c | |
parent | 969e50b61a285b0cc8dea6d4d2ade3f758d5ecc7 (diff) | |
download | qemu-d4c6293041ee7941191a91e4ca2d2af4b0959599.zip qemu-d4c6293041ee7941191a91e4ca2d2af4b0959599.tar.gz qemu-d4c6293041ee7941191a91e4ca2d2af4b0959599.tar.bz2 |
hw/net: virtio-net: Initialize nc->do_not_pad to true
For virtio-net, there is no need to pad the Ethernet frame size to
60 bytes before sending to it.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'hw/net/virtio-net.c')
-rw-r--r-- | hw/net/virtio-net.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 96a3cc8..66b9ff4 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -3314,6 +3314,10 @@ static void virtio_net_device_realize(DeviceState *dev, Error **errp) object_get_typename(OBJECT(dev)), dev->id, n); } + for (i = 0; i < n->max_queues; i++) { + n->nic->ncs[i].do_not_pad = true; + } + peer_test_vnet_hdr(n); if (peer_has_vnet_hdr(n)) { for (i = 0; i < n->max_queues; i++) { |