From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46295) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoMzL-0000jX-JN for qemu-devel@nongnu.org; Mon, 19 Oct 2015 22:49:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZoMzI-0001PL-3X for qemu-devel@nongnu.org; Mon, 19 Oct 2015 22:49:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46589) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoMzH-0001PH-U1 for qemu-devel@nongnu.org; Mon, 19 Oct 2015 22:49:20 -0400 References: <561F6E77.6060902@redhat.com> <5620A937.7040506@redhat.com> From: Jason Wang Message-ID: <5625ABAA.3010300@redhat.com> Date: Tue, 20 Oct 2015 10:49:14 +0800 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Connecting netdev to emulated nics. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: sai pavan Cc: "qemu-devel@nongnu.org Developers" , crosthwaite.peter@gmail.com On 10/16/2015 08:24 PM, sai pavan wrote: > Hi Jason, > > On Fri, Oct 16, 2015 at 1:07 PM, Jason Wang wrote: >> > >> > >> > On 10/16/2015 01:15 PM, sai pavan wrote: >>> >> +Peter >>> >> >>> >> Hi Jason, >>> >> >>> >> On Thu, Oct 15, 2015 at 2:44 PM, Jason Wang wrote: >>>> >>> >>>> >>> On 10/15/2015 02:36 PM, sai pavan wrote: >>>>> >>>> Hi, >>>>> >>>> >>>>> >>>> I am debugging an issue, where through one of the nics I am not able >>>>> >>>> to connect to dtcp. >>>>> >>>> So to dig in deep, i was going thought net.c files, and ended-up >>>>> >>>> understanding little. >>>>> >>>> >>>>> >>>> So can i know how does a netdev connects to nic. >>>>> >>>> >>>>> >>>> nd_table[] has some pointers for netdev devices. Where are this >>>>> >>>> actually instantiated ? I am missing that part of the code. >>>>> >>>> >>>>> >>>> How do the netdevs and nic's have 1-1 connections. >>>> >>> You may want to have a look at set_netdev(). >>> >> Thanks this helped to see more regarding netdev. >>> >> >>> >> one more question, there are 4 Ethernet Controllers in the soc im working on >>> >> https://github.com/qemu/qemu/blob/master/hw/arm/xlnx-zynqmp.c#L223 >>> >> >>> >> Each having configure nic and netdev internally. But only one can >>> >> automatically connect to dhcp. Each one is assigned default mac >>> >> address, Do each of the mac needs to be pre-registered with internal >>> >> dhcp.? >> > >> > I think this is because if you don't specify any net clients on cli, >> > qemu will use default network configuration that has a hub with two >> > ports, first ports is connected to a nic and second port were connected >> > to userspace network >> > (http://wiki.qemu.org/Documentation/Networking#User_Networking_.28SLIRP.29) >> > which implements dhcp. You can see the network topology through "info >> > networks" commands. >> > >> > E.g if you want to let all nics to be connected to the user networking, >> > you may want to use: >> > >> > -net nic -net nic -net nic -net nic -net user >> > >> > in your cli. > Cool, This worked. Thanks !! > > Another question, is a way we can connect a particular device to hub, > not connecting all ? You can use "vlan" parameter in this case. > Thanks, > Sai Pavan