From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [PATCH net-next] xen-netback: improve guest-receive-side flow control Date: Mon, 2 Dec 2013 11:53:38 +0000 Message-ID: <529C74C2.5040105@citrix.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: 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: Wei Liu , Ian Campbell , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On 28/11/13 16:33, 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. Make sure it does the right thing if the head is not page aligned etc. David