From: Wei Liu Subject: Re: [PATCH net-next] xen-netback: improve guest-receive-side flow control Date: Thu, 28 Nov 2013 16:44:59 +0000 Message-ID: <20131128164459.GB9206@zion.uk.xensource.com> References: <1385644272-29728-1-git-send-email-paul.durrant@citrix.com> <20131128155105.GM12187@zion.uk.xensource.com> <9AAE0902D5BC7E449B7C8E4E778ABCD0194FD7@AMSPEX01CL01.citrite.net> <20131128162704.GA9206@zion.uk.xensource.com> <9AAE0902D5BC7E449B7C8E4E778ABCD0195079@AMSPEX01CL01.citrite.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <9AAE0902D5BC7E449B7C8E4E778ABCD0195079@AMSPEX01CL01.citrite.net> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Paul Durrant Cc: David Vrabel , Wei Liu , Ian Campbell , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Thu, Nov 28, 2013 at 04:33:53PM +0000, Paul Durrant wrote: > > -----Original Message----- > > From: Wei Liu [mailto:wei.liu2@citrix.com] > > Sent: 28 November 2013 16:27 > > To: Paul Durrant > > Cc: Wei Liu; xen-devel@lists.xen.org; Ian Campbell; David Vrabel > > Subject: Re: [PATCH net-next] xen-netback: improve guest-receive-side flow > > control > [snip] > > > > > I'm afraid this starting point is not correct. Consider you have a SKB > > > > with very large linear buffer, you might need more than 2 slots to fit > > > > that in, right? > > > > > > > > > > I was wondering about that. Would a roundup of mtu to the nearest 4k > > boundary be sufficient? > > > > > > > I think we can reuse the logic in xenvif_gop_skb, there's a snippet used > > to calculate how many slots are necessary for linear area. We just need > > to avoid pulling requrests from the ring. > > > > Actually, DIV_ROUND(skb_headlen(skb), PAGE_SIZE) should give a cheap > upper bound, shouldn't it? I don't want the code here to get too > complex. > I guess this would work. Wei. > Paul