netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guillaume Nault <g.nault@alphalink.fr>
To: netdev@vger.kernel.org
Cc: James Chapman <jchapman@katalix.com>
Subject: [PATCH net-next 0/8] l2tp: rework pppol2tp ioctl handling
Date: Fri, 10 Aug 2018 13:21:54 +0200	[thread overview]
Message-ID: <cover.1533895306.git.g.nault@alphalink.fr> (raw)

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.

Guillaume Nault (8):
  l2tp: define l2tp_tunnel_uses_xfrm()
  l2tp: split l2tp_session_get()
  l2tp: simplify pppol2tp_ioctl()
  l2tp: handle PPPIOC[GS]MRU and PPPIOC[GS]FLAGS in pppol2tp_ioctl()
  l2tp: remove pppol2tp_tunnel_ioctl()
  l2tp: remove pppol2tp_session_ioctl()
  l2tp: zero out stats in pppol2tp_copy_stats()
  l2tp: let pppol2tp_ioctl() fallback to dev_ioctl()

 include/uapi/linux/ppp-ioctl.h |   2 +-
 net/l2tp/l2tp_core.c           |  50 +++----
 net/l2tp/l2tp_core.h           |  25 +++-
 net/l2tp/l2tp_ip.c             |   2 +-
 net/l2tp/l2tp_ip6.c            |   2 +-
 net/l2tp/l2tp_netlink.c        |  11 +-
 net/l2tp/l2tp_ppp.c            | 240 +++++++++++----------------------
 7 files changed, 133 insertions(+), 199 deletions(-)

-- 
2.18.0

             reply	other threads:[~2018-08-10 13:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-10 11:21 Guillaume Nault [this message]
2018-08-10 11:21 ` [PATCH net-next 1/8] l2tp: define l2tp_tunnel_uses_xfrm() Guillaume Nault
2018-08-10 11:21 ` [PATCH net-next 2/8] l2tp: split l2tp_session_get() Guillaume Nault
2018-08-10 11:21 ` [PATCH net-next 3/8] l2tp: simplify pppol2tp_ioctl() Guillaume Nault
2018-08-10 11:21 ` [PATCH net-next 4/8] l2tp: handle PPPIOC[GS]MRU and PPPIOC[GS]FLAGS in pppol2tp_ioctl() Guillaume Nault
2018-08-10 11:22 ` [PATCH net-next 5/8] l2tp: remove pppol2tp_tunnel_ioctl() Guillaume Nault
2018-08-10 11:22 ` [PATCH net-next 6/8] l2tp: remove pppol2tp_session_ioctl() Guillaume Nault
2018-08-10 11:22 ` [PATCH net-next 7/8] l2tp: zero out stats in pppol2tp_copy_stats() Guillaume Nault
2018-08-10 11:22 ` [PATCH net-next 8/8] l2tp: let pppol2tp_ioctl() fallback to dev_ioctl() Guillaume Nault
2018-08-11 19:19 ` [PATCH net-next 0/8] l2tp: rework pppol2tp ioctl handling David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1533895306.git.g.nault@alphalink.fr \
    --to=g.nault@alphalink.fr \
    --cc=jchapman@katalix.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).