From: Ben Hutchings Subject: Re: IPv6 UFO for VMs Date: Mon, 27 Oct 2014 03:21:50 +0000 Message-ID: <1414380110.16849.16.camel@decadent.org.uk> References: <1413935045.5994.2.camel@decadent.org.uk> <1413970541.2337.16.camel@localhost> Mime-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-7i80+877sVJHHQLhCjSq" Cc: netdev , virtualization@lists.linux-foundation.org To: Hannes Frederic Sowa Return-path: Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:34926 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752021AbaJ0DWH (ORCPT ); Sun, 26 Oct 2014 23:22:07 -0400 In-Reply-To: <1413970541.2337.16.camel@localhost> Sender: netdev-owner@vger.kernel.org List-ID: --=-7i80+877sVJHHQLhCjSq Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2014-10-22 at 11:35 +0200, Hannes Frederic Sowa wrote: > On Mi, 2014-10-22 at 00:44 +0100, Ben Hutchings wrote: > > There are several ways that VMs can take advantage of UFO and get the > > host to do fragmentation for them: > >=20 > > drivers/net/macvtap.c: gso_type =3D SKB_GSO_UDP; > > drivers/net/tun.c: skb_shinfo(skb)->gso_type =3D S= KB_GSO_UDP; > > drivers/net/virtio_net.c: skb_shinfo(skb)->gso_ty= pe =3D SKB_GSO_UDP; > >=20 > > Our implementation of UFO for IPv6 does: > >=20 > > fptr =3D (struct frag_hdr *)(skb_network_header(skb) + unfrag_ip6hlen= ); > > fptr->nexthdr =3D nexthdr; > > fptr->reserved =3D 0; > > fptr->identification =3D skb_shinfo(skb)->ip6_frag_id; > >=20 > > which assumes ip6_frag_id has been set. That's only true if the local > > stack constructed the skb; otherwise it appears we get zero. > >=20 > > This seems to be a regression as a result of: > >=20 > > commit 916e4cf46d0204806c062c8c6c4d1f633852c5b6 > > Author: Hannes Frederic Sowa > > Date: Fri Feb 21 02:55:35 2014 +0100 > >=20 > > ipv6: reuse ip6_frag_id from ip6_ufo_append_data > >=20 > > However, that change seems reasonable - we *shouldn't* be choosing IDs > > for any other stack. Any paravirt net driver that can use IPv6 UFO > > needs to have some way of passing a fragmentation ID to put in > > skb_shared_info::ip6_frag_id. >=20 > Do we really gain a lot of performance by enabling UFO on those devices > or would it make sense to just drop support? It only helps fragmenting > large UDP packets, so I don't think it is worth it. It's not been important enough for anyone to bother implementing it in hardware/firmware aside from Neterion. I'll shortly post patches to disable it. Ben. > Otherwise I agree with Ben, we need to pass a fragmentation id from the > host over to the system segmenting the gso frame. Fragmentation ids must > be generated by the end system. >=20 > Hmm... --=20 Ben Hutchings Theory and practice are closer in theory than in practice. - John Levine, moderator of comp.compilers --=-7i80+877sVJHHQLhCjSq Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIVAwUAVE26Vee/yOyVhhEJAQrWBhAAkvWnz0moz9bRMKuMAZsMW72fdUHhUmME GRXQTobc+MVngYwZhTj+joTmUPACzG1Z0BP6o+oVc+P+uZYj0+rM5QeA62Ducpew Cd1mTj6SKoKNPyyYkZg0Wf+kCFuM0U3Z/d+PxPfJI4wV6ErJt5KZTynq8Cy8QWdO J21IKHGPJuTmjfLAuWO7I81ZJLeHZX9cU1WG7i09kCl979cZzl2fGtLkhH8+zcYp b/y7j8UspDDnsoHG3ME2JEjWTY3JIMMdArwaMM1avPLmDx+aL5nZbUHtimYOmIpb Yrk+eDavSI6yyN98XK7qs2GWBSm/Mujwf8uKwx8IHVXcTO3eGVcfEp+VOi2Ua5FY z9N6IoWtEylTdei3S0a2eO4xhPvWo7bOP8KpG74xtrdZ/pyvsQiPaslOHfBBj3ck wKe7a7qDcQtr5u9Rf99pDpF1CEiZRnQ1QShZ50IOLFmuDyEapqZAnxFftuldbhL3 RODNYkruTUK4wfy/hao9kOhBxw8YhKHW9rDFPfsBBkjgRPlulCSngqTztEsLri13 iNVZYi/Ho50AQKjH9j6oepURKkqSjQznA4c8lPUGWsuJQeHgexWdeGeCMypOmANG eEiUKlNp9U4RliRHKOinN1KOtUfBCTLy6oVx6pD5Nyb7CLTBme5rUSq6p31pcnsO +4jKsehuXTw= =IqMa -----END PGP SIGNATURE----- --=-7i80+877sVJHHQLhCjSq--