qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-2.4 08/12] milkymist-minimac2: Flush queued


From: Michael Walle
Subject: Re: [Qemu-devel] [PATCH for-2.4 08/12] milkymist-minimac2: Flush queued packets when link comes up
Date: Wed, 15 Jul 2015 09:50:19 +0200
User-agent: Roundcube Webmail/0.9.5

Am 2015-07-14 13:07, schrieb Fam Zheng:
On Tue, 07/14 13:02, Michael Walle wrote:
Am 2015-07-14 09:53, schrieb Fam Zheng:
>Drop .can_receive and move the semantics into minimac2_rx, by returning
>0.
>
>That is once minimac2_rx returns 0, incoming packets will be queued
>until the queue is explicitly flushed. We do this when s->regs[R_STATE0]
>or s->regs[R_STATE1] is changed in minimac2_write.
>
>Signed-off-by: Fam Zheng <address@hidden>
>---
> hw/net/milkymist-minimac2.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
>diff --git a/hw/net/milkymist-minimac2.c b/hw/net/milkymist-minimac2.c
>index f06afaa..cd38a06 100644
>--- a/hw/net/milkymist-minimac2.c
>+++ b/hw/net/milkymist-minimac2.c
>@@ -303,8 +303,7 @@ static ssize_t minimac2_rx(NetClientState *nc,
>const uint8_t *buf, size_t size)
>         r_state = R_STATE1;
>         rx_buf = s->rx1_buf;
>     } else {
>-        trace_milkymist_minimac2_drop_rx_frame(buf);
>-        return size;
>+        return 0;

trace removed?

Because the frame is no longer dropped as we return 0 - it is queued and will be sent again when we do qemu_flush_queued_packets later. Should I rename the
trace point?

ah, ok. no i guess we won't need a tracepoint for that event. but please remove the tracepoint from trace-events, too.

-michael



reply via email to

[Prev in Thread] Current Thread [Next in Thread]