All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Zhi Yong Wu <zwu.kernel@gmail.com>
Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, aliguori@us.ibm.com,
	stefanha@linux.vnet.ibm.com, ryanh@us.ibm.com,
	linuxram@us.ibm.com, luowenj@cn.ibm.com,
	Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Subject: Re: [PATCH v1 01/12] net: Add a hub net client
Date: Mon, 12 Mar 2012 10:12:59 +0100	[thread overview]
Message-ID: <4F5DBE1B.9050803@redhat.com> (raw)
In-Reply-To: <CAEH94LjickkCPTKT9213ETQ_FwMtN5yC3GO36kq=yti6bgB3MQ@mail.gmail.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: Paolo Bonzini <pbonzini@redhat.com>
To: Zhi Yong Wu <zwu.kernel@gmail.com>
Cc: aliguori@us.ibm.com, stefanha@linux.vnet.ibm.com,
	kvm@vger.kernel.org, linuxram@us.ibm.com, qemu-devel@nongnu.org,
	ryanh@us.ibm.com, luowenj@cn.ibm.com,
	Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH v1 01/12] net: Add a hub net client
Date: Mon, 12 Mar 2012 10:12:59 +0100	[thread overview]
Message-ID: <4F5DBE1B.9050803@redhat.com> (raw)
In-Reply-To: <CAEH94LjickkCPTKT9213ETQ_FwMtN5yC3GO36kq=yti6bgB3MQ@mail.gmail.com>

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	other threads:[~2012-03-12  9:14 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-09  9:00 [PATCH v1 00/12] net: hub implemention zwu.kernel
2012-03-09  9:00 ` [Qemu-devel] " zwu.kernel
2012-03-09  9:00 ` [PATCH v1 01/12] net: Add a hub net client zwu.kernel
2012-03-09  9:00   ` [Qemu-devel] " zwu.kernel
2012-03-09 10:33   ` Paolo Bonzini
2012-03-09 10:33     ` [Qemu-devel] " Paolo Bonzini
2012-03-12  8:59     ` Zhi Yong Wu
2012-03-12  8:59       ` [Qemu-devel] " Zhi Yong Wu
2012-03-12  9:12       ` Paolo Bonzini [this message]
2012-03-12  9:12         ` Paolo Bonzini
2012-03-12 12:13         ` Zhi Yong Wu
2012-03-12 12:13           ` [Qemu-devel] " Zhi Yong Wu
2012-03-09  9:00 ` [PATCH v1 02/12] net: Use hubs for the vlan feature zwu.kernel
2012-03-09  9:00   ` [Qemu-devel] " zwu.kernel
2012-03-09  9:00 ` [PATCH v1 03/12] net: Look up 'vlan' net clients using hubs zwu.kernel
2012-03-09  9:00   ` [Qemu-devel] " zwu.kernel
2012-03-09  9:00 ` [PATCH v1 04/12] hub: Check that hubs are configured correctly zwu.kernel
2012-03-09  9:00   ` [Qemu-devel] " zwu.kernel
2012-03-09  9:00 ` [PATCH v1 05/12] net: Drop vlan argument to qemu_new_net_client() zwu.kernel
2012-03-09  9:00   ` [Qemu-devel] " zwu.kernel
2012-03-09  9:00 ` [PATCH v1 06/12] net: Remove vlan qdev property zwu.kernel
2012-03-09  9:00   ` [Qemu-devel] " zwu.kernel
2012-03-09  9:00 ` [PATCH v1 07/12] net: Remove vlan code from net.c zwu.kernel
2012-03-09  9:00   ` [Qemu-devel] " zwu.kernel
2012-03-09  9:00 ` [PATCH v1 08/12] net: Remove VLANState zwu.kernel
2012-03-09  9:00   ` [Qemu-devel] " zwu.kernel
2012-03-09  9:00 ` [PATCH v1 09/12] net: Rename non_vlan_clients to net_clients zwu.kernel
2012-03-09  9:00   ` [Qemu-devel] " zwu.kernel
2012-03-13  9:23   ` Mark Wu
2012-03-13  9:23     ` Mark Wu
2012-03-13  9:27     ` Zhi Yong Wu
2012-03-13  9:27       ` Zhi Yong Wu
2012-03-09  9:00 ` [PATCH v1 10/12] net: Rename VLANClientState to NetClientState zwu.kernel
2012-03-09  9:00   ` [Qemu-devel] " zwu.kernel
2012-03-09  9:00 ` [PATCH v1 11/12] net: Rename vc local variables to nc zwu.kernel
2012-03-09  9:00   ` [Qemu-devel] " zwu.kernel
2012-03-09  9:00 ` [PATCH v1 12/12] net: Rename qemu_del_vlan_client() to qemu_del_net_client() zwu.kernel
2012-03-09  9:00   ` [Qemu-devel] " zwu.kernel

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=4F5DBE1B.9050803@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linuxram@us.ibm.com \
    --cc=luowenj@cn.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=ryanh@us.ibm.com \
    --cc=stefanha@linux.vnet.ibm.com \
    --cc=wuzhy@linux.vnet.ibm.com \
    --cc=zwu.kernel@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.