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

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

 



On Mon, Mar 12, 2012 at 5:12 PM, Paolo Bonzini <pbonzini@xxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux