From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXYAp-0002Hg-Vp for qemu-devel@nongnu.org; Thu, 24 May 2012 09:34:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SXYAj-0002Zf-F8 for qemu-devel@nongnu.org; Thu, 24 May 2012 09:33:51 -0400 Received: from thoth.sbs.de ([192.35.17.2]:27543) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXYAj-0002Z3-4y for qemu-devel@nongnu.org; Thu, 24 May 2012 09:33:45 -0400 Message-ID: <4FBE38AB.8010809@siemens.com> Date: Thu, 24 May 2012 10:33:31 -0300 From: Jan Kiszka MIME-Version: 1.0 References: <1337786045-2277-1-git-send-email-zwu.kernel@gmail.com> <1337786045-2277-14-git-send-email-zwu.kernel@gmail.com> <4FBD0525.4040107@siemens.com> <4FBE2512.50704@siemens.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 13/15] net: Remove obsolete vlan info List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Zhi Yong Wu Cc: "stefanha@linux.vnet.ibm.com" , "kvm@vger.kernel.org" , "linuxram@us.ibm.com" , "qemu-devel@nongnu.org" , "wuzhy@linux.vnet.ibm.com" , "pbonzini@redhat.com" On 2012-05-24 09:34, Zhi Yong Wu wrote: > On Thu, May 24, 2012 at 8:09 PM, Jan Kiszka wrote: >> On 2012-05-23 23:42, Zhi Yong Wu wrote: >>> On Wed, May 23, 2012 at 11:41 PM, Jan Kiszka wrote: >>>> On 2012-05-23 12:14, zwu.kernel@gmail.com wrote: >>>>> From: Zhi Yong Wu >>>>> >>>>> Signed-off-by: Zhi Yong Wu >>>>> --- >>>>> net.c | 1 - >>>>> 1 files changed, 0 insertions(+), 1 deletions(-) >>>>> >>>>> diff --git a/net.c b/net.c >>>>> index 61dc28d..8c8e703 100644 >>>>> --- a/net.c >>>>> +++ b/net.c >>>>> @@ -1079,7 +1079,6 @@ void do_info_network(Monitor *mon) >>>>> NetClientState *nc, *peer; >>>>> net_client_type type; >>>>> >>>>> - monitor_printf(mon, "Devices not on any VLAN:\n"); >>>>> QTAILQ_FOREACH(nc, &net_clients, next) { >>>>> peer = nc->peer; >>>>> type = nc->info->type; >>>> >>>> This looks suspicious - or the patch description is improvable. This is >>>> really just about removing that headline? And what about the indention >>>> of the lines printed afterward? >>> As you have known, vlan concept is replaced with hub. So i think that >>> it is more reasonable to remove this in monitor. >> >> That is true. But the output formatting is still improvable. >> >>>> >>>> It also leads me to the question how hub-based networks will be >>>> visualized on "info network", specifically when there are multiple hubs. >>>> Can you provide some more complex example of an info network output? >>> >>> (qemu) info network >>> virtio-net-pci.0: type=nic,model=virtio-net-pci,macaddr=52:54:00:12:34:56 >>> \ hub0port0: type=(null), >>> virtio-net-pci.1: type=nic,model=virtio-net-pci,macaddr=52:54:00:12:34:57 >>> \ hub1port0: type=(null), >>> hub 1 >>> port 1 peer user.1 >>> port 0 peer virtio-net-pci.1 >>> hub 0 >>> port 1 peer user.0 >>> port 0 peer virtio-net-pci.0 >> >> What about a layout like this: >> >> hub.0 >> \ virtio-net-pci.0: ... >> \ virtio-net-pci.1: ... >> \ user.0: ... >> hub.1 >> \ e1000.0: ... >> e1000.1: ... >> \ user.1: ... > For this output, we can't find which port peers with which emulated > NIC or network backend. Why? This information should be available at least in the hubs. The info network routine could call into a dumping helper of the hub to make it available for visualization. It is surely not impossible, just not as straightforward as it was so far. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux