Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753192AbdDKTMS (ORCPT ); Tue, 11 Apr 2017 15:12:18 -0400 Received: from mail-qk0-f193.google.com ([209.85.220.193]:33492 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752151AbdDKTMO (ORCPT ); Tue, 11 Apr 2017 15:12:14 -0400 MIME-Version: 1.0 In-Reply-To: <20170411170556.ciofp3nkttyhjwh3@alphalink.fr> References: <20170411104048.2lef7jl4f4qxqct3@alphalink.fr> <20170411170556.ciofp3nkttyhjwh3@alphalink.fr> From: R Parameswaran Date: Tue, 11 Apr 2017 12:12:13 -0700 Message-ID: Subject: Re: [PATCH net-next v5 2/2] L2TP:Adjust intf MTU, add underlay L3, L2 hdrs. To: Guillaume Nault Cc: Linux Kernel Network Developers , James Chapman , kleptog@svana.org, Nachi Prachanda , Robert Shearman , Stephen Hemminger , Sven-Thorsten Dietrich , Chas Williams III , Luca Boccassi , Derek Fawcus , Bill Hong , Jan Blunck , David Miller , LKML Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2146 Lines: 53 Hi Guillaume, Please see inline: On Tue, Apr 11, 2017 at 10:05 AM, Guillaume Nault wrote: > On Tue, Apr 11, 2017 at 09:39:58AM -0700, R Parameswaran wrote: >> Hi Guillaume, >> >> On Tue, Apr 11, 2017 at 3:40 AM, Guillaume Nault wrote: >> > On Wed, Apr 05, 2017 at 05:00:07PM -0700, R. Parameswaran wrote: >> >> >> >> Change-set here uses the new kernel function, kernel_sock_ip_overhead(), >> >> to factor the outer IP overhead on the L2TP tunnel socket (including >> >> IP Options, if any) when calculating the default MTU for an Ethernet >> >> pseudowire, along with consideration of the inner Ethernet header. >> >> >> > I get the following warning with CONFIG_LOCKDEP when creating a new >> > session: >> > # ip l2tp add tunnel local 10.1.8.64 remote 10.1.8.32 udp_sport 1701 udp_dport 1701 tunnel_id 1 peer_tunnel_id 1 >> > # ip l2tp add session tunnel_id 1 session_id 1 peer_session_id 1 >> > ... >> >> Thanks for reporting this - I'll try and put up a patch soon, >> hopefully the patch can stay in while I add this. One Q - how many CPU >> cores do you have? > This is a virtual machine with 4 vcores, but that shouldn't matter. > >> Can you give me some idea of how many tunnels and >> sessions when you saw this? >> > Creating one session is enough. I simply used the following command: > # ip l2tp add tunnel local 10.1.8.64 remote 10.1.8.32 udp_sport 1701 udp_dport 1701 tunnel_id 1 peer_tunnel_id 1 > # ip l2tp add session tunnel_id 1 session_id 1 peer_session_id 1 > >> I did not see this warning in my testing, possibly because >> CONFIG_LOCKDEP_SUPPORT is turned off on the product build? Will >> re-test with this turned on. >> > Yes, enabling lockdep should let you reproduce the problem. > > The issue goes away if the tunnel's socket is locked while calling > kernel_sock_ip_overhead(): > + lock_sock(tunnel->sock); > kernel_sock_ip_overhead(tunnel->sock); > + release_sock(tunnel->sock); Ack, thanks - was thinking along this line, since I see similar code at other places in L2TP. I'll try and have a preliminary patch out by tonight. regards, Ramkumar