Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 08 Jul 2018 09:39:48 -0600
From:      Ian Lepore <ian@freebsd.org>
To:        Mark Johnston <markj@freebsd.org>, Sean Bruno <sbruno@freebsd.org>
Cc:        Andrew Turner <andrew@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r334880 - head/sys/dev/vnic
Message-ID:  <1531064388.1336.10.camel@freebsd.org>
In-Reply-To: <20180708152621.GB18193@pesky>
References:  <201806091447.w59ElnpU026396@repo.freebsd.org> <20180707174351.GA95934@pesky> <ef680451-5750-e0cd-27b5-852fc8e74eb8@freebsd.org> <20180708152621.GB18193@pesky>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 2018-07-08 at 11:26 -0400, Mark Johnston wrote:
> On Sun, Jul 08, 2018 at 09:10:27AM -0600, Sean Bruno wrote:
> > 
> > 
> > 
> > On 07/07/18 11:43, Mark Johnston wrote:
> > > 
> > > On Sat, Jun 09, 2018 at 02:47:49PM +0000, Andrew Turner wrote:
> > > > 
> > > > Author: andrew
> > > > Date: Sat Jun  9 14:47:49 2018
> > > > New Revision: 334880
> > > > URL: https://svnweb.freebsd.org/changeset/base/334880
> > > > 
> > > > Log:
> > > >   In the ThunderX BGX network driver we were skipping the NULL terminator
> > > >   when parsing the phy type, however this is included in the length returned
> > > >   by OF_getprop. To fix this stop ignoring the terminator.
> > > >   
> > > >   PR:		228828
> > > >   Reported by:	sbruno
> > > >   Sponsored by:	DARPA, AFRL
> > > This seems to break vnic on packet.net ThunderXs.  In particular, VF
> > > creation fails.  It seems the problem in my case is that there are
> > > multiple PHY devices in the device tree, e.g., xfi@0, xfi@1.  With this
> > > change, bgx_fdt_phy_name_match() fails to match against any device
> > > containing a unit address in the node name.
> > > 
> > 
> > Huh ... this was *required* to get the ThunderXs we have in the FreeBSD
> > cluster to work at all.  o.0
> > 
> > I guess "someone" needs to contact "someone" to figure out which is
> > correct or we need to replace our FreeBSD cluster machines with ones
> > that work like the packet.net machines?
> I think the current code works fine if there's only one PHY device, so
> my problem is probably just the result of having a different hardware
> setup.  We can probably fix the code to handle both cases.  Could you
> mail me the output of "ofwdump -ap" from the cluster machine?
> 

ofwdump isn't very useful, you'll get much nicer output with:

  sysctl -b hw.fdt.dtb | dtc -I dtb -O dts >somefile.dts

BTW, the whole idea of searching for a phy by walking the node
hierarchy doing string comparisons on node names sounds pretty
antithetical to the whole design of fdt data. Are these nodes not
properly cross-linked with phandles?

-- Ian



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