From owner-freebsd-net Sun Oct 6 22: 2: 3 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 69A9837B49A for ; Sun, 6 Oct 2002 22:01:59 -0700 (PDT) Received: from rootlabs.com (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id C28FC43E81 for ; Sun, 6 Oct 2002 22:01:58 -0700 (PDT) (envelope-from nate@rootlabs.com) Received: (qmail 5907 invoked by uid 1000); 7 Oct 2002 05:02:01 -0000 Date: Sun, 6 Oct 2002 22:02:01 -0700 (PDT) From: Nate Lawson To: freebsd-arch@freebsd.org Cc: freebsd-net@freebsd.org Subject: Re: CFR: m_tag patch In-Reply-To: <13e901c26dbb$63059f60$52557f42@errno.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Sun, 6 Oct 2002, Sam Leffler wrote: > http://www.freebsd.org/~sam/mtag.patch > > has changes to -current to replace the "aux mbuf" with a more general > mechanism borrowed from openbsd. Rather than dangling mbuf's off a packet > when auxiliary information needs to be associated with a packet a list of > variable-size struct m_tag's are kept. This is better because it: > > 1. Eliminates the use of mbufs as a general-purpose memory allocator. > 2. Avoids confusing and problematic code (e.g. ipsec stuffs multiple data > structures into an mbuf and often consults m_len to determine what > might/should be present). > 3. Means arbitrary size data can be stored (w/ mbufs you get what fits in a > fixed-size mbuf or--if it were implemented--in a cluster). > 4. Removes a recursive dependency that complicates locking in the mbuf code. > > The patch actually contains three sets of changes that are intertwined: > > 1. Remove use of aux mbufs and replace with m_tag's. > 2. Add an additional parameter to ip_output and ip6_output that was > previously passed through an aux mbuf. > 3. Rename luigi's m_tag_id hack #define to avoid name conflict with the > m_tag definition. > > I've been running something like this patch for ~9 months. The patch > actually eliminates more code than it adds and is likely to improve > performance (haven't measured). There should be no functional changes after > this patch is applied. > > Timely feedback is desired as I'd like to commit these changes in time for > DP2. > > Sam I'm not familiar with that code so only a few questions: 1. Is ordering important or is an SLIST sufficient for all cases? 2. Is it possible to attach the aux argument to the mbuf chain instead of adding it as a new parameter to ip_output? -Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message