From owner-freebsd-net@FreeBSD.ORG Sun Oct 21 16:59:03 2007 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6030A16A421 for ; Sun, 21 Oct 2007 16:59:03 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.178]) by mx1.freebsd.org (Postfix) with ESMTP id 467B213C4B9 for ; Sun, 21 Oct 2007 16:59:02 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so1053788waf for ; Sun, 21 Oct 2007 09:58:56 -0700 (PDT) Received: by 10.115.23.12 with SMTP id a12mr2659877waj.1192941553179; Sat, 20 Oct 2007 21:39:13 -0700 (PDT) Received: by 10.114.13.15 with HTTP; Sat, 20 Oct 2007 21:39:13 -0700 (PDT) Message-ID: Date: Sat, 20 Oct 2007 21:39:13 -0700 From: "Kip Macy" To: "freebsd-net@freebsd.org" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: refactoring tcp_output X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Oct 2007 16:59:03 -0000 I've re-factored tcp_output into a number of smaller routines with the intent of making it easier to work with. I would like feedback on how to improve it. I've benchmarked the change on 10GigE with no measurable performance degradation. The diff can be found at: http://www.fsmware.com/freebsd/tcp_output.diff The actual file (with some additional changes that I'm not asking for review of right now that are local to my branch for a) identifying the egress queue and b) skipping the route lookup on *every* call to ip_output and the corresponding 3 lock acquisitions) can be found at: http://www.fsmware.com/freebsd/tcp_output.c -Kip