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: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v1 01/12] net: Add a hub net client
Date: Mon, 12 Mar 2012 10:12:59 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1

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.

Paolo



reply via email to

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