From owner-freebsd-net@FreeBSD.ORG Mon Jun 4 03:33:22 2012 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 116F41065672 for ; Mon, 4 Jun 2012 03:33:22 +0000 (UTC) (envelope-from bounces+73574-866e-freebsd-net=freebsd.org@sendgrid.me) Received: from o3.shared.sendgrid.net (o3.shared.sendgrid.net [208.117.48.85]) by mx1.freebsd.org (Postfix) with SMTP id C9CEF8FC14 for ; Mon, 4 Jun 2012 03:33:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.info; h= message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; s=smtpapi; bh=647y4ITx+KgMBoYLp2a4oDzeb4I=; b=wLmtKS+x0UIeGjwWJ2L0PciCZaKW YAGruX3LyukgcFvJyoRkHYBxgfF9cWPZfyKMkBRPpJ/odK98BwjjZrx4saGE8UOz WI6WCo9g7rJbLxURQYOhxupSjoVGpY56rO59lvxfFrLt7uFQUTgEh/l+zYoNBcjB 2Ju5amZUgAbCJdY= Received: by 10.41.149.111 with SMTP id f04-08.10408.4FCC2C7FB Mon, 04 Jun 2012 03:33:20 +0000 (UTC) Received: from mail.tarsnap.com (unknown [10.8.49.124]) by mi1 (SG) with ESMTP id 4fcc2c7f.1b8a.ef7d8f for ; Sun, 03 Jun 2012 22:33:19 -0500 (CST) Received: (qmail 38807 invoked from network); 4 Jun 2012 03:25:37 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by mail.tarsnap.com with ESMTP; 4 Jun 2012 03:25:37 -0000 Received: (qmail 37521 invoked from network); 4 Jun 2012 03:33:07 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by clamshell.daemonology.net with SMTP; 4 Jun 2012 03:33:07 -0000 Message-ID: <4FCC2C72.7000806@freebsd.org> Date: Sun, 03 Jun 2012 20:33:06 -0700 From: Colin Percival User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120509 Thunderbird/12.0.1 MIME-Version: 1.0 To: Lawrence Stewart References: <4FC635CC.5030608@freebsd.org> <4FC63D27.70807@cs.duke.edu> <4FCB95F6.30204@freebsd.org> <4FCC27FE.3030205@freebsd.org> In-Reply-To: <4FCC27FE.3030205@freebsd.org> X-Enigmail-Version: 1.5pre Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Sendgrid-EID: ISGKkmHlRE12gnWy0TjFyGQSFR1WnpjQdICm3qu6YxEJ7pQio6/S9Skj7KnmnF25GUpXm7O0TX/8tjzMHyF2MtwT0dpFQ46mjKme8B1+9yLow42y/rPEYrdgZRr+wX9rg+XYDzH1f+YX0cU0ihgsDAj0bX0xyVWQZWyvR5cB6Q4= Cc: freebsd-net@freebsd.org, Andre Oppermann , Andrew Gallatin Subject: Re: [please review] TSO mbuf chain length limiting patch 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: Mon, 04 Jun 2012 03:33:22 -0000 On 06/03/12 20:14, Lawrence Stewart wrote: > On 06/04/12 02:51, Colin Percival wrote: >> I've attached a new patch which: >> 1. adds a IFCAP_TSO_MSS "capability" and a if_tx_tso_mss field to struct ifnet, > > A minor thing, but I don't like the overloading of the term MSS. Perhaps > s/MSS/CHUNKSIZE or another suitably similar but different word/phrase? I don't see this as being overloading; rather, it's using the same term to mean exactly the same thing: Maximum Segment Size, in this case of a TCP segment which is going to be re-segmented in hardware. >> 2. sets these in netfront when the IFCAP_TSO4 flag is set, >> 3. extends tcp_maxmtu to read this value, >> 4. adds a tx_tso_mss field to struct tcpcb, >> 5. makes tcp_mss_update set tx_tso_mss using tcp_maxmtu, and >> 6. limits TSO lengths to tx_tso_mss in tcp_output. > > Is there a reason to mix signed and unsigned types for the various tx_tso_mss > variables? If not, please pick a type and stick with it. It's all unsigned now (see updated patch I sent in reply to gallatin@). The use of u_int vs. uint32_t is because I wanted to have this fit into spares in struct ifnet and struct tcpcb and I wasn't 100% certain that there weren't any platforms with sizeof(int) != sizeof(uint32_t). -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid