netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: James Chapman <jchapman@katalix.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, dsahern@kernel.org,
	tparkin@katalix.com
Subject: Re: [RFC PATCH 01/15] l2tp: lookup tunnel from socket without using sk_user_data
Date: Wed, 24 Jul 2024 17:33:16 +0100	[thread overview]
Message-ID: <20240724163316.GC97837@kernel.org> (raw)
In-Reply-To: <be825ed1ae6e5756e85dbae8ac0afc6c48ce86fb.1721733730.git.jchapman@katalix.com>

On Tue, Jul 23, 2024 at 02:51:29PM +0100, James Chapman wrote:
> l2tp_sk_to_tunnel derives the tunnel from sk_user_data. Instead,
> lookup the tunnel by walking the tunnel IDR for a tunnel using the
> indicated sock. This is slow but l2tp_sk_to_tunnel is not used in
> the datapath so performance isn't critical.
> 
> l2tp_tunnel_destruct needs a variant of l2tp_sk_to_tunnel which does
> not bump the tunnel refcount since the tunnel refcount is already 0.
> 
> Change l2tp_sk_to_tunnel sk arg to const since it does not modify sk.

nit: This needs a Signed-off-by line

> ---
>  net/l2tp/l2tp_core.c | 52 ++++++++++++++++++++++++++++++++++++--------
>  net/l2tp/l2tp_core.h |  5 +----
>  net/l2tp/l2tp_ip.c   |  7 ++++--
>  net/l2tp/l2tp_ip6.c  |  7 ++++--
>  4 files changed, 54 insertions(+), 17 deletions(-)

...

  reply	other threads:[~2024-07-24 16:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-23 13:51 [RFC PATCH 00/15] l2tp: simplify tunnel and session cleanup James Chapman
2024-07-23 13:51 ` [RFC PATCH 01/15] l2tp: lookup tunnel from socket without using sk_user_data James Chapman
2024-07-24 16:33   ` Simon Horman [this message]
2024-07-25  7:44     ` James Chapman
2024-07-23 13:51 ` [RFC PATCH 02/15] ipv4: export ip_flush_pending_frames James Chapman
2024-07-23 13:51 ` [RFC PATCH 03/15] l2tp: have l2tp_ip_destroy_sock use ip_flush_pending_frames James Chapman
2024-07-23 13:51 ` [RFC PATCH 04/15] l2tp: don't use tunnel socket sk_user_data in ppp procfs output James Chapman
2024-07-23 13:51 ` [RFC PATCH 05/15] l2tp: don't set sk_user_data in tunnel socket James Chapman
2024-07-23 13:51 ` [RFC PATCH 06/15] l2tp: remove unused tunnel magic field James Chapman
2024-07-23 13:51 ` [RFC PATCH 07/15] l2tp: simplify tunnel and socket cleanup James Chapman
2024-07-23 13:51 ` [RFC PATCH 08/15] l2tp: delete sessions using work queue James Chapman
2024-07-23 13:51 ` [RFC PATCH 09/15] l2tp: free sessions using rcu James Chapman
2024-07-23 13:51 ` [RFC PATCH 10/15] l2tp: refactor ppp socket/session relationship James Chapman
2024-07-23 13:51 ` [RFC PATCH 11/15] l2tp: prevent possible tunnel refcount underflow James Chapman
2024-07-23 13:51 ` [RFC PATCH 12/15] l2tp: use rcu list add/del when updating lists James Chapman
2024-07-23 13:51 ` [RFC PATCH 13/15] l2tp: add idr consistency check in session_register James Chapman
2024-07-23 13:51 ` [RFC PATCH 14/15] l2tp: cleanup eth/ppp pseudowire setup code James Chapman
2024-07-23 13:51 ` [RFC PATCH 15/15] l2tp: use pre_exit pernet hook to avoid rcu_barrier James Chapman

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=20240724163316.GC97837@kernel.org \
    --to=horms@kernel.org \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=jchapman@katalix.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=tparkin@katalix.com \
    /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).