From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Bennieston Subject: Re: [Xen-devel] [PATCH net-next] xen-netfront: clean up code in xennet_release_rx_bufs Date: Wed, 15 Jan 2014 15:35:00 +0000 Message-ID: <52D6AAA4.7090108@citrix.com> References: <1389307718-2845-1-git-send-email-Annie.li@oracle.com> <20140115100743.GG5698@zion.uk.xensource.com> <52D66ADF.9070401@citrix.com> <52D697FB.3000304@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit Cc: Wei Liu , , , To: annie li Return-path: Received: from smtp.citrix.com ([66.165.176.89]:11931 "EHLO SMTP.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752261AbaAOPfC (ORCPT ); Wed, 15 Jan 2014 10:35:02 -0500 In-Reply-To: <52D697FB.3000304@oracle.com> Sender: netdev-owner@vger.kernel.org List-ID: On 15/01/14 14:15, annie li wrote: > > On 2014-1-15 19:02, Andrew Bennieston wrote: >> On 15/01/14 10:07, Wei Liu wrote: >>> On Fri, Jan 10, 2014 at 06:48:38AM +0800, Annie Li wrote: >>>> Current netfront only grants pages for grant copy, not for grant >>>> transfer, so >>>> remove corresponding transfer code and add receiving copy code in >>>> xennet_release_rx_bufs. >>>> >>> >>> This path seldom gets call -- not that many people unload xen-netfront >>> driver. If Annie has tested this patch and it works as expected I think >>> it's fine. >>> >> In XenServer we have seen a number of cases where unplugging and >> replugging VIFs results in leakage of grant references, eventually >> leading to a case where you cannot plug a VIF (after ~ 400 such >> cycles)... >> >> It's worth pointing out, as far as this patch is concerned, that >> gnttab_end_foreign_access() can fail, > > Just like what Wei mentioned, it is gnttab_end_foreign_access_ref here, > right? Yes, sorry - I forgot to type the _ref part! > >> which is not taken into account here. > > Good point, gnttab_end_foreign_access_ref fails for grant which is in use. > > Thanks > Annie >> >> Andrew. >> >>> I'm not netfront maintainer but I'm happy to add >>> Acked-by: Wei Liu >>> if Annie confirms she's tested this patch. >>> >>> Wei. >>> >>> _______________________________________________ >>> Xen-devel mailing list >>> Xen-devel@lists.xen.org >>> http://lists.xen.org/xen-devel >>> >> >