]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/net/virtio-net: skip automatic zero-init of large arrays
authorDaniel P. Berrangé <berrange@redhat.com>
Tue, 10 Jun 2025 12:36:59 +0000 (13:36 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Thu, 12 Jun 2025 17:40:16 +0000 (13:40 -0400)
commit21cf31c51a7aeff4270c9b30b37e019c536d54b2
tree8c8c13d9237f400f434beaabc7e6a9f211bfb31f
parente1afd5ee6eb2954f4baf3c97820e4aaf7de97d2a
hw/net/virtio-net: skip automatic zero-init of large arrays

The 'virtio_net_receive_rcu' method has three arrays with
VIRTQUEUE_MAX_SIZE elements, which are apprixmately 32k in
size used for copying data between guest and host. Skip the
automatic zero-init of these arrays to eliminate the
performance overhead in the I/O hot path.

The three arrays will be selectively initialized as required
when processing network buffers.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20250610123709.835102-22-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
hw/net/virtio-net.c