qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] net/tap.c: Possibly a way to stall tap input


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] net/tap.c: Possibly a way to stall tap input
Date: Fri, 2 Aug 2013 13:46:52 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Aug 01, 2013 at 07:15:54PM +0200, Jan Kiszka wrote:
> I was digging into the involved code and found something fishy:
> 
> net/tap.c:
> static void tap_send(void *opaque)
> {
>     ...
>         size = qemu_send_packet_async(&s->nc, buf, size,
>                                       tap_send_completed);
>         if (size == 0) {
>             tap_read_poll(s, false);
>         }
> 
> So, if tap_send is registered for the mainloop polling (ie. can_receive
> returned true before starting to poll) but qemu_send_packet_async
> returns 0 now as qemu_can_send_packet/can_receive happens to report
> false in the meantime, we will disable read polling. If also write
> polling is off, the fd will be completely removed from the iohandler
> list. But even if write polling remains on, I wonder what should bring
> read polling back?

This behavior seems fine to me.  Once the peer (pcnet) is able to
receive again it must flush the queue, this will re-enable
tap_read_poll().

Can you explain a bit more why this would be a problem?

Stefan



reply via email to

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