From owner-freebsd-questions@FreeBSD.ORG Thu Jan 15 18:07:37 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DE8F1065674; Thu, 15 Jan 2009 18:07:37 +0000 (UTC) (envelope-from yonyossef.lists@gmail.com) Received: from rn-out-0910.google.com (rn-out-0910.google.com [64.233.170.189]) by mx1.freebsd.org (Postfix) with ESMTP id E7DB08FC24; Thu, 15 Jan 2009 18:07:36 +0000 (UTC) (envelope-from yonyossef.lists@gmail.com) Received: by rn-out-0910.google.com with SMTP id j71so1285333rne.12 for ; Thu, 15 Jan 2009 10:07:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=+55ODQ09S9HFR/14cH7nNor2JtcZ6crb90j6Ok64kUU=; b=dHwHqJHmuHLoioeluSXfewXm2dMHNIOuVCoCW6+mvhmbTPf3LtGf/MFajMpa7RLn4b rgG2ARV6dy0V0wxA06zXXx8yXJKcvtKrQLQV4bKTz3Z/FD6sMNwINhfXBZR0gB76TaLH XEW0V3ix/VgcwfheEfcD/cQHzNb7Uo1+x0Mx4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=DOcOBJ9GpYYPqsAv/7usyFDXtAx+O74purZI0kWbWSc/4mpGuhd8vBH5m2YH7a3j8p sxzMSHqALUkeVPD4TxqAhC91O+p07z7uLBu+n3h0gidRMEcPzFVzN1yd2VoynvQ/Gmak cp5QMwZSzsa+VctCSMc3ANlo/oDZk9GUYIjnc= Received: by 10.150.228.2 with SMTP id a2mr3853332ybh.149.1232042856034; Thu, 15 Jan 2009 10:07:36 -0800 (PST) Received: by 10.150.229.15 with HTTP; Thu, 15 Jan 2009 10:07:35 -0800 (PST) Message-ID: <20def4870901151007s643f6910h1f6dca058852e4b1@mail.gmail.com> Date: Thu, 15 Jan 2009 20:07:35 +0200 From: "Yony Yossef" To: "Bruce M. Simpson" In-Reply-To: <496F7618.8050809@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20def4870901140009y1f007108y92797d5f79ffac08@mail.gmail.com> <496E11B7.3010608@sepehrs.com> <000b01c9768e$745aa160$220f000a@mtl.com> <496EF30E.4010304@sepehrs.com> <000c01c976ec$87e040b0$220f000a@mtl.com> <496F34D2.7050605@FreeBSD.org> <496F4FD1.4080602@FreeBSD.org> <+b/MqS4l8z9bOD9y4AZP70mtFL0@kjaK+/sQ5DW5981v71UogZJPf/0> <496F7618.8050809@FreeBSD.org> X-Mailman-Approved-At: Thu, 15 Jan 2009 18:49:43 +0000 Cc: Liran Liss , freebsd-net@freebsd.org, Oleg Kats , "H.fazaeli" , Eitan Shefi , rea-fbsd@codelabs.ru, freebsd-questions@freebsd.org Subject: Re: howto determine network device unit number? device.hints? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2009 18:07:38 -0000 > Eygene Ryabinkin wrote: > > ... > > I wanted to stress only one point: simple 'kldunload ' and > > 'kldload ' makes devices to flip for Yony's case. > This means > > that unless some PCI hotplug stuff is here (which I don't > believe to > > be present, because no physical cards are touched and there is > > actually a small amount of PCI hotplug support in FreeBSD), no > > physical PCI devices get added or removed from the PCI > child tree. It > > looks like that something goes wrong during the PCI tree reprobe on > > the driver module loading. > > > > BTW: Thanks for looking further at the software layer first. > > VIM is a wee bit easier to use than a bus analyzer. > > Most motherboards don't support PCI geographical addressing, > so... I wager it's the network driver code which may be the > source of the problem, based on your analysis! > > If this code just doing a blind bump of an instance count and > using that as a "unit number"... well, that's OK and expected > for software virtual devices, but is counter-intuitive for > something like hardware. > > But I don't have any mtnic source, so this is pure > speculation on my part. > > > Correct me if I am wrong, but pci_driver_added from /sys/pci/pci.c > > will invoke device_get_children() to get the list of the attached > > devices, and for PCI case the list should be static. > > > > Yup, that's right. > > > I guess that when Yony will enable verbose boot and will show us > > kernel messages from two successive kldunload/kldload sequences, we > > will get some additional information about what's going on. > > > > Hopefully he will chime in... > > [bms does some google searching *before* he thinks about > throwing his toys out of the pram at the Orignal.Poster.] > > ding :-) [a light bulb above bms' head] > > So... Yony. you're writing a driver. > Maybe there's a bug in it? > That's cool, dude. > Hope it's a nice card and you plan on sharing the sweets with > the rest of the class. ;-) > > But seriously, please mention that you are writing a driver > in general questions you might ask about the whole system, > otherwise, FreeBSD volunteers will run around going "Is core > code broken?" and that's not so good for community stress > levels as a whole. > > with lemonade, > BMS Sorry for risking the whole community with a massive heart attack Bruce :) Yes, I am writing a driver and yes, it still has a bug or two I guess.. About sharing it with the rest of the class, that's something I wanted to ask you guys: what's the procedure for a 10GigE driver to apply for the FreeBSD kernel? Mellanox has started porting it's products to FreeBSD about a year ago, hoping to see our 10GigE and InfiniBand drivers inbox next year. Yony