From owner-freebsd-stable@FreeBSD.ORG Wed Aug 29 15:21:27 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 08528106566B; Wed, 29 Aug 2012 15:21:27 +0000 (UTC) (envelope-from gperez@entel.upc.edu) Received: from violet.upc.es (violet.upc.es [147.83.2.51]) by mx1.freebsd.org (Postfix) with ESMTP id 796098FC17; Wed, 29 Aug 2012 15:21:25 +0000 (UTC) Received: from ackerman2.upc.es (ackerman2.upc.es [147.83.2.244]) by violet.upc.es (8.14.1/8.13.1) with ESMTP id q7TFLOUO021152 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 29 Aug 2012 17:21:24 +0200 Received: from portgus.lan (51.Red-79-159-211.staticIP.rima-tde.net [79.159.211.51]) (authenticated bits=0) by ackerman2.upc.es (8.14.4/8.14.4) with ESMTP id q7TFLMw8003510 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 29 Aug 2012 17:21:23 +0200 Message-ID: <503E333E.4090703@entel.upc.edu> Date: Wed, 29 Aug 2012 17:20:30 +0200 From: =?ISO-8859-15?Q?Gustau_P=E9rez_i_Querol?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:14.0) Gecko/20120806 Thunderbird/14.0 MIME-Version: 1.0 To: John Baldwin References: <503C930C.3010405@entel.upc.edu> <503DE1BC.4050907@entel.upc.edu> <20120829101202.GA74970@server.rulingia.com> <201208290813.55855.jhb@freebsd.org> In-Reply-To: <201208290813.55855.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.70 on 147.83.2.244 X-Mail-Scanned: Criba 2.0 + Clamd X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (violet.upc.es [147.83.2.51]); Wed, 29 Aug 2012 17:21:24 +0200 (CEST) Cc: freebsd-stable@freebsd.org, Andriy Gapon Subject: Re: Problem adding more than 8 network adapters X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2012 15:21:27 -0000 Al 29/08/2012 14:13, En/na John Baldwin ha escrit: > On Wednesday, August 29, 2012 6:12:02 am Peter Jeremy wrote: >> [Moving to -stable and adding jhb@ for his input] >> >> On 2012-Aug-29 11:32:44 +0200, Gustau Pérez i Querol wrote: >>> Al 29/08/2012 11:02, En/na Peter Jeremy ha escrit: >>>> On 2012-Aug-28 11:44:44 +0200, Gustau Pérez i Querol 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 don'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 >>> doesn't eat them. If it does, I will post them online and send the URL >>> to the mailing list. >> 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: 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: on pcib1 >>> pci1: domain=0, physical bus=1 >>> pcib2: 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: on pcib2 >>> pci2: domain=0, physical bus=2 > 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 hack > to pci_pci.c to fix the subordinate bus on these bridges which should probably > fix this. > Reading the spec and according to the output of dmesg.verbose I do agree with your diagnosis. Both PCI-Bridges are attached to upstream PCI bus 0. And this the subordinate bus can't be bigger than the downstream bus those bridges connect to. So the subordinate buses have to be "1" and "2". I'll try to hack vbox (thanks to Andriy) code to map the subordinate bridges as they should. Thanks for the hint! Gustau -- --------------------------------------------------------------------------- Prou top-posting : http://ca.wikipedia.org/wiki/Top-posting Stop top-posting : http://en.wikipedia.org/wiki/Posting_style O O O Gustau Pérez i Querol O O O Departament d'Enginyeria Telemàtica O O O Universitat Politècnica de Catalunya Edifici C3 - Despatx S101-B UPC Campus Nord UPC C/ Jordi Girona, 1-3 08034 - Barcelona