[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL V2 10/33] hw/net/tulip: Log descriptor overflows
From: |
Jason Wang |
Subject: |
[PULL V2 10/33] hw/net/tulip: Log descriptor overflows |
Date: |
Thu, 18 Jun 2020 21:21:25 +0800 |
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
Log with GUEST_ERROR what the guest is doing wrong.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
hw/net/tulip.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/hw/net/tulip.c b/hw/net/tulip.c
index 57ecbe2..4487fd6 100644
--- a/hw/net/tulip.c
+++ b/hw/net/tulip.c
@@ -578,6 +578,9 @@ static int tulip_copy_tx_buffers(TULIPState *s, struct
tulip_descriptor *desc)
int len2 = (desc->control >> TDES1_BUF2_SIZE_SHIFT) & TDES1_BUF2_SIZE_MASK;
if (s->tx_frame_len + len1 > sizeof(s->tx_frame)) {
+ qemu_log_mask(LOG_GUEST_ERROR,
+ "%s: descriptor overflow (ofs: %u, len:%d, size:%zu)\n",
+ __func__, s->tx_frame_len, len1, sizeof(s->tx_frame));
return -1;
}
if (len1) {
@@ -587,6 +590,9 @@ static int tulip_copy_tx_buffers(TULIPState *s, struct
tulip_descriptor *desc)
}
if (s->tx_frame_len + len2 > sizeof(s->tx_frame)) {
+ qemu_log_mask(LOG_GUEST_ERROR,
+ "%s: descriptor overflow (ofs: %u, len:%d, size:%zu)\n",
+ __func__, s->tx_frame_len, len2, sizeof(s->tx_frame));
return -1;
}
if (len2) {
--
2.5.0
- [PULL V2 00/33] Net patches, Jason Wang, 2020/06/18
- [PULL V2 01/33] virtio-net: implement RSS configuration command, Jason Wang, 2020/06/18
- [PULL V2 03/33] tap: allow extended virtio header with hash info, Jason Wang, 2020/06/18
- [PULL V2 02/33] virtio-net: implement RX RSS processing, Jason Wang, 2020/06/18
- [PULL V2 04/33] virtio-net: reference implementation of hash report, Jason Wang, 2020/06/18
- [PULL V2 07/33] virtio-net: align RSC fields with updated virtio-net header, Jason Wang, 2020/06/18
- [PULL V2 06/33] virtio-net: add migration support for RSS and hash report, Jason Wang, 2020/06/18
- [PULL V2 05/33] vmstate.h: provide VMSTATE_VARRAY_UINT16_ALLOC macro, Jason Wang, 2020/06/18
- [PULL V2 08/33] Fix tulip breakage, Jason Wang, 2020/06/18
- [PULL V2 10/33] hw/net/tulip: Log descriptor overflows,
Jason Wang <=
- [PULL V2 09/33] hw/net/tulip: Fix 'Descriptor Error' definition, Jason Wang, 2020/06/18
- [PULL V2 11/33] net: cadence_gem: Fix debug statements, Jason Wang, 2020/06/18
- [PULL V2 12/33] net: cadence_gem: Fix the queue address update during wrap around, Jason Wang, 2020/06/18
- [PULL V2 13/33] net: cadence_gem: Fix irq update w.r.t queue, Jason Wang, 2020/06/18
- [PULL V2 14/33] net: cadence_gem: Define access permission for interrupt registers, Jason Wang, 2020/06/18
- [PULL V2 15/33] net: cadence_gem: Set ISR according to queue in use, Jason Wang, 2020/06/18
- [PULL V2 16/33] net: cadence_gem: Move tx/rx packet buffert to CadenceGEMState, Jason Wang, 2020/06/18
- [PULL V2 18/33] net: cadence_gem: Add support for jumbo frames, Jason Wang, 2020/06/18
- [PULL V2 17/33] net: cadence_gem: Fix up code style, Jason Wang, 2020/06/18
- [PULL V2 20/33] net: cadence_gem: Update the reset value for interrupt mask register, Jason Wang, 2020/06/18