Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Aug 2011 17:13:39 +0100
From:      Ben Hutchings <bhutchings@solarflare.com>
To:        Marius Strobl <marius@alchemy.franken.de>
Cc:        yongari@freebsd.org, Naresh <gbal.naresh@gmail.com>, freebsd-drivers@freebsd.org
Subject:   Re: MAC and PHY loopback tests entrypoint for NIC controller
Message-ID:  <1313597619.2776.20.camel@bwh-desktop>
In-Reply-To: <20110817174229.34215905@rfhrz076.fh-regensburg.de>
References:  <1A69CCCE-AF58-465E-87F5-BE3AF0BBAB19@gmail.com> <20110817174229.34215905@rfhrz076.fh-regensburg.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 2011-08-17 at 17:42 +0200, Marius Strobl wrote:
> On Sat, 6 Aug 2011 23:39:38 +0530
> Naresh <gbal.naresh@gmail.com> wrote:
> 
> > 
> > Hi All,
> > 
> > I am writing a 10Gb Ethernet driver. We have a requirement to support
> > Mac and PHY loopback test for the network controller. In Linux there
> > is a ethtool entrypoint which calls this feature.

Me too!

> > I wondering what will be the equivalent entry point in FreeBSD. I
> > tried looking in to other drivers, but not lucky enough to find one.
> > 
> > It is much appreciated if some one could point me to MAC and PHY
> > loopback test entry point in FreeBSD.
> > 
> 
> I don't know what API Linux provides but I think the question is how to
> activate loopback mode from userland.
[...]

This is a very different thing.

On Linux, ethtool invokes a driver function that runs a set of driver-
specific self-tests (synchronously).  There is a flag for whether the
driver should run offline tests, in which case it will temporarily
disconnect from the network stack and then (normally) select loopback
mode, generate and validate packets.

What you're talking about is configuring loopback mode but leaving the
network stack connected.  This can be useful for directed testing by
developers and QA, but it is not at all useful for an automated
self-test.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.




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