From owner-freebsd-net Tue Apr 25 19:30:27 2000 Delivered-To: freebsd-net@freebsd.org Received: from bubba.whistle.com (bubba.whistle.com [207.76.205.7]) by hub.freebsd.org (Postfix) with ESMTP id 5549137B8DF; Tue, 25 Apr 2000 19:30:23 -0700 (PDT) (envelope-from archie@whistle.com) Received: (from archie@localhost) by bubba.whistle.com (8.9.3/8.9.2) id TAA56138; Tue, 25 Apr 2000 19:29:49 -0700 (PDT) From: Archie Cobbs Message-Id: <200004260229.TAA56138@bubba.whistle.com> Subject: Re: Proposal for ethernet, bridging, netgraph In-Reply-To: <200004260211.WAA61401@whizzo.transsys.com> from "Louis A. Mamakos" at "Apr 25, 2000 10:11:28 pm" To: louie@TransSys.COM (Louis A. Mamakos) Date: Tue, 25 Apr 2000 19:29:49 -0700 (PDT) Cc: archie@whistle.com (Archie Cobbs), luigi@FreeBSD.ORG, remy@boostworks.com, csg@waterspout.com, pavel@alum.mit.edu, nsayer@sftw.com, julian@elischer.org, freebsd-net@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Louis A. Mamakos writes: > Just a thought while looking at this code - in if_ethersubr.c where > the bpf process has been moved, the same idiom is repeated that > was in the drivers: > > /* Check for a BPF tap */ > if (ifp->if_bpf != NULL) { > struct mbuf m0; > > /* OK because BPF treats the mbuf as read-only */ > m0.m_next = m; > m0.m_data = (char *)eh; > m0.m_len = ETHER_HDR_LEN; > bpf_mtap(ifp, &m0); > } > > Now that mbufs are 256 bytes long, is this getting to be too much data > to stick on the kernel stack? It seems like it's not a problem now, but > this code is now going to be invoked deeper in the stack than before. > > If this code is running at splnet(), then it ought to be safe to just > have a static mbuf laying about for this purpose, rather than allocating > a local on the kernel stack. Good point.. we could just use a struct m_hdr.. and in any case it should be able to be a static variable.. we're at splnet(). -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message