From owner-svn-src-all@FreeBSD.ORG Wed Jun 5 15:55:29 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1E331182; Wed, 5 Jun 2013 15:55:29 +0000 (UTC) (envelope-from ken@kdm.org) Received: from nargothrond.kdm.org (nargothrond.kdm.org [70.56.43.81]) by mx1.freebsd.org (Postfix) with ESMTP id BCD2B1082; Wed, 5 Jun 2013 15:55:28 +0000 (UTC) Received: from nargothrond.kdm.org (localhost [127.0.0.1]) by nargothrond.kdm.org (8.14.2/8.14.2) with ESMTP id r55FtR01022266; Wed, 5 Jun 2013 09:55:27 -0600 (MDT) (envelope-from ken@nargothrond.kdm.org) Received: (from ken@localhost) by nargothrond.kdm.org (8.14.2/8.14.2/Submit) id r55FtRYK022265; Wed, 5 Jun 2013 09:55:27 -0600 (MDT) (envelope-from ken) Date: Wed, 5 Jun 2013 09:55:27 -0600 From: "Kenneth D. Merry" To: Colin Percival Subject: Re: svn commit: r251297 - head/sys/dev/xen/netfront Message-ID: <20130605155527.GA84878@nargothrond.kdm.org> References: <201306031300.r53D0XUx092178@svn.freebsd.org> <51AED1F3.2060003@freebsd.org> <51AED722.8000504@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51AED722.8000504@freebsd.org> User-Agent: Mutt/1.4.2i Cc: svn-src-head@FreeBSD.org, Lawrence Stewart , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Andre Oppermann X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 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: Wed, 05 Jun 2013 15:55:29 -0000 On Tue, Jun 04, 2013 at 23:13:54 -0700, Colin Percival wrote: > On 06/04/13 22:51, Lawrence Stewart wrote: > > On 06/03/13 23:00, Andre Oppermann wrote: > >> Modified: head/sys/dev/xen/netfront/netfront.c > >> ============================================================================== > >> --- head/sys/dev/xen/netfront/netfront.c Mon Jun 3 12:55:13 2013 (r251296) > >> +++ head/sys/dev/xen/netfront/netfront.c Mon Jun 3 13:00:33 2013 (r251297) > >> @@ -134,6 +134,7 @@ static const int MODPARM_rx_flip = 0; > >> * to mirror the Linux MAX_SKB_FRAGS constant. > >> */ > >> #define MAX_TX_REQ_FRAGS (65536 / PAGE_SIZE + 2) > >> +#define NF_TSO_MAXBURST ((IP_MAXPACKET / PAGE_SIZE) * MCLBYTES) > > > > For posterity's sake, can you and/or Colin please elaborate on how this > > value was determined and what it is dependent upon? Could a newer > > version of Xen remove the need for this reduced limit? > > The comment above (of which only the last line is quoted in the diff) > explains it: > * This limit is imposed by the backend driver. We assume here that > * we are dealing with a Linux driver domain and have set our limit > * to mirror the Linux MAX_SKB_FRAGS constant. > > This isn't a Xen issue really; rather, it's a Linux Dom0 issue. AFAIK > there are no changes in the pipe to fix this in Linux; but this would not > be needed with a different Dom0 (e.g., a FreeBSD Dom0, if/when that becomes > possible) or if FreeBSD switched to using 4kB mbuf clusters (since at that > point we would be matching Linux and be able to fit a maximum-length IP > packet into the allowed number of fragments). It has been a couple of years since I looked at that, but IIRC one of the issues here is that the is no way to probe for the maximum. So even once we have a FreeBSD Dom 0, we may be stuck with the limit. Or we'll have to have some other way (e.g. the xenstore) to communicate that we're running on a different type of Dom 0 and don't have the limit. Ken -- Kenneth Merry ken@FreeBSD.ORG