From owner-svn-src-head@FreeBSD.ORG Wed Mar 6 23:20:48 2013 Return-Path: Delivered-To: svn-src-head@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 B391FC10 for ; Wed, 6 Mar 2013 23:20:48 +0000 (UTC) (envelope-from bounces+73574-9504-svn-src-head=freebsd.org@sendgrid.me) Received: from o3.shared.sendgrid.net (o3.shared.sendgrid.net [208.117.48.85]) by mx1.freebsd.org (Postfix) with SMTP id 599F9F9A for ; Wed, 6 Mar 2013 23:20:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.info; h=from :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpapi; bh=X2op83wuBKEbem2TabqVUR /EwbI=; b=zlgbcVYyV1FPwXp32Mzaqc6UnytKC9rZiJ8+hx4OOjvVuxqutAEh9W NFFc/jc869/utj3E9xJjasD2cNw7zzN5EiX3SdwGibOeia62Sd9XJeqQwFhnFEr5 jfqa2dxNWd35TeLym1SeLpA8GAAtxV6+nHTQ21hp465ojWJVi6h64= Received: by 10.8.40.13 with SMTP id mf11.828.5137CF4F1 Wed, 06 Mar 2013 17:20:47 -0600 (CST) Received: from mail.tarsnap.com (unknown [10.60.208.15]) by mi23 (SG) with ESMTP id 5137cf4e.6521.21d0e42 for ; Wed, 06 Mar 2013 17:20:46 -0600 (CST) Received: (qmail 17564 invoked from network); 6 Mar 2013 23:20:45 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by ec2-107-20-205-189.compute-1.amazonaws.com with ESMTP; 6 Mar 2013 23:20:45 -0000 Received: (qmail 3337 invoked from network); 6 Mar 2013 23:19:57 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by clamshell.daemonology.net with SMTP; 6 Mar 2013 23:19:57 -0000 Message-ID: <5137CF1D.3020506@freebsd.org> Date: Wed, 06 Mar 2013 15:19:57 -0800 From: Colin Percival User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130131 Thunderbird/17.0.2 MIME-Version: 1.0 To: David Malone Subject: Re: svn commit: r247871 - head/usr.sbin/bhyve References: <201303060728.r267SKP3018477@svn.freebsd.org> <20130306231613.GA5146@walton.maths.tcd.ie> In-Reply-To: <20130306231613.GA5146@walton.maths.tcd.ie> X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Sendgrid-EID: EvYvoie/qnEezyq2t4eRKjDm9X7ZKbCMt75WvXA+XNFMC+UNrRjf/ALTc81ggaE6x8LCkDd/jDle3GhgMtXsyKPg/AlDbavqlklHUTbraZxR28TnoA1RS2FYmlT3Hn8+ Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Peter Grehan X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Mar 2013 23:20:48 -0000 On 03/06/13 15:16, David Malone wrote: >> + /* >> + * We're just computing (a-b) in GF(216). > >> + ndesc = (unsigned)*hq->hq_avail_idx - (unsigned)hq->hq_cur_aidx; > > I think the comment here is wrong? Subtraction (and addition) in > GF(2^16) is just xor of 16 bit numbers. You seem to actually be > working in Z(2^16), where subtraction is normal subtraction mod > 65536. Given that there's no such thing as GF(216) due to 216 = 2^3 * 3^3 not being a prime power, the comment is definitely wrong. ;-) -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid