Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 04 Jun 2013 23:13:54 -0700
From:      Colin Percival <cperciva@freebsd.org>
To:        Lawrence Stewart <lstewart@freebsd.org>
Cc:        svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Andre Oppermann <andre@FreeBSD.org>
Subject:   Re: svn commit: r251297 - head/sys/dev/xen/netfront
Message-ID:  <51AED722.8000504@freebsd.org>
In-Reply-To: <51AED1F3.2060003@freebsd.org>
References:  <201306031300.r53D0XUx092178@svn.freebsd.org> <51AED1F3.2060003@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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).

-- 
Colin Percival
Security Officer Emeritus, FreeBSD | The power to serve
Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51AED722.8000504>