From owner-svn-src-projects@FreeBSD.ORG Mon Apr 6 22:31:19 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F8FAC27; Mon, 6 Apr 2015 22:31:19 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 06FDCFD6; Mon, 6 Apr 2015 22:31:18 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t36MV83w093954 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 7 Apr 2015 01:31:08 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t36MV8kD093953; Tue, 7 Apr 2015 01:31:08 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 7 Apr 2015 01:31:08 +0300 From: Gleb Smirnoff To: Lawrence Stewart Subject: Re: svn commit: r281151 - projects/ifnet/sys/net Message-ID: <20150406223108.GD64665@FreeBSD.org> References: <201504061522.t36FMXwX092973@svn.freebsd.org> <5522F214.5060903@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5522F214.5060903@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-projects@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 22:31:19 -0000 On Mon, Apr 06, 2015 at 01:52:36PM -0700, Lawrence Stewart wrote: L> > Author: glebius L> > Date: Mon Apr 6 15:22:32 2015 L> > New Revision: 281151 L> > URL: https://svnweb.freebsd.org/changeset/base/281151 L> > L> > Log: L> > Provide software context store in struct ifnet for any facility. To add L> > a new facility, one needs to grab a value in the ift_feature enum, and L> > not need to modify struct ifnet. L> > L> > The store also has a cache to return frequently requested values, L> > which resembles kobj(9) method cache. L> > L> > The plan is to move into the softc store almost all possible software L> > contexts that hang off the struct ifnet, leaving static only the driver L> > softc, AF_INET, AF_INET6 pointers, and other frequently used pointer. L> L> It seems likely that this is partially reinventing OSD(9) (also see the L> way I used it for for khelp(9)). Perhaps OSD could be improved with some L> useful things like the cache and then it might be a suitable drop in L> replacement here as well? Yes, osd(9) looks very like. For now I'd prefer to keep the simple stuff from r281151, to avoid introducing extra locks. Later we can estimate osd(9). -- Totus tuus, Glebius.