From owner-freebsd-arch Sun Oct 6 21:38:32 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 47F8E37B401; Sun, 6 Oct 2002 21:38:31 -0700 (PDT) Received: from ebb.errno.com (ebb.errno.com [66.127.85.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id D6EF243E7B; Sun, 6 Oct 2002 21:38:30 -0700 (PDT) (envelope-from sam@errno.com) Received: from melange (melange.errno.com [66.127.85.82]) (authenticated bits=0) by ebb.errno.com (8.12.5/8.12.1) with ESMTP id g974cR1H000716 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Sun, 6 Oct 2002 21:38:30 -0700 (PDT)?g (envelope-from sam@errno.com)œ X-Authentication-Warning: ebb.errno.com: Host melange.errno.com [66.127.85.82] claimed to be melange Message-ID: <13e901c26dbb$63059f60$52557f42@errno.com> From: "Sam Leffler" To: , Subject: CFR: m_tag patch Date: Sun, 6 Oct 2002 21:38:26 -0700 Organization: Errno Consulting MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message