From: Ian Campbell Subject: Re: [PATCH RFC] xen-netback: coalesce frags before copying Date: Fri, 15 Mar 2013 09:29:13 +0000 Message-ID: <1363339753.32410.289.camel@zakaz.uk.xensource.com> References: <1363285576-10480-1-git-send-email-wei.liu2@citrix.com> <1363339391.32410.281.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1363339391.32410.281.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu Cc: "netwiz@crc.id.au" , "konrad.wilk@oracle.com" , "npegg@linode.com" , "xen-devel@lists.xen.org" , "linux@eikelenboom.it" , "annie.li@oracle.com" , "jacekowski@jacekowski.org" List-Id: xen-devel@lists.xenproject.org On Fri, 2013-03-15 at 09:23 +0000, Ian Campbell wrote: > On Thu, 2013-03-14 at 18:26 +0000, Wei Liu wrote: > > This patch tries to coalesce txps when constructing grant copy structures. It > > enables netback to deal with situation when frontend's MAX_SKB_FRAGS is larger > > than backend's MAX_SKB_FRAGS. > > > > It also defines max_skb_frags, which is a estimation of the maximum number of > > frags a guest can send, anything bigger than that is considered malicious. Now > > it is set to 20, which should be enough to accommodate Linux (16 to 19) and > > possibly Windows (19?). > > > > Signed-off-by: Wei Liu > > --- > > drivers/net/xen-netback/netback.c | 164 +++++++++++++++++++++++++++++-------- > > 1 file changed, 128 insertions(+), 36 deletions(-) > > > > diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c > > index 6e8e51a..e27f81a 100644 > > --- a/drivers/net/xen-netback/netback.c > > +++ b/drivers/net/xen-netback/netback.c > > @@ -47,9 +47,20 @@ > > #include > > #include > > > > +/* > > + * This is an estimation of the maximum possible frags a SKB might > > + * have, anything larger than this is considered malicious. Typically > > + * Linux has 16 to 19, Windows has 19. > > Perhaps rather than this static (although configurable) Slipped and hit send... proper reply is forthcoming...