From owner-svn-src-head@FreeBSD.ORG Thu Nov 21 00:32:49 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 999C24C2; Thu, 21 Nov 2013 00:32:49 +0000 (UTC) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 56CEF24EB; Thu, 21 Nov 2013 00:32:49 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 975807300A; Thu, 21 Nov 2013 01:35:06 +0100 (CET) Date: Thu, 21 Nov 2013 01:35:06 +0100 From: Luigi Rizzo To: Adrian Chadd Subject: Re: svn commit: r258328 - head/sys/net Message-ID: <20131121003506.GA30962@onelab2.iet.unipi.it> References: <201311182258.rAIMwEFd048783@svn.freebsd.org> <023E719B-1059-4670-8556-EBAC18A2F007@freebsd.org> <20131121000245.GA30549@onelab2.iet.unipi.it> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) 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: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Nov 2013 00:32:49 -0000 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 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