qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Connecting netdev to emulated nics.


From: Jason Wang
Subject: Re: [Qemu-devel] Connecting netdev to emulated nics.
Date: Fri, 16 Oct 2015 15:37:27 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0


On 10/16/2015 01:15 PM, sai pavan wrote:
> +Peter
>
> Hi Jason,
>
> On Thu, Oct 15, 2015 at 2:44 PM, Jason Wang <address@hidden> 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.

>
> Regards,
> Sai Pavan
>
>>> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]