[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH RFC] xen-netback: coalesce frags before copying



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 <wei.liu2@xxxxxxxxxx>
> > ---
> >  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 <asm/xen/hypercall.h>
> >  #include <asm/xen/page.h>
> >
> > +/*
> > + * 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...



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.