diff options
author | Daniel P. Berrangé <berrange@redhat.com> | 2025-06-10 13:36:58 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2025-06-12 13:40:15 -0400 |
commit | e1afd5ee6eb2954f4baf3c97820e4aaf7de97d2a (patch) | |
tree | 43c76f284f4c53e2746963063844422ff233e8e1 | |
parent | 3ccc6489dd4925ddd1f3066bd3751389169cd7aa (diff) | |
download | qemu-e1afd5ee6eb2954f4baf3c97820e4aaf7de97d2a.zip qemu-e1afd5ee6eb2954f4baf3c97820e4aaf7de97d2a.tar.gz qemu-e1afd5ee6eb2954f4baf3c97820e4aaf7de97d2a.tar.bz2 |
hw/net/tulip: skip automatic zero-init of large array
The 'tulip_setup_frame' method has a 4k byte array used for copynig
DMA data from the device. Skip the automatic zero-init of this array
to eliminate the performance overhead in the I/O hot path.
The 'buf' array will be fully initialized when reading data from the
device.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20250610123709.835102-21-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
-rw-r--r-- | hw/net/tulip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/net/tulip.c b/hw/net/tulip.c index 63fe513..319af90 100644 --- a/hw/net/tulip.c +++ b/hw/net/tulip.c @@ -629,7 +629,7 @@ static void tulip_setup_filter_addr(TULIPState *s, uint8_t *buf, int n) static void tulip_setup_frame(TULIPState *s, struct tulip_descriptor *desc) { - uint8_t buf[4096]; + QEMU_UNINITIALIZED uint8_t buf[4096]; int len = (desc->control >> TDES1_BUF1_SIZE_SHIFT) & TDES1_BUF1_SIZE_MASK; int i; |