From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: [PATCH v2 00/31] Implement user mode network for kvm tools Date: Sat, 2 Jul 2011 11:02:04 +0200 Message-ID: <20110702090204.GA17482@elte.hu> References: <1309423279-3093-1-git-send-email-asias.hejun@gmail.com> <4E0D08E2.6080601@gmail.com> <4E0E9541.6040305@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Pekka Enberg , Stefan Hajnoczi , Cyrill Gorcunov , Sasha Levin , Prasad Joshi , kvm@vger.kernel.org To: Asias He Return-path: Received: from mx3.mail.elte.hu ([157.181.1.138]:48811 "EHLO mx3.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753204Ab1GBJCI (ORCPT ); Sat, 2 Jul 2011 05:02:08 -0400 Content-Disposition: inline In-Reply-To: <4E0E9541.6040305@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: * Asias He wrote: > > I don't care too much what we use as the namespace prefix but as > > a directory name tools/kvm/uip is pretty meaningless. I'd just > > move the code under tools/kvm/net to mirror what the kernel > > already has. > > I have thought about putting user mode net code in tools/kvm/net. > However, we have net code in tools/kvm/virtio as well. Is this a > problem in terms of clean code organization? > > And I think splitting the tap code in virtio/net.c into > tools/kvm/net is a good idea. Further, we can put macvtap related > code into tools/kvm/net as well. Well, tools/kvm/net/ is for all things networking - one component of which is the Ethernet transport layer (a vring based driver), which can then branch in two directions: go straight to a host-side ethernet transport facility (TUN device) or can be streamed via TCP sockets (unet). If we want to structure it more we may want to have tools/kvm/net/guest/ [handling packets to/from the guest], tools/kvm/net/host/ [handling packets to/from the host], etc. There's 3 conceptual layers here: the guest, the hypervisor and the host. Thanks, Ingo