aboutsummaryrefslogtreecommitdiff
path: root/scripts/tracetool/backend/syslog.py
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2025-07-14 17:55:22 +0100
committerJason Wang <jasowang@redhat.com>2025-07-21 10:21:44 +0800
commite96a1aa6766f1b188dada3ad8d172c0fbe2f3a5f (patch)
tree07aed85d624c55ed651e73846f1df8e520b16f51 /scripts/tracetool/backend/syslog.py
parent01b327c9a609cb613da1e04c5af5f4fcc7d9c0a3 (diff)
downloadqemu-e96a1aa6766f1b188dada3ad8d172c0fbe2f3a5f.zip
qemu-e96a1aa6766f1b188dada3ad8d172c0fbe2f3a5f.tar.gz
qemu-e96a1aa6766f1b188dada3ad8d172c0fbe2f3a5f.tar.bz2
hw/net/npcm_gmac.c: Correct test for when to reallocate packet buffer
In gmac_try_send_next_packet() we have code that does "if this block of data won't fit in the buffer, reallocate it". However, the condition it uses is if ((prev_buf_size + tx_buf_len) > sizeof(buf)) where buf is a uint8_t *. This means that sizeof(buf) is always 8 bytes, and the condition will almost always be true, so we will reallocate the buffer more often than we need to. Correct the condition to test against tx_buffer_size, which is where we track how big the allocated buffer is. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'scripts/tracetool/backend/syslog.py')
0 files changed, 0 insertions, 0 deletions