Herbert Xu
2006-May-31  14:08 UTC
[Xen-devel] [RFC 0/2] [NET]: Add scatter and gather support
Hi:
The following patches add scatter-and-gather support in the domU => dom0
direction.  This is a precursor to adding TSO in the same direction.  If
everyone''s happy with this approach then it''s trivial to do
the same
thing for the opposite direction.
SG support is required to support skb''s larger than one page.  This
in turn is needed for either jumbo MTU or TSO.  One of these is
required to bring local networking performance up to a level that
is acceptable.
Testing SG support without TSO is a bit tricky because the xen bridge
won''t pass any packets larger than the MTU of all its constituents.
The easiest way to test it is to add an address to the xenbr0 interface
and a route with a specific advmss.
On the frontend:
# ifconfig eth0 x.y.z.u netmask 255.255.255.0 mtu 16436
On the backend:
# ip a a dev xenbr0 x.y.z.v/32
# ip r a x.y.z.u dev xenbr0 advmss 16396
This should get you going.  Now for some numbers:
netperf -t TCP_STREAM -H x.y.z.u -- -s 65536,65536 -S 65536,65536
baseline:	 778.96Mb/s
mtu=16436:	2815.60Mb/s
mtu=60040:	4410.02Mb/s
lo(16436):	5508.34Mb/s
lo(60040):	8508.91Mb/s
Don''t pay too much attention to the absolute numbers, it''s a
fairly
modest laptop.  However, the rate of increase is self-evident.
I''ll post a set of TSO patches soon.
Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Hi:
[NET] back: Add SG support
This patch adds scatter-and-gather support to the backend.  It also
advertises this fact through xenbus so that the frontend can detect
this and send through SG requests only if it is supported.
SG support is required to support skb''s larger than one page.  This
in turn is needed for either jumbo MTU or TSO.  One of these is
required to bring local networking performance up to a level that
is acceptable.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Herbert Xu
2006-May-31  14:10 UTC
[Xen-devel] [RFC 2/2] [NET] front: Transmit SG packets if supported
Hi:
[NET] front: Transmit SG packets if supported
This patch adds scatter-and-gather transmission support to the frontend.
This allows the MTU to be raised right now and the potential for TSO in
future.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Keir Fraser
2006-May-31  14:56 UTC
Re: [Xen-devel] [RFC 0/2] [NET]: Add scatter and gather support
On 31 May 2006, at 15:08, Herbert Xu wrote:> The following patches add scatter-and-gather support in the domU => > dom0 > direction. This is a precursor to adding TSO in the same direction. > If > everyone''s happy with this approach then it''s trivial to do the same > thing for the opposite direction.Thanks! I''ll need a bit of time to read through these patches but my first impression is they look very good. Just one question so far: you modify some of the macros in ring.h but don''t actually use those macros in your patch. Is there a reason for the changes? -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Herbert Xu
2006-May-31  23:28 UTC
Re: [Xen-devel] [RFC 0/2] [NET]: Add scatter and gather support
On Wed, May 31, 2006 at 03:56:04PM +0100, Keir Fraser wrote:> > Just one question so far: you modify some of the macros in ring.h but > don''t actually use those macros in your patch. Is there a reason for > the changes?Some of the modified macros are used in this patch. The rest are there for consistency and will be used when I do the opposite direction for dom0 => domU. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Hi:
This patch allows us to use jumbo frames through the looped eth0
device rather than only on xenbr0.
[NET] loopback: Added support for SG
Just like the standard loopback device, SG support here is innate.
So all we need to do is mark it as such and zero the change_mtu method
so that the MTU can be changed at will.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel