From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755088AbbCYSOU (ORCPT ); Wed, 25 Mar 2015 14:14:20 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:49692 "EHLO out2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751633AbbCYSOP convert rfc822-to-8bit (ORCPT ); Wed, 25 Mar 2015 14:14:15 -0400 Message-Id: <1427307255.3555533.245187845.14A187CD@webmail.messagingengine.com> X-Sasl-Enc: EM/8Jh26/BIQFQsiIE4YaRSlV4wa7E0CG1GJ92r7qykf 1427307255 From: Hannes Frederic Sowa To: Roman Gushchin , "David S. Miller" , netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="UTF-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-f437beda Subject: Re: [PATCH v2] net: sysctl for RA default route MTU Date: Wed, 25 Mar 2015 19:14:15 +0100 In-Reply-To: <39171427301187@webcorp02f.yandex-team.ru> References: <20150324.152705.921124268458994532.davem@davemloft.net> <1427281679-13007-1-git-send-email-klamm@yandex-team.ru> <1427298721.2344863.245111901.25E46F85@webmail.messagingengine.com> <39171427301187@webcorp02f.yandex-team.ru> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Wed, Mar 25, 2015, at 17:33, Roman Gushchin wrote: > 25.03.2015, 18:52, "Hannes Frederic Sowa" : > > On Wed, Mar 25, 2015, at 12:07, Roman Gushchin wrote: > >>  --- a/net/ipv6/route.c > >>  +++ b/net/ipv6/route.c > >>  @@ -1714,6 +1714,14 @@ int ip6_route_add(struct fib6_config *cfg) > >> > >>           rt->rt6i_flags = cfg->fc_flags; > >> > >>  +       if ((cfg->fc_flags & (RTF_ADDRCONF | RTF_DEFAULT | RTF_GATEWAY)) > >>  == > >>  +           (RTF_ADDRCONF | RTF_DEFAULT | RTF_GATEWAY)) { > >>  +               u32 mtu = idev->cnf.ra_default_route_mtu; > >>  + > >>  +               if (mtu && mtu >= IPV6_MIN_MTU && mtu <= idev->cnf.mtu6) > >>  +                       dst_metric_set(&rt->dst, RTAX_MTU, mtu); > >>  +       } > >>  + > > > > Could you move this RA specific snippet over to ndisc.c? > > Ok, no problem. Thanks! > > > > Hmm > > > > How do you use this option? > > We want to set and keep normal (~1500) MTU on default route for external > connections > without an additional userspace effort, while link MTU is 9000 to support > jumbo frames > on other routes. > > > You use jumbo frames on the on-link network and announce all routes via > > route options where you also want to communicate to with jumbo frames? > > Yes, exactly. > > > > > I wonder if an offlink_mtu parameter would be more suitable? > > If I understand you correctly, the difference is which MTU will have > routes, announced via RIO. > Am I right? > If so, it will not help in our case, because only default route should > have "small" MTU, > and there is no way to announce per-route MTUs for RIO routes. > I thought about two separate knobs (ra_default_route_mtu and > ra_rt_info_route_mtu, for example), > but it seemed to me too excessive. Hmm. I revert my opinion on offlink_mtu parameter. So the approach would be to just basically leave your patch as-is and if another segment can be talked to with jumbo frames one could just let the RA speaker add another route announcement which should get a more specific route into the tables with the jumbo MTU from the RA packet. Only default routes will get the overwritten MTU value from the new knob. Am I correct? So your approach seems to be the most flexible option. Thanks and looking forward to the new patch, Hannes