Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Aug 2012 08:13:55 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Peter Jeremy <peter@rulingia.com>
Cc:        Gustau =?iso-8859-15?q?P=E9rez_i_Querol?= <gperez@entel.upc.edu>, freebsd-stable@freebsd.org
Subject:   Re: Problem adding more than 8 network adapters
Message-ID:  <201208290813.55855.jhb@freebsd.org>
In-Reply-To: <20120829101202.GA74970@server.rulingia.com>
References:  <503C930C.3010405@entel.upc.edu> <503DE1BC.4050907@entel.upc.edu> <20120829101202.GA74970@server.rulingia.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday, August 29, 2012 6:12:02 am Peter Jeremy wrote:
> [Moving to -stable and adding jhb@ for his input]
>=20
> On 2012-Aug-29 11:32:44 +0200, Gustau P=E9rez i Querol <gperez@entel.upc.=
edu> wrote:
> >Al 29/08/2012 11:02, En/na Peter Jeremy ha escrit:
> >> On 2012-Aug-28 11:44:44 +0200, Gustau P=E9rez i Querol <gperez@entel.u=
pc.edu> wrote:
> >>>    I'm running FreeBSD 9.1 RC1/AMD64 with VirtualBox. The problem I'm
> >>> facing is that I can't use more than 8 network adapters plugged to the
> >>> virtual machine.
> >> ...
> >>>     I don't know if it's a net@ problem or maybe it is a problem with
> >>> the emulated PCI-bridge and then stable@ should be contacted. Also, I=
'm
> >>> not sure if a real machine would support more than 8 network adapters=
 or
> >>> not. Any hints would be appreciated.
> >> I don't think I've ever used more than 6 physical NICs in a host but d=
on't
> >> know of any reason for >8 to not work.
> >
> >> Can you please post a "pciconf -lv" from FreeBSD and the equivalent
> >> "lspci" from Linux.  A FreeBSD verbose boot log might also help.
> >
> >    Sure. I'm attaching them to this mail. I hope the mailing list=20
> >doesn't eat them. If it does, I will post them online and send the URL=20
> >to the mailing list.
>=20
> Ah..  lspci shows the 9th LANCE at 02:00.0.  The verbose boot shows
> FreeBSD finds pcib2 (at pci0 device 25.0) but doesn't see anything
> on that bus.  ISTR jhb@ will recognize that problem.

Silly firmware, VM, whatever it is. :)  It's buggy.

> >pcib1: <PCI-PCI bridge> at device 24.0 on pci0
> >pcib1:   domain            0
> >pcib1:   secondary bus     1
> >pcib1:   subordinate bus   2
> >pcib1:   no prefetched decode
> >pcib1:   Subtractively decoded bridge.
> >pci1: <PCI bus> on pcib1
> >pci1: domain=3D0, physical bus=3D1
> >pcib2: <PCI-PCI bridge> at device 25.0 on pci0
> >pcib2:   domain            0
> >pcib2:   secondary bus     2
> >pcib2:   subordinate bus   3
> >pcib2:   no prefetched decode
> >pcib2:   Subtractively decoded bridge.
> >pci2: <PCI bus> on pcib2
> >pci2: domain=3D0, physical bus=3D2

This is indeed the problem.  PCI bus 2 is "claimed" by both pcib1 and pcib2
since the VM author programmed the bridges incorrectly.  In this case, the
subordinate bus should be "1" and "2", not "2" and "3".  You could add a ha=
ck
to pci_pci.c to fix the subordinate bus on these bridges which should proba=
bly
fix this.

> >00:18.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f2) (=
prog-if 01 [Subtractive decode])
> >	Flags: bus master, 66MHz, fast devsel, latency 64
> >	Bus: primary=3D00, secondary=3D01, subordinate=3D01, sec-latency=3D0
> >
> >00:19.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f2) (=
prog-if 01 [Subtractive decode])
> >	Flags: bus master, 66MHz, fast devsel, latency 64
> >	Bus: primary=3D00, secondary=3D02, subordinate=3D02, sec-latency=3D0
> >	I/O behind bridge: 00001000-00001fff
> >	Memory behind bridge: 40000000-400fffff

Note here in this output (presumably from lspci under Linux?), the
subordinate bus register =3D=3D secondary bus register for each bridge.

=2D-=20
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208290813.55855.jhb>