From mboxrd@z Thu Jan 1 00:00:00 1970 From: Du Fan Subject: Re: [PATCH net] gso: do GSO for local skb with size bigger than MTU Date: Fri, 05 Dec 2014 08:25:34 +0800 Message-ID: <5480FB7E.6020905@gmail.com> References: <20141201135225.GA16814@casper.infradead.org> <20141202154839.GB5344@t520.home> <20141202170927.GA9457@casper.infradead.org> <20141202173401.GB4126@redhat.com> <20141202174158.GB9457@casper.infradead.org> <20141203090339.GA9299@redhat.com> <20141203183859.GB16447@redhat.com> <20141203220244.GA8822@casper.infradead.org> <548011DE.4000208@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Pravin Shelar , Thomas Graf , "Michael S. Tsirkin" , "Du, Fan" , Jason Wang , "netdev@vger.kernel.org" , "davem@davemloft.net" , "fw@strlen.de" , "dev@openvswitch.org" To: Jesse Gross Return-path: Received: from mail-pd0-f174.google.com ([209.85.192.174]:63076 "EHLO mail-pd0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753014AbaLEAZo (ORCPT ); Thu, 4 Dec 2014 19:25:44 -0500 Received: by mail-pd0-f174.google.com with SMTP id w10so18589759pde.5 for ; Thu, 04 Dec 2014 16:25:43 -0800 (PST) In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On 2014/12/5 7:23, Jesse Gross wrote: > On Wed, Dec 3, 2014 at 11:48 PM, Du Fan = wrote: >> =E4=BA=8E 2014=E5=B9=B412=E6=9C=8804=E6=97=A5 06:51, Jesse Gross =E5= =86=99=E9=81=93: >>> My proposal would be something like this: >>> * For L2, reduce the VM MTU to the lowest common denominator on = the >>> segment. >>> * For L3, use path MTU discovery or fragment inner packet (i.e. >>> normal routing behavior). >>> * As a last resort (such as if using an old version of virtio in= the >>> guest), fragment the tunnel packet. >> >> After some investigation on OpenvSwitch package, it seems before thi= s >> commit: 06021dcb "datapath: compat: Fix compilation 3.11" OpenvSwitc= h >> package is doing GSO on its own. >> >> rpl_ip_local_out >> -> tnl_skb_gso_segment >> ^^^^^^^^^^^^^^^ >> Perform GSO in above function >> -> ip_local_out >> . >> . >> -> ip_finish_output >> >> Which means, when over-MTU-sized skb enter ip_local_out, it's not a = gso >> type skb, so the stack perform ip fragmentation, and send them out. >> So, over-MTU-sized skb did travel through stack into outside. >> >> Why not dropping such OpenvSwitch level GSO operation after 3.10? > The change in 3.11 was that the tunnel infrastructure used by OVS was > upstreamed and shared by all implementations. It's not right to > perform GSO in OVS itself as it prevents the logic from being used by > other components. Breaking up the packet in OVS also eliminates some > of the benefits of GSO by shortening the optimized path and prevents > offloading to hardware. Thanks for your explanation, I understand its background better now.