mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
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>
This commit is contained in:
parent
3ccc6489dd
commit
e1afd5ee6e
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue