From owner-freebsd-net Tue Apr 25 19:11:44 2000 Delivered-To: freebsd-net@freebsd.org Received: from whizzo.transsys.com (whizzo.TransSys.COM [144.202.42.10]) by hub.freebsd.org (Postfix) with ESMTP id 1FEF437B77D; Tue, 25 Apr 2000 19:11:31 -0700 (PDT) (envelope-from louie@whizzo.transsys.com) Received: from whizzo.transsys.com (localhost.transsys.com [127.0.0.1]) by whizzo.transsys.com (8.9.3/8.9.1) with ESMTP id WAA61401; Tue, 25 Apr 2000 22:11:28 -0400 (EDT) (envelope-from louie@whizzo.transsys.com) Message-Id: <200004260211.WAA61401@whizzo.transsys.com> X-Mailer: exmh version 2.1.1 10/15/1999 To: Archie Cobbs Cc: luigi@FreeBSD.ORG, remy@boostworks.com, csg@waterspout.com, pavel@alum.mit.edu, nsayer@sftw.com, julian@elischer.org, freebsd-net@FreeBSD.ORG X-Image-URL: http://www.transsys.com/louie/images/louie-mail.jpg From: "Louis A. Mamakos" Subject: Re: Proposal for ethernet, bridging, netgraph References: <200004260055.RAA55462@bubba.whistle.com> In-reply-to: Your message of "Tue, 25 Apr 2000 17:55:05 PDT." <200004260055.RAA55462@bubba.whistle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 25 Apr 2000 22:11:28 -0400 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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. louie To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message