* [PATCH] hw/net: Changing log error to trace message
@ 2024-10-14 18:48 Roque Arcudia Hernandez
2024-10-30 16:51 ` Roque Arcudia Hernandez
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Roque Arcudia Hernandez @ 2024-10-14 18:48 UTC (permalink / raw)
To: kfting, wuhaotsh, jasowang, qemu-arm
Cc: qemu-devel, Nabih Estefan, Roque Arcudia Hernandez
From: Nabih Estefan <nabihestefan@google.com>
Converting error to trace message to avoid spamming of message when
there is nothing to transmit.
Signed-off-by: Nabih Estefan <nabihestefan@google.com>
Signed-off-by: Roque Arcudia Hernandez <roqueh@google.com>
---
hw/net/npcm_gmac.c | 5 ++---
hw/net/trace-events | 1 +
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/net/npcm_gmac.c b/hw/net/npcm_gmac.c
index 6fa6bece61..685905f9e2 100644
--- a/hw/net/npcm_gmac.c
+++ b/hw/net/npcm_gmac.c
@@ -546,9 +546,8 @@ static void gmac_try_send_next_packet(NPCMGMACState *gmac)
/* 1 = DMA Owned, 0 = Software Owned */
if (!(tx_desc.tdes0 & TX_DESC_TDES0_OWN)) {
- qemu_log_mask(LOG_GUEST_ERROR,
- "TX Descriptor @ 0x%x is owned by software\n",
- desc_addr);
+ trace_npcm_gmac_tx_desc_owner(DEVICE(gmac)->canonical_path,
+ desc_addr);
gmac->regs[R_NPCM_DMA_STATUS] |= NPCM_DMA_STATUS_TU;
gmac_dma_set_state(gmac, NPCM_DMA_STATUS_TX_PROCESS_STATE_SHIFT,
NPCM_DMA_STATUS_TX_SUSPENDED_STATE);
diff --git a/hw/net/trace-events b/hw/net/trace-events
index 4c6687923e..bb8f59cf23 100644
--- a/hw/net/trace-events
+++ b/hw/net/trace-events
@@ -476,6 +476,7 @@ npcm_gmac_packet_received(const char* name, uint32_t len) "%s: Reception finishe
npcm_gmac_packet_sent(const char* name, uint16_t len) "%s: TX packet sent!, length: 0x%04" PRIX16
npcm_gmac_debug_desc_data(const char* name, void* addr, uint32_t des0, uint32_t des1, uint32_t des2, uint32_t des3)"%s: Address: %p Descriptor 0: 0x%04" PRIX32 " Descriptor 1: 0x%04" PRIX32 "Descriptor 2: 0x%04" PRIX32 " Descriptor 3: 0x%04" PRIX32
npcm_gmac_packet_tx_desc_data(const char* name, uint32_t tdes0, uint32_t tdes1) "%s: Tdes0: 0x%04" PRIX32 " Tdes1: 0x%04" PRIX32
+npcm_gmac_tx_desc_owner(const char* name, uint32_t desc_addr) "%s: TX Descriptor @0x%04" PRIX32 " is owned by software"
# npcm_pcs.c
npcm_pcs_reg_read(const char *name, uint16_t indirect_access_baes, uint64_t offset, uint16_t value) "%s: IND: 0x%02" PRIx16 " offset: 0x%04" PRIx64 " value: 0x%04" PRIx16
--
2.47.0.rc1.288.g06298d1525-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] hw/net: Changing log error to trace message
2024-10-14 18:48 [PATCH] hw/net: Changing log error to trace message Roque Arcudia Hernandez
@ 2024-10-30 16:51 ` Roque Arcudia Hernandez
2024-10-30 18:52 ` Philippe Mathieu-Daudé
2024-11-04 14:04 ` Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Roque Arcudia Hernandez @ 2024-10-30 16:51 UTC (permalink / raw)
To: kfting, wuhaotsh, jasowang, qemu-arm; +Cc: qemu-devel, Nabih Estefan
Hello,
Is there any feedback for this patch?
Thanks
Roque
On Mon, Oct 14, 2024 at 11:49 AM Roque Arcudia Hernandez
<roqueh@google.com> wrote:
>
> From: Nabih Estefan <nabihestefan@google.com>
>
> Converting error to trace message to avoid spamming of message when
> there is nothing to transmit.
>
> Signed-off-by: Nabih Estefan <nabihestefan@google.com>
> Signed-off-by: Roque Arcudia Hernandez <roqueh@google.com>
> ---
> hw/net/npcm_gmac.c | 5 ++---
> hw/net/trace-events | 1 +
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/hw/net/npcm_gmac.c b/hw/net/npcm_gmac.c
> index 6fa6bece61..685905f9e2 100644
> --- a/hw/net/npcm_gmac.c
> +++ b/hw/net/npcm_gmac.c
> @@ -546,9 +546,8 @@ static void gmac_try_send_next_packet(NPCMGMACState *gmac)
>
> /* 1 = DMA Owned, 0 = Software Owned */
> if (!(tx_desc.tdes0 & TX_DESC_TDES0_OWN)) {
> - qemu_log_mask(LOG_GUEST_ERROR,
> - "TX Descriptor @ 0x%x is owned by software\n",
> - desc_addr);
> + trace_npcm_gmac_tx_desc_owner(DEVICE(gmac)->canonical_path,
> + desc_addr);
> gmac->regs[R_NPCM_DMA_STATUS] |= NPCM_DMA_STATUS_TU;
> gmac_dma_set_state(gmac, NPCM_DMA_STATUS_TX_PROCESS_STATE_SHIFT,
> NPCM_DMA_STATUS_TX_SUSPENDED_STATE);
> diff --git a/hw/net/trace-events b/hw/net/trace-events
> index 4c6687923e..bb8f59cf23 100644
> --- a/hw/net/trace-events
> +++ b/hw/net/trace-events
> @@ -476,6 +476,7 @@ npcm_gmac_packet_received(const char* name, uint32_t len) "%s: Reception finishe
> npcm_gmac_packet_sent(const char* name, uint16_t len) "%s: TX packet sent!, length: 0x%04" PRIX16
> npcm_gmac_debug_desc_data(const char* name, void* addr, uint32_t des0, uint32_t des1, uint32_t des2, uint32_t des3)"%s: Address: %p Descriptor 0: 0x%04" PRIX32 " Descriptor 1: 0x%04" PRIX32 "Descriptor 2: 0x%04" PRIX32 " Descriptor 3: 0x%04" PRIX32
> npcm_gmac_packet_tx_desc_data(const char* name, uint32_t tdes0, uint32_t tdes1) "%s: Tdes0: 0x%04" PRIX32 " Tdes1: 0x%04" PRIX32
> +npcm_gmac_tx_desc_owner(const char* name, uint32_t desc_addr) "%s: TX Descriptor @0x%04" PRIX32 " is owned by software"
>
> # npcm_pcs.c
> npcm_pcs_reg_read(const char *name, uint16_t indirect_access_baes, uint64_t offset, uint16_t value) "%s: IND: 0x%02" PRIx16 " offset: 0x%04" PRIx64 " value: 0x%04" PRIx16
> --
> 2.47.0.rc1.288.g06298d1525-goog
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] hw/net: Changing log error to trace message
2024-10-14 18:48 [PATCH] hw/net: Changing log error to trace message Roque Arcudia Hernandez
2024-10-30 16:51 ` Roque Arcudia Hernandez
@ 2024-10-30 18:52 ` Philippe Mathieu-Daudé
2024-11-04 14:04 ` Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-10-30 18:52 UTC (permalink / raw)
To: Roque Arcudia Hernandez, kfting, wuhaotsh, jasowang, qemu-arm
Cc: qemu-devel, Nabih Estefan
On 14/10/24 15:48, Roque Arcudia Hernandez wrote:
> From: Nabih Estefan <nabihestefan@google.com>
>
> Converting error to trace message to avoid spamming of message when
> there is nothing to transmit.
>
> Signed-off-by: Nabih Estefan <nabihestefan@google.com>
> Signed-off-by: Roque Arcudia Hernandez <roqueh@google.com>
> ---
> hw/net/npcm_gmac.c | 5 ++---
> hw/net/trace-events | 1 +
> 2 files changed, 3 insertions(+), 3 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] hw/net: Changing log error to trace message
2024-10-14 18:48 [PATCH] hw/net: Changing log error to trace message Roque Arcudia Hernandez
2024-10-30 16:51 ` Roque Arcudia Hernandez
2024-10-30 18:52 ` Philippe Mathieu-Daudé
@ 2024-11-04 14:04 ` Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2024-11-04 14:04 UTC (permalink / raw)
To: Roque Arcudia Hernandez
Cc: kfting, wuhaotsh, jasowang, qemu-arm, qemu-devel, Nabih Estefan
On Mon, 14 Oct 2024 at 19:50, Roque Arcudia Hernandez <roqueh@google.com> wrote:
>
> From: Nabih Estefan <nabihestefan@google.com>
>
> Converting error to trace message to avoid spamming of message when
> there is nothing to transmit.
>
> Signed-off-by: Nabih Estefan <nabihestefan@google.com>
> Signed-off-by: Roque Arcudia Hernandez <roqueh@google.com>
> ---
> hw/net/npcm_gmac.c | 5 ++---
> hw/net/trace-events | 1 +
> 2 files changed, 3 insertions(+), 3 deletions(-)
Applied to target-arm.next, thanks, with the commit message
tweaked to:
hw/net/npcm_gmac: Change error log to trace event
Convert the LOG_GUEST_ERROR for the "tx descriptor is owned
by software" to a trace message. This condition is normal
when there is there is nothing to transmit, and we would
otherwise spam the logs with it in that situation.
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-11-04 14:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-14 18:48 [PATCH] hw/net: Changing log error to trace message Roque Arcudia Hernandez
2024-10-30 16:51 ` Roque Arcudia Hernandez
2024-10-30 18:52 ` Philippe Mathieu-Daudé
2024-11-04 14:04 ` Peter Maydell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).