[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-discuss] How to set the network card for qemu to use?
From: |
Miroslav Rovis |
Subject: |
Re: [Qemu-discuss] How to set the network card for qemu to use? |
Date: |
Fri, 14 Oct 2016 03:11:18 +0200 |
User-agent: |
Mutt/1.7.0 (2016-08-17) |
On 161013-20:56+0200, Miroslav Rovis wrote:
...
> > > Either for pass-through (the default, the SLIRP, IIUC), or I had
> > > previously tried to set a tap0 device to a host br0, but couldn't get
> > > qemu to set the image it boots to use one of a few NIC cards.
> > >
> > > Concrete setup is three NIC cards:
> > > eth0
> > > eth1
> > > eth2
> > >
> > > And the question is simple: what -netdev options (or is there some other
> > > way?) do I use to get qemu to use eth2?
I think I should try and maybe get the NIC that I connect to internet
with to get the name eth0 instead of the above.
So here below is my quest.
---
I think I should try and get my eth0 eth1 eth2 NICs renamed somehow, so that
the eth2 (the one I connect to the internet with) become eth0 and the other
two, may they get whichever, less important (if it keep consisten over
reboots).
I have found this im my local kernel, and sure it's online as well:
https://www.kernel.org/doc/Documentation/kernel-parameters.txt
This is actual setup, automatic and consistent on every reboot, by the kernel
(where I have parameter "net.ifnames=0" witout quotes in kernel command line):
# lspci | tail -4 | head -3
04:06.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
RTL-8100/8101L/8139 PCI Fast Ethernet Adapter (rev 10)
05:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8053 PCI-E
Gigabit Ethernet Controller (rev 19)
06:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8053 PCI-E
Gigabit Ethernet Controller (rev 19)
# lspci -n | tail -4 | head -3
04:06.0 0200: 10ec:8139 (rev 10)
05:00.0 0200: 11ab:4362 (rev 19)
06:00.0 0200: 11ab:4362 (rev 19)
#
Looking up the /var/log/messages, I can see this is how they get their names
set:
Sep 30 03:31:03 g0n syslog-ng[2634]: syslog-ng starting up; version='3.4.8'
Sep 30 03:31:03 kernel: [ 0.000000] Linux version 4.7.5-hardened-160929
(address@hidden) (gcc version 5.4.0 (Gentoo Hardened 5.4.0 p1.0, pie-0.6.5) )
#1 SMP PREEMPT Thu Sep 29 17:16:42 CEST 2016
Sep 30 03:31:03 g0n kernel: [ 0.000000] Command line:
BOOT_IMAGE=/vmlinuz-4.7.5-hardened-160929 root=/dev/mapper/root ro net.ifnames=0
...[119 lines cut]...
Sep 30 03:31:03 g0n kernel: [ 0.000000] Kernel command line:
BOOT_IMAGE=/vmlinuz-4.7.5-hardened-160929 root=/dev/mapper/root ro net.ifnames=0
Sep 30 03:31:03 g0n kernel: [ 0.000000] PID hash table entries: 4096 (order:
3, 32768 bytes)
...[ 64 lines cut]...
Sep 30 03:31:03 g0n kernel: [ 0.391974] NET: Registered protocol family 16
Sep 30 03:31:03 g0n kernel: [ 0.395753] cpuidle: using governor ladder
Sep 30 03:31:03 g0n kernel: [ 0.399724] cpuidle: using governor menu
Sep 30 03:31:03 g0n kernel: [ 0.399848] node 0 link 0: io port [a000, ffff]
Sep 30 03:31:03 g0n kernel: [ 0.399850] TOM: 00000000e0000000 aka 3584M
Sep 30 03:31:03 g0n kernel: [ 0.399939] Fam 10h mmconf [mem
0xe0000000-0xefffffff]
...[ 5 lines cut]...
Sep 30 03:31:03 g0n kernel: [ 0.400099] ACPI: bus type PCI registered
Sep 30 03:31:03 g0n kernel: [ 0.400246] PCI: MMCONFIG for domain 0000 [bus
00-ff] at [mem 0xe0000000-0xefffffff] (base 0xe0000000)
Sep 30 03:31:03 g0n kernel: [ 0.400394] PCI: not using MMCONFIG
Sep 30 03:31:03 g0n kernel: [ 0.400481] PCI: Using configuration type 1 for
base access
Sep 30 03:31:03 g0n kernel: [ 0.400569] PCI: Using configuration type 1 for
extended access
...[ 27 lines cut]...
Sep 30 03:31:03 g0n kernel: [ 0.529304] PCI host bridge to bus 0000:00
...[ 117 lines cut]...
Sep 30 03:31:03 g0n kernel: [ 0.540520] pci 0000:04:06.0: [10ec:8139] type
00 class 0x020000
Sep 30 03:31:03 g0n kernel: [ 0.540537] pci 0000:04:06.0: reg 0x10: [io
0xd000-0xd0ff]
Sep 30 03:31:03 g0n kernel: [ 0.540547] pci 0000:04:06.0: reg 0x14: [mem
0xfe010000-0xfe0100ff]
Sep 30 03:31:03 g0n kernel: [ 0.540590] pci 0000:04:06.0: reg 0x30: [mem
0xfe000000-0xfe00ffff pref]
Sep 30 03:31:03 g0n kernel: [ 0.540620] pci 0000:04:06.0: supports D1 D2
Sep 30 03:31:03 g0n kernel: [ 0.540622] pci 0000:04:06.0: PME# supported
from D1 D2 D3hot D3cold
...[ 10 lines cut]...
Sep 30 03:31:03 g0n kernel: [ 0.540878] pci 0000:05:00.0: [11ab:4362] type
00 class 0x020000
Sep 30 03:31:03 g0n kernel: [ 0.540901] pci 0000:05:00.0: reg 0x10: [mem
0xfe320000-0xfe323fff 64bit]
Sep 30 03:31:03 g0n kernel: [ 0.540912] pci 0000:05:00.0: reg 0x18: [io
0xc000-0xc0ff]
Sep 30 03:31:03 g0n kernel: [ 0.540951] pci 0000:05:00.0: reg 0x30: [mem
0xfe300000-0xfe31ffff pref]
Sep 30 03:31:03 g0n kernel: [ 0.541012] pci 0000:05:00.0: supports D1 D2
Sep 30 03:31:03 g0n kernel: [ 0.541013] pci 0000:05:00.0: PME# supported
from D0 D1 D2 D3hot D3cold
Sep 30 03:31:03 g0n kernel: [ 0.541074] pci 0000:05:00.0: disabling ASPM on
pre-1.1 PCIe device. You can enable it with 'pcie_aspm=force'
Sep 30 03:31:03 g0n kernel: [ 0.541227] pci 0000:00:15.0: PCI bridge to [bus
05]
Sep 30 03:31:03 g0n kernel: [ 0.541345] pci 0000:00:15.0: bridge window
[io 0xc000-0xcfff]
Sep 30 03:31:03 g0n kernel: [ 0.541348] pci 0000:00:15.0: bridge window
[mem 0xfe300000-0xfe3fffff]
Sep 30 03:31:03 g0n kernel: [ 0.541410] pci 0000:06:00.0: [11ab:4362] type
00 class 0x020000
Sep 30 03:31:03 g0n kernel: [ 0.541434] pci 0000:06:00.0: reg 0x10: [mem
0xfe220000-0xfe223fff 64bit]
Sep 30 03:31:03 g0n kernel: [ 0.541445] pci 0000:06:00.0: reg 0x18: [io
0xb000-0xb0ff]
Sep 30 03:31:03 g0n kernel: [ 0.541484] pci 0000:06:00.0: reg 0x30: [mem
0xfe200000-0xfe21ffff pref]
Sep 30 03:31:03 g0n kernel: [ 0.541545] pci 0000:06:00.0: supports D1 D2
Sep 30 03:31:03 g0n kernel: [ 0.541546] pci 0000:06:00.0: PME# supported
from D0 D1 D2 D3hot D3cold
Sep 30 03:31:03 g0n kernel: [ 0.541605] pci 0000:06:00.0: disabling ASPM on
pre-1.1 PCIe device. You can enable it with 'pcie_aspm=force'
...[ 246 lines cut]...
Sep 30 03:31:03 g0n kernel: [ 1.024004] tun: Universal TUN/TAP device
driver, 1.6
Sep 30 03:31:03 g0n kernel: [ 1.024035] tun: (C) 1999-2004 Max Krasnyansky
<address@hidden>
Sep 30 03:31:03 g0n kernel: [ 1.024856] sky2: driver version 1.30
Sep 30 03:31:03 g0n kernel: [ 1.025741] sky2 0000:05:00.0: Yukon-2 EC chip
revision 2
Sep 30 03:31:03 g0n kernel: [ 1.026767] sky2 0000:05:00.0 eth0: addr
00:30:4f:77:7c:0a
Sep 30 03:31:03 g0n kernel: [ 1.027600] sky2 0000:06:00.0: Yukon-2 EC chip
revision 2
Sep 30 03:31:03 g0n kernel: [ 1.028695] sky2 0000:06:00.0 eth1: addr
00:30:4f:8a:2c:05
Sep 30 03:31:03 g0n kernel: [ 1.029502] 8139cp: 8139cp: 10/100 PCI Ethernet
driver v1.3 (Mar 22, 2004)
Sep 30 03:31:03 g0n kernel: [ 1.030274] 8139cp 0000:04:06.0: This (id
10ec:8139 rev 10) is not an 8139C+ compatible chip, use 8139too
Sep 30 03:31:03 g0n kernel: [ 1.031144] 8139too: 8139too Fast Ethernet
driver 0.9.28
Sep 30 03:31:03 g0n kernel: [ 1.032729] 8139too 0000:04:06.0 eth2: RealTek
RTL8139 at 0x000000000001d000, 00:0e:2e:fd:24:9c, IRQ 21
...[ 35 lines cut]...
Sep 30 04:54:28 g0n kernel: [ 1.032837] 8139too 0000:04:06.0 eth2: RealTek
RTL8139 at 0x000000000001d000, 00:0e:2e:fd:24:9c, IRQ 21
Here's the problem. The Gigabit cards (the two sky2 Yukon-2 currently at eth0
and eth0) I don't see any irq associated with them...
Looking up the kernel-parameters.txt again (repasting):
netdev= [NET] Network devices parameters
Format: <irq>,<io>,<mem_start>,<mem_end>,<name>
Note that mem_start is often overloaded to mean
something different and driver-specific.
This usage is only documented in each driver source
file if at all.
would it suffice to have just the kernel command line parameter set to get the
8139too RTL8139 to sit at eth0, and the other two will arrange with the
remaining namespace?
Like this:
netdev=21,,0x000000000001d000,,eth0
(what would I use for io and for mem_end?, so I skipped those)
?
Looking up, as the twice pasted line from kernel-parameters.txt says, the
driver source.
Hasn't changed since 2010 (it's really old hardware with stable drivers).
Here, at the time of this writing, that driver source in the kerel tree:
path: root/drivers/net/8139too.c
https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/drivers/net/8139too.c?id=497159aff6c81b61fe88463a64e7dad6f86297e3
And I can't find any help as to neither the io, nor the mem_end to use.
What do I do? (I'll wait for any replies for a little while, then I'll risk
giving the kernel the above line that I was able to put together (repasting):
netdev=21,,0x000000000001d000,,eth0
(and report back if that was, by some odd chance, successful)
Any help will be appreciated :-) !
--
Miroslav Rovis
Zagreb, Croatia
http://www.CroatiaFidelis.hr
signature.asc
Description: Digital signature
- [Qemu-discuss] How to set the network card for qemu to use?, Miroslav Rovis, 2016/10/12
- Re: [Qemu-discuss] How to set the network card for qemu to use?, Aleksei, 2016/10/13
- Re: [Qemu-discuss] How to set the network card for qemu to use?, Miroslav Rovis, 2016/10/13
- Re: [Qemu-discuss] How to set the network card for qemu to use?,
Miroslav Rovis <=
- Re: [Qemu-discuss] How to set the network card for qemu to use?, Miroslav Rovis, 2016/10/14
- Re: [Qemu-discuss] How to set the network card for qemu to use?, Aleksei, 2016/10/14
- Re: [Qemu-discuss] How to set the network card for qemu to use?, Miroslav Rovis, 2016/10/15
- Re: [Qemu-discuss] How to set the network card for qemu to use?, Miroslav Rovis, 2016/10/15
- Re: [Qemu-discuss] How to set the network card for qemu to use?, Aleksei, 2016/10/15
- Re: [Qemu-discuss] How to set the network card for qemu to use?, Miroslav Rovis, 2016/10/15
- Re: [Qemu-discuss] How to set the network card for qemu to use?, Miroslav Rovis, 2016/10/15
- Re: [Qemu-discuss] How to set the network card for qemu to use?, Miroslav Rovis, 2016/10/16
- Re: [Qemu-discuss] How to set the network card for qemu to use?, Aleksei, 2016/10/16
- Re: [Qemu-discuss] How to set the network card for qemu to use?, Miroslav Rovis, 2016/10/16