From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60902) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmecS-0006NG-Co for qemu-devel@nongnu.org; Thu, 15 Oct 2015 05:14:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZmecM-0000eG-Sh for qemu-devel@nongnu.org; Thu, 15 Oct 2015 05:14:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34007) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmecM-0000eC-NP for qemu-devel@nongnu.org; Thu, 15 Oct 2015 05:14:34 -0400 References: From: Jason Wang Message-ID: <561F6E77.6060902@redhat.com> Date: Thu, 15 Oct 2015 17:14:31 +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 , "qemu-devel@nongnu.org Developers" 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(). > > And if my SOC has more than 1 sysbus type ethernet chips. How can i > connect each one of them from command line ? You can do this by using hubport as nic's peer e.g: -netdev hubport,id=port0,hubid=hubid -device e1000,netdev=port0 > > Regards, > Sai Pavan