From: Tristan Gingold Subject: Re: PATCH: multicall and auto_translated in netfront.c Date: Mon, 21 Aug 2006 08:49:54 +0200 Message-ID: <200608210849.54069.Tristan.Gingold@bull.net> References: <200608181602.22811.Tristan.Gingold@bull.net> <20060818173001.GA5829@cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20060818173001.GA5829@cam.ac.uk> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Steven Smith Cc: xen-devel@lists.xensource.com, sos22@srcf.ucam.org List-Id: xen-devel@lists.xenproject.org Le Vendredi 18 Ao=FBt 2006 19:30, Steven Smith a =E9crit : > > diff -r bef360142b62 -r ee4aef404bce > > linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c --- > > a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Mon Aug 14 > > 14:21:21 2006 -0600 +++ > > b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Fri Aug 18 > > 14:00:37 2006 +0200 @@ -1220,13 +1220,20 @@ err: > > > > /* Do all the remapping work, and M2P updates, in one big hypercall. = */ > > if (likely(pages_done)) { > > - mcl =3D np->rx_mcl + pages_done; > > + unsigned int mcl_off; > > + > > + if (!xen_feature(XENFEAT_auto_translated_physmap)) > > + mcl_off =3D pages_done; > > + else > > + mcl_off =3D 0; > > + > > The intent of this code was that pages_done should be 0 if > auto_translated_physmap was set, so this should be a no-op. It gets > initialised to 0 at the top of the big loop, and is then only modified > by xennet_get_responses through its mcl_offset_p pointer. > xennet_get_responses only modifies it if > !xen_feature(XENFEAT_auto_translated_physmap). Am I simply confused? I didn't look deeply into the code. I have just viewed the result. pages_done is incremented by skb_queue_length. At first glance it does not= =20 depend on auto_translated. > (And, in fact, if pages_done !=3D 0 then the mmu update you do next will > be incorrect) On ia64 mmu_update is no-op ;-) Tristan.