From owner-freebsd-drivers@FreeBSD.ORG Thu Aug 18 14:21:46 2011 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F5A9106564A for ; Thu, 18 Aug 2011 14:21:46 +0000 (UTC) (envelope-from gbal.naresh@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id A84738FC08 for ; Thu, 18 Aug 2011 14:21:45 +0000 (UTC) Received: by yxn22 with SMTP id 22so641440yxn.13 for ; Thu, 18 Aug 2011 07:21:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=references:in-reply-to:mime-version:content-transfer-encoding :content-type:message-id:cc:x-mailer:from:subject:date:to; bh=LMLjEhYbU7IghEYqueN/4TrVGU/AAQilXz51KWhNy0o=; b=O6cF0/KMNQdYaWLh18bKzdP3OWiHVCOMMx3TnWtAqzRz1AIJj7sW96Ov4rzNeJnnSC +pcaxkYovi19bPtjjUr8wVD1vtLx/GsMiTz1sQ9xq2nM/BFWN6YDPxcK74BHEiYUpdnv HJPOsszIqB3Fvuy3cxIYO2WG341K6L77Ifg2o= Received: by 10.143.97.24 with SMTP id z24mr435208wfl.212.1313677304709; Thu, 18 Aug 2011 07:21:44 -0700 (PDT) Received: from [192.168.1.2] ([123.236.149.118]) by mx.google.com with ESMTPS id n3sm1508158pbi.37.2011.08.18.07.21.38 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 18 Aug 2011 07:21:42 -0700 (PDT) References: <1A69CCCE-AF58-465E-87F5-BE3AF0BBAB19@gmail.com> <20110817174229.34215905@rfhrz076.fh-regensburg.de> <1313597619.2776.20.camel@bwh-desktop> <20110817164947.GO48988@alchemy.franken.de> In-Reply-To: <20110817164947.GO48988@alchemy.franken.de> Mime-Version: 1.0 (iPhone Mail 8C148) Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Message-Id: X-Mailer: iPhone Mail (8C148) From: Naresh Date: Thu, 18 Aug 2011 19:51:37 +0530 To: Marius Strobl Cc: "freebsd-drivers@freebsd.org" , "yongari@freebsd.org" Subject: Re: MAC and PHY loopback tests entrypoint for NIC controller X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Aug 2011 14:21:46 -0000 Thanks a lot Marius and Ben. Sent from my iPhone On 17-Aug-2011, at 10:19 PM, Marius Strobl wrote: > On Wed, Aug 17, 2011 at 05:13:39PM +0100, Ben Hutchings wrote: >> On Wed, 2011-08-17 at 17:42 +0200, Marius Strobl wrote: >>> On Sat, 6 Aug 2011 23:39:38 +0530 >>> Naresh 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. >> > > Ah, okay, unfortunately FreeBSD provides no standard interface for that. > > Marius >