From owner-freebsd-current@FreeBSD.ORG Thu Aug 16 19:56:24 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0B4516A420 for ; Thu, 16 Aug 2007 19:56:24 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.189]) by mx1.freebsd.org (Postfix) with ESMTP id 7060B13C459 for ; Thu, 16 Aug 2007 19:56:24 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: by nf-out-0910.google.com with SMTP id b2so213723nfb for ; Thu, 16 Aug 2007 12:56:23 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=uYiClh/Wv3jSR+OhmAFfSiDNzvIhbO5nWAGUoiquPgT7iqijLeJiQnxinCXj7fn6kajsFzE+ab8vtqExpgYQq+S86Cdj2T2785Nswn8OtehsrhH+YP+IEpluJQ4lcN+Ejh/XWSMYRELZF3WxYxP3e5babygcMHGE46JTMKm5N68= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=T5H23bfQ9xXHVUv4ieEYyAcU9aS3BDmwz64aJct3r6uEsCjqaACel9ujlza4N479N2YDcBN6zAPvwHk0wX5Cwq5ZSIkt2yjyEO07NHeR45f0LwR84y60YCVrNaUjBov5DHkCV+ZElPjupWldkB768A3bcw0ZMNko1AEYrNhnMqo= Received: by 10.78.160.4 with SMTP id i4mr783371hue.1187294182649; Thu, 16 Aug 2007 12:56:22 -0700 (PDT) Received: by 10.78.162.18 with HTTP; Thu, 16 Aug 2007 12:56:22 -0700 (PDT) Message-ID: Date: Thu, 16 Aug 2007 12:56:22 -0700 From: "Kip Macy" To: "Andrew Gallatin" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <18116.43755.107638.103132@grasshopper.cs.duke.edu> Cc: freebsd-current@freebsd.org Subject: Re: IPSEC disables TSO 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: Thu, 16 Aug 2007 19:56:25 -0000 On 8/16/07, Kip Macy wrote: > On 8/16/07, Andrew Gallatin wrote: > > > > When tracking down an mxge 10GbE performance issue, I noticed that > > simply compiling IPSEC into the kernel totally destroys 10GbE transmit > > performance because it will silently disable TSO. > > > > The problem seems to be at least that the test on line 463 of > > tcp_output.c (tp->t_inpcb->inp_sp == NULL) will always be > > false. If I comment that line out, TSO works as normal > > (though I have no idea what would happen on an IPSEC connection). > > > > Is there some way to make this not happen? I believe that the mxge > > user simply wanted to run some handful of applications through ipsec > > tunnels (perhaps even on a different NIC entirely). > > IPSEC encrypts the TCP header - how is the card going to do TSO? I thought about this after sending and realized that the appropriate response is that IPSEC needs to be careful to disable TSO when its in use for a connection. What you're seeing was most likely done as an expedient. -Kip