From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Pirko Subject: Re: [patch net-next 1/2] ip6_output: fragment outgoing reassembled skb properly Date: Fri, 8 Nov 2013 08:52:01 +0100 Message-ID: <20131108075201.GA2455@minipsycho.orion> References: <1383756740-7392-1-git-send-email-jiri@resnulli.us> <1383756740-7392-2-git-send-email-jiri@resnulli.us> <20131107.185453.1341640661253119352.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, pablo@netfilter.org, netfilter-devel@vger.kernel.org, yoshfuji@linux-ipv6.org, kadlec@blackhole.kfki.hu, kaber@trash.net, mleitner@redhat.com, kuznet@ms2.inr.ac.ru, jmorris@namei.org, wensong@linux-vs.org, horms@verge.net.au, ja@ssi.bg, edumazet@google.com, pshelar@nicira.com, jasowang@redhat.com, alexander.h.duyck@intel.com, fw@strlen.de To: David Miller Return-path: Received: from mail-ea0-f171.google.com ([209.85.215.171]:34758 "EHLO mail-ea0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751078Ab3KHHwH (ORCPT ); Fri, 8 Nov 2013 02:52:07 -0500 Received: by mail-ea0-f171.google.com with SMTP id h15so726142eak.16 for ; Thu, 07 Nov 2013 23:52:05 -0800 (PST) Content-Disposition: inline In-Reply-To: <20131107.185453.1341640661253119352.davem@davemloft.net> Sender: netfilter-devel-owner@vger.kernel.org List-ID: Fri, Nov 08, 2013 at 12:54:53AM CET, davem@davemloft.net wrote: >From: Jiri Pirko >Date: Wed, 6 Nov 2013 17:52:19 +0100 > >> If reassembled packet would fit into outdev MTU, it is not fragmented >> according the original frag size and it is send as single big packet. >> >> The second case is if skb is gso. In that case fragmentation does not happen >> according to the original frag size. >> >> This patch fixes these. >> >> Signed-off-by: Jiri Pirko > ... > >> if ((skb->len > ip6_skb_dst_mtu(skb) && !skb_is_gso(skb)) || >> - dst_allfrag(skb_dst(skb))) >> + dst_allfrag(skb_dst(skb)) || >> + (IP6CB(skb)->frag_max_size && skb->len > IP6CB(skb)->frag_max_size)) >> return ip6_fragment(skb, ip6_finish_output2); > >Jiri are you sure that you don't need to take GSO into account in the >new part you are adding to the test? For gso skb, we need co cap outgoing fragments by the original frag size as well. So I believe that this code is correct for that case as well. >-- >To unsubscribe from this list: send the line "unsubscribe netdev" in >the body of a message to majordomo@vger.kernel.org >More majordomo info at http://vger.kernel.org/majordomo-info.html