From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next 0/8] l2tp: rework pppol2tp ioctl handling Date: Sat, 11 Aug 2018 12:19:56 -0700 (PDT) Message-ID: <20180811.121956.1849335409709003000.davem@davemloft.net> References: Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, jchapman@katalix.com To: g.nault@alphalink.fr Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:46440 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727218AbeHKWam (ORCPT ); Sat, 11 Aug 2018 18:30:42 -0400 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: From: Guillaume Nault Date: Fri, 10 Aug 2018 13:21:54 +0200 > The current ioctl() handling code can be simplified. It tests for > non-relevant conditions and uselessly holds sockets. Once useless > code is removed, it becomes even simpler to let pppol2tp_ioctl() handle > commands directly, rather than dispatch them to pppol2tp_tunnel_ioctl() > or pppol2tp_session_ioctl(). That is the approach taken by this series. > > Patch #1 and #2 define helper functions aimed at simplifying the rest > of the patch set. > > Patch #3 drops useless tests in pppol2p_ioctl() and avoid holding a > refcount on the socket. > > Patches #4, #5 and #6 are the core of the series. They let > pppol2tp_ioctl() handle all ioctls and drop the tunnel and session > specific functions. > > Then patch #6 brings a little bit of consolidation. > > Finally, patch #7 takes advantage of the simplified code to make > pppol2tp sockets compatible with dev_ioctl(). Certainly not a killer > feature, but it is trivial and it is always nice to see l2tp getting > better integration with the rest of the stack. Very nice cleanups. Let's leave the -ENOSYS stuff there for now, changing error return codes seems to always break something :-/ Series applied, thanks!