From owner-freebsd-arch@FreeBSD.ORG Thu Nov 21 01:31:53 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 99B77523; Thu, 21 Nov 2013 01:31:53 +0000 (UTC) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6008327A0; Thu, 21 Nov 2013 01:31:53 +0000 (UTC) Received: from julian-mbp3.pixel8networks.com (50-196-156-133-static.hfc.comcastbusiness.net [50.196.156.133]) (authenticated bits=0) by vps1.elischer.org (8.14.7/8.14.7) with ESMTP id rAL1Vku3006851 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 20 Nov 2013 17:31:47 -0800 (PST) (envelope-from julian@freebsd.org) Message-ID: <528D627D.2020009@freebsd.org> Date: Wed, 20 Nov 2013 17:31:41 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: Luigi Rizzo , Adrian Chadd Subject: Re: svn commit: r258328 - head/sys/net References: <201311182258.rAIMwEFd048783@svn.freebsd.org> <023E719B-1059-4670-8556-EBAC18A2F007@freebsd.org> <20131121000245.GA30549@onelab2.iet.unipi.it> <20131121003506.GA30962@onelab2.iet.unipi.it> In-Reply-To: <20131121003506.GA30962@onelab2.iet.unipi.it> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "src-committers@freebsd.org" , FreeBSD Net , "svn-src-all@freebsd.org" , George Neville-Neil , "freebsd-arch@freebsd.org" , "svn-src-head@freebsd.org" X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Nov 2013 01:31:53 -0000 On 11/20/13, 4:35 PM, Luigi Rizzo wrote: > On Wed, Nov 20, 2013 at 04:07:07PM -0800, Adrian Chadd wrote: >> Hi, >> >> We should migrate drivers to use a multi-input method where it's >> appropriate. It's the same pain as if_transmit() is/was. > right, and i think that is very confusing and i'd rather > not replicate the experience. > > But what is your plan, have both if_input and if_input_multi ? > And then make the vlan and all similar filters intercept both ? > Because all of the existing options have pros and cons: > > 1. having both if_input and if_input_multi is visually cleaner > but requires extending ifnet and some convoluted code in the > initialization (same as if_transmit) > > 2. just if_input with typed mbufs is less clean but has the big > advantage thay you only need to change ether_input() (and equivalent > for other L2 protocols), and it is not error prone if_input_multi() or whatever it is called is just this patch split into two bits. in the simple case it just calls the single one multiple times, just like this patch does. it is clean from teh compiler's point of view, > > 3. having only if_input_multi (even without renaming if_input) > requires you to change all the 100+ drivers. > > It seems to me that #2 at least preserves binary compatibility > with driver modules and is easier to backport to other versions > of FreeBSD, this is why i prefer it. > > my two cents... > > cheers > luigi > >> I'd really like to avoid having hacky solutions like mbufs with magic >> types. If we're going down that path, we should create a correct >> inline messaging mechanism that includes arbitrary messages in the >> stream, where some may or may not be mbufs. Magic mbufs just makes me >> want to tear out my eyes a little. >> >> So, the reason I'd like to back it out is because we should be doing >> it via a multi method with some type that represents an mbuf list. If >> George doesn't mind, I'll add a multi input method, move this stuff >> into it, and make ether_input just be single frames. >> >> >> >> -adrian > _______________________________________________ > freebsd-arch@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" >