Date: Wed, 5 Jun 2013 10:58:19 -0700 From: Adrian Chadd <adrian@freebsd.org> To: Colin Percival <cperciva@freebsd.org> Cc: svn-src-head@freebsd.org, Lawrence Stewart <lstewart@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: <CAJ-Vmo=fzdH9EsKcvzrtpPNziLOi0v_vqAdnm-t25h1S2SmmQg@mail.gmail.com> In-Reply-To: <51AED722.8000504@freebsd.org> References: <201306031300.r53D0XUx092178@svn.freebsd.org> <51AED1F3.2060003@freebsd.org> <51AED722.8000504@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 4 June 2013 23:13, Colin Percival <cperciva@freebsd.org> wrote: > 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. Then can you please create a "This is the linux limitation" rather than deriving it from a set of FreeBSD #define's ? Right now you're defining it based on the system page size _and_ some FreeBSD mbuf limit, rather than adding in the Linux versions of those as separate defines. Which honestly, they should be. Then you could add a compile time assert to ensure that the maximum segment size makes sense given both the linux constraints and the FreeBSD constraints. Otherwise looking at the code by itself isn't enough to know that it's a Linux-imposed limitation. Thanks, Adrian (Who has been knee-deep in this xen crap before, and would've appreciated these kinds of comments in the network driver.)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmo=fzdH9EsKcvzrtpPNziLOi0v_vqAdnm-t25h1S2SmmQg>