From owner-svn-src-all@FreeBSD.ORG Wed Jun 5 17:58:27 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3821623C; Wed, 5 Jun 2013 17:58:27 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qe0-f44.google.com (mail-qe0-f44.google.com [209.85.128.44]) by mx1.freebsd.org (Postfix) with ESMTP id 9D25D17F6; Wed, 5 Jun 2013 17:58:26 +0000 (UTC) Received: by mail-qe0-f44.google.com with SMTP id 6so1271037qeb.31 for ; Wed, 05 Jun 2013 10:58:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=qHxdhy24Lziv434xjQS3UcSNhdWD5FwNv6OAmbSPuMg=; b=Fn/omwfguxwhTLOjAd5xSMgnFFPkzB6/WqNktnDvUgla7Yt0w08VUvVr4/95ia7gFx C31gPKsSupxiIC/aVRWTRJJULTqRlj1TvdpzExo/ku8HkQOLl1J7RscYBqUPt3/rnb+d J2KXzPDfT/rNoFYtgoHEHsxEVi/O2vl5zjId6C/L18edeJZf16D8lA+YMN3ZqpfbyDGI juZqBbd8dw4NP5K3NuPkVIWlLEFfGS8BNSFibRScFyZCGHnRyjZmEGST7CaiK5poVKpc j3NbjslE9gwOQ6llwwaW7fibKMowNNB+EGO+MyxnUmwGSCQZWZKL0DjWU+OykwDwl4Me tvTw== MIME-Version: 1.0 X-Received: by 10.49.28.35 with SMTP id y3mr34294745qeg.7.1370455100011; Wed, 05 Jun 2013 10:58:20 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.71.12 with HTTP; Wed, 5 Jun 2013 10:58:19 -0700 (PDT) In-Reply-To: <51AED722.8000504@freebsd.org> References: <201306031300.r53D0XUx092178@svn.freebsd.org> <51AED1F3.2060003@freebsd.org> <51AED722.8000504@freebsd.org> Date: Wed, 5 Jun 2013 10:58:19 -0700 X-Google-Sender-Auth: Ktobe58Dkaty9Hy9wOHziHQ2ijo Message-ID: Subject: Re: svn commit: r251297 - head/sys/dev/xen/netfront From: Adrian Chadd To: Colin Percival Content-Type: text/plain; charset=ISO-8859-1 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 17:58:27 -0000 On 4 June 2013 23:13, Colin Percival 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.)