qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v1 01/12] net: Add a hub net client


From: Zhi Yong Wu
Subject: Re: [Qemu-devel] [PATCH v1 01/12] net: Add a hub net client
Date: Mon, 12 Mar 2012 20:13:11 +0800

On Mon, Mar 12, 2012 at 5:12 PM, Paolo Bonzini <address@hidden> wrote:
> Il 12/03/2012 09:59, Zhi Yong Wu ha scritto:
>>> However, then I noticed that qemu_can_send_packet is not called very
>>> much, and I do not understand why qemu_net_queue_send and
>>> qemu_net_queue_send_iov do not call qemu_can_send_packet before calling
>>> deliver/deliver_iov.
>>
>>> If they did, hubs could then do their own flow control via can_receive.
>>> When qemu_send_packet returns zero you increment a count of in-flight
>>> packets, and a sent-packet callback would decrement the same count.
>>
>> sent-packet callback is sent_cb here? i noticed that sent_cb is currently 
>> NULL.
>
> Yes.
>
>>> When the count is non-zero, can_receive returns false (and vice versa).
>>> Can you elaborate this? since can_receive is called finally by 
>>> qemu_send_packet,
>>> how can can_receive return false or true based on the count?
>
> Based on counts from the previous sends.
thanks.

I agree with your opition, but hope to get stefan's comments.
>
> Paolo



-- 
Regards,

Zhi Yong Wu



reply via email to

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