From owner-p4-projects@FreeBSD.ORG Thu Jul 8 12:03:26 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 15B40106568E; Thu, 8 Jul 2010 12:03:25 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD4AD106567F; Thu, 8 Jul 2010 12:03:24 +0000 (UTC) (envelope-from pebu3op@googlemail.com) Received: from mail.net.t-labs.tu-berlin.de (mail.net.t-labs.tu-berlin.de [130.149.220.252]) by mx1.freebsd.org (Postfix) with ESMTP id 7B7C78FC12; Thu, 8 Jul 2010 12:03:24 +0000 (UTC) Received: from raven.net.t-labs.tu-berlin.de (raven.net.t-labs.tu-berlin.de [130.149.220.18]) by mail.net.t-labs.tu-berlin.de (Postfix) with ESMTP id 0D5BB7000584; Thu, 8 Jul 2010 13:39:18 +0200 (CEST) From: Alexander Fiveg Organization: Google To: John Baldwin Date: Thu, 8 Jul 2010 13:39:17 +0200 User-Agent: KMail/1.9.10 References: <201006171446.o5HEkRSP022515@repoman.freebsd.org> <201006231319.49258.jhb@freebsd.org> In-Reply-To: <201006231319.49258.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201007081339.17321.pebu3op@googlemail.com> Cc: Perforce Change Reviews , Alexandre Fiveg Subject: Re: PERFORCE change 179713 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pebu3op@googlemail.com List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2010 12:03:26 -0000 On Wednesday 23 June 2010 19:19:49 John Baldwin wrote: > On Thursday 17 June 2010 10:46:27 am Alexandre Fiveg wrote: > > http://p4web.freebsd.org/@@179713?ac=10 > > > > Change 179713 by afiveg@cottonmouth on 2010/06/17 14:46:03 > > > > Begin with new design for ringmap: > > 1. The new structure with pointers to hardware dependent functions: > > "struct ringmap_functions" (/net/ringmap.h) > > 2. Pointer to this structure placed in ringmap structure. > > 3. In the ringmap_attach function look for pci Id of network > > controller, and then, depending on controllers type, initialize the > > functions pointers: (ringmap.c: set_ringmap_funcs()) Hello John, > > I think 3) is the wrong way to go about it. Can't you have the NIC driver > attach a ringmap and supply the function pointers to the NIC-specific > functionality instead? I think I didn't exactly understand what do you mean :( Actually the NIC driver in its attach() function calls ringmap_attach(), and all settings which appears in the ringmap_attach() are related only to one specific NIC. > You really don't want to have two separate lists of > device IDs. The ringmap list will invariably become stale. The second device's list contains only ID's of devices supported by ringmap. The "em" driver in -CURRENT supports both 8254x and 8257x controllers. But ringmap supports currently only 8254x. In the future ringmap should support all devices supported by the driver which ringmap is based on. This means the second ringmap-device-list will be unnecessary.