qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: sai pavan <saipavanboddu@gmail.com>
Cc: "qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
	crosthwaite.peter@gmail.com
Subject: Re: [Qemu-devel] Connecting netdev to emulated nics.
Date: Tue, 20 Oct 2015 10:49:14 +0800	[thread overview]
Message-ID: <5625ABAA.3010300@redhat.com> (raw)
In-Reply-To: <CAH1YCKdoMmH9R-pyZ20s_ekH78rUqp5aeR3693JqGBqhky-7KQ@mail.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 <jasowang@redhat.com> 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 <jasowang@redhat.com> 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

      parent reply	other threads:[~2015-10-20  2:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-15  6:36 [Qemu-devel] Connecting netdev to emulated nics sai pavan
2015-10-15  9:14 ` Jason Wang
2015-10-16  5:15   ` sai pavan
2015-10-16  7:37     ` Jason Wang
2015-10-16 12:24       ` sai pavan
2015-10-16 15:18         ` Peter Crosthwaite
2015-10-20  3:01           ` Jason Wang
2015-10-20  2:49         ` Jason Wang [this message]

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=5625ABAA.3010300@redhat.com \
    --to=jasowang@redhat.com \
    --cc=crosthwaite.peter@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=saipavanboddu@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).