From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 20:54:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 441CD1F2; Sat, 13 Sep 2014 20:54:11 +0000 (UTC) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id B6A5F960; Sat, 13 Sep 2014 20:54:10 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqIEAK+tFFSDaFve/2dsb2JhbABfhDuCeMpngyEBgR54hAQBAQQjBFIbGAICDRIHAlkGiFGnD5UiAReBLI1KIzQHgniBUwWyR4IbgV8hgTZBgQIBAQE X-IronPort-AV: E=Sophos;i="5.04,518,1406606400"; d="scan'208";a="153896753" Received: from muskoka.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.222]) by esa-jnhn.mail.uoguelph.ca with ESMTP; 13 Sep 2014 16:54:09 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id E9CB0B4221; Sat, 13 Sep 2014 16:54:08 -0400 (EDT) Date: Sat, 13 Sep 2014 16:54:08 -0400 (EDT) From: Rick Macklem To: Hans Petter Selasky Message-ID: <1935263641.35880661.1410641648947.JavaMail.root@uoguelph.ca> In-Reply-To: <5414AB58.6040400@selasky.org> Subject: Re: svn commit: r271504 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront net netinet ofed/drivers/net/mlx4 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.201] X-Mailer: Zimbra 7.2.6_GA_2926 (ZimbraWebClient - FF3.0 (Win)/7.2.6_GA_2926) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Adrian Chadd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 20:54:11 -0000 Hans Petter Selasky wrote: > On 09/13/14 22:35, Hans Petter Selasky wrote: > > > > I see the default set to (65536 - 4). I don't know why you > > subtracted 4 > > but I would have expected the max ethernet header length to be > > subtracted > > here? > > You mean to say that the default should be > > 65535 - ethernet header - vlan header ? > Almost. It is actually: 65536 - ethernet header - vlan header (or the min of IP_MAXPACKET vs 32*MCLBYTES - ethernet header - vlan header if you want to cover your butt for the case where the value of MCLBYTES is changed) IP_MAXPACKET (65535) comes from the fact that some devices use the iplen field of the ip header in the TSO segment for its length, I think? (Some do not and can support TSO segments greater than IP_MAXPACKET in length, but again, the default shouldn't assume this nor should it assume the device does the vlan header in hardware --> "- vlan header" to be safe for default.) This is because there are lots of broken drivers (basically any one that has a limit of 32 transmit segments) and this at least makes them work correctly. Unfortunately they still do a lot of m_defrag() calls for this case, but with a patch like yours, the drivers may eventually get patched to use the max_frags setting and then avoid the need to do m_defrag() calls. rick > --HPS > >