Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753427AbbDBSIs (ORCPT ); Thu, 2 Apr 2015 14:08:48 -0400 Received: from forward-corp1g.mail.yandex.net ([95.108.253.251]:38437 "EHLO forward-corp1g.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752208AbbDBSIp (ORCPT ); Thu, 2 Apr 2015 14:08:45 -0400 From: Roman Gushchin To: Hannes Frederic Sowa , David Miller Cc: "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" In-Reply-To: <1427916447.1816412.248215129.072B6ABF@webmail.messagingengine.com> References: <1427834148.979686.247747037.29964C1B@webmail.messagingengine.com> <20150331.164923.229749666073516444.davem@davemloft.net> <68621427882330@webcorp01g.yandex-team.ru> <20150401.135532.1368728758929086692.davem@davemloft.net> <1427916447.1816412.248215129.072B6ABF@webmail.messagingengine.com> Subject: Re: [PATCH v3] net: sysctl for RA default route MTU MIME-Version: 1.0 Message-Id: <36791427998117@webcorp02f.yandex-team.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Thu, 02 Apr 2015 21:08:37 +0300 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=koi8-r Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1765 Lines: 43 >> ?The next question I have is about the behavior of the new setting >> ?in the presence of an RA MTU option. ?It seems like the sysctl >> ?doesn't override that RA MTU option, but rather just clamps it. >> >> ?And then if it's in range, this controls only whether the default >> ?route has it's MTU adjusted. >> >> ?That doesn't make any sense to me if we then go and do the >> ?rt6_mtu_change() call unconditionally. ?The route metric update >> ?and the rt6_mtu_change() go hand in hand. > > Agreed but that gets interesting: > > I guess during testing the cnf.mtu6 value was equal to the newly > announced mtu value, so the rt6_mtu_change call does not happen. We > update cnf.mtu6 so a second RA packet would actually bring the system > into the desired state but we have a moment where the default route > carries a too big MTU. That's not good. Agreed. > Easiest solution is to reorder those calls but that also leaves us with > a time frame where we carry the incorrect MTU on the default route. > Otherwise we must conditionally filter out the default routes. > Roman, any ideas? I think, such approach will work on practise, but looks not very beatiful. May be, a better idea is to serarate per-route and per-device MTU, so an updating of per-device MTU will not affect per-route MTU. Actual MTU can always been calculated as min(route_mtu, device_mtu), but we wouldn't need to update mtu on each route on receiving RA MTU option, for instance. Do you see any problems with such approach? Thanks, Roman -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/