From owner-freebsd-current@FreeBSD.ORG Fri Mar 2 20:57:35 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1715D16A403 for ; Fri, 2 Mar 2007 20:57:35 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 7EF6F13C4B3 for ; Fri, 2 Mar 2007 20:57:34 +0000 (UTC) (envelope-from andre@freebsd.org) Received: (qmail 47406 invoked from network); 2 Mar 2007 20:30:04 -0000 Received: from dotat.atdotat.at (HELO [62.48.0.47]) ([62.48.0.47]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 2 Mar 2007 20:30:04 -0000 Message-ID: <45E88FBD.4060407@freebsd.org> Date: Fri, 02 Mar 2007 21:57:33 +0100 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b) Gecko/20050217 MIME-Version: 1.0 To: freebsd-current@freebsd.org, freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: qingli@freebsd.org, silby@freebsd.org, bms@freebsd.org, mohans@freebsd.org Subject: Unification and simplification of outbound TCP options handling X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Mar 2007 20:57:35 -0000 In tcp_syncache and tcp_output we have two entirely separate code paths dealing with outbound TCP options. Each of them has a significant size and many quirks. This patch is a proper rewrite of both of them and introduces a new generic function tcp_addoptions() to tcp_output.c. The new function is then used in both the syncache and the normal tcp_output path instead of their previous versions. It it alignment agnostic and can be used to write directly into mbufs with any alignment. The patch is here: http://people.freebsd.org/~andre/tcp_options-20070302.diff Any testing and reviews appreciated. -- Andre