From: Michael Walle <michael@walle.cc>
To: Fam Zheng <famz@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Peter Crosthwaite <peter.crosthwaite@xilinx.com>,
Rob Herring <robh@kernel.org>,
jasowang@redhat.com, qemu-devel@nongnu.org,
Gerd Hoffmann <kraxel@redhat.com>,
stefanha@redhat.com,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>
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 [thread overview]
Message-ID: <fa4a5ad997b6e50c008040c7cbebeabd@walle.cc> (raw)
In-Reply-To: <20150714110734.GA22250@ad.nay.redhat.com>
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 <famz@redhat.com>
>> >---
>> > 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
next prev parent reply other threads:[~2015-07-15 7:50 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-14 7:53 [Qemu-devel] [PATCH for-2.4 00/12] hw/net: Fix .can_receive() for NICs Fam Zheng
2015-07-14 7:53 ` [Qemu-devel] [PATCH for-2.4 01/12] xgmac: Drop packets with eth_can_rx is false Fam Zheng
2015-07-14 7:53 ` [Qemu-devel] [PATCH for-2.4 02/12] pcnet: Drop pcnet_can_receive Fam Zheng
2015-07-14 7:53 ` [Qemu-devel] [PATCH for-2.4 03/12] eepro100: Drop nic_can_receive Fam Zheng
2015-07-14 7:53 ` [Qemu-devel] [PATCH for-2.4 04/12] usbnet: Drop usbnet_can_receive Fam Zheng
2015-07-14 7:53 ` [Qemu-devel] [PATCH for-2.4 05/12] etsec: Move etsec_can_receive into etsec_receive Fam Zheng
2015-07-14 9:30 ` Jason Wang
2015-07-14 9:49 ` Fam Zheng
2015-07-14 7:53 ` [Qemu-devel] [PATCH for-2.4 06/12] etsec: Flush queue when rx buffer is consumed Fam Zheng
2015-07-14 9:33 ` Jason Wang
2015-07-14 9:48 ` Fam Zheng
2015-07-15 5:10 ` Jason Wang
2015-07-15 6:01 ` Fam Zheng
2015-07-15 7:38 ` Jason Wang
2015-07-15 8:04 ` Fam Zheng
2015-07-14 7:53 ` [Qemu-devel] [PATCH for-2.4 07/12] mcf_fec: Drop mcf_fec_can_receive Fam Zheng
2015-07-14 7:53 ` [Qemu-devel] [PATCH for-2.4 08/12] milkymist-minimac2: Flush queued packets when link comes up Fam Zheng
2015-07-14 11:02 ` Michael Walle
2015-07-14 11:07 ` Fam Zheng
2015-07-15 7:50 ` Michael Walle [this message]
2015-07-14 7:53 ` [Qemu-devel] [PATCH for-2.4 09/12] mipsnet: Flush queued packets when receiving is enabled Fam Zheng
2015-07-14 7:53 ` [Qemu-devel] [PATCH for-2.4 10/12] stellaris_enet: Flush queued packets when read done Fam Zheng
2015-07-14 7:53 ` [Qemu-devel] [PATCH for-2.4 11/12] dp8393x: Flush packets when link comes up Fam Zheng
2015-07-14 7:53 ` [Qemu-devel] [PATCH for-2.4 12/12] axienet: Flush queued packets when rx is done Fam Zheng
2015-07-14 8:34 ` [Qemu-devel] [PATCH for-2.4 00/12] hw/net: Fix .can_receive() for NICs Wen Congyang
2015-07-15 8:50 ` Stefan Hajnoczi
2015-07-14 14:40 ` Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fa4a5ad997b6e50c008040c7cbebeabd@walle.cc \
--to=michael@walle.cc \
--cc=edgar.iglesias@gmail.com \
--cc=famz@redhat.com \
--cc=jasowang@redhat.com \
--cc=kraxel@redhat.com \
--cc=peter.crosthwaite@xilinx.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=robh@kernel.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).