From: Qingfang Deng <qingfang.deng@linux.dev>
To: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
Guillaume Nault <gnault@redhat.com>,
Michael Bommarito <michael.bommarito@gmail.com>,
Kuniyuki Iwashima <kuniyu@google.com>,
Alice Mikityanska <alice.kernel@fastmail.im>,
Qingfang Deng <qingfang.deng@linux.dev>,
Chengfeng Ye <nicoyip.dev@gmail.com>,
David Bauer <mail@david-bauer.net>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Linkui Xiao <xiaolinkui@126.com>
Subject: [PATCH net-next v2 2/2] l2tp: unexport l2tp_udp_encap_recv()
Date: Tue, 3 Nov 2026 13:56:12 +0800 [thread overview]
Message-ID: <20261103055614.3729-2-qingfang.deng@linux.dev> (raw)
In-Reply-To: <20261103055614.3729-1-qingfang.deng@linux.dev>
Removing pppol2tp_backlog_recv() eliminated the only caller outside
l2tp_core.c. Make l2tp_udp_encap_recv() static and remove its export
and declaration from l2tp_core.h.
Signed-off-by: Qingfang Deng <qingfang.deng@linux.dev>
---
v2: new patch
---
net/l2tp/l2tp_core.c | 3 +--
net/l2tp/l2tp_core.h | 1 -
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c
index 7e042a3e648c..d575ebb97577 100644
--- a/net/l2tp/l2tp_core.c
+++ b/net/l2tp/l2tp_core.c
@@ -1009,7 +1009,7 @@ static void l2tp_session_queue_purge(struct l2tp_session *session)
}
/* UDP encapsulation receive handler. See net/ipv4/udp.c for details. */
-int l2tp_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
+static int l2tp_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
{
struct l2tp_session *session = NULL;
struct l2tp_tunnel *tunnel = NULL;
@@ -1108,7 +1108,6 @@ int l2tp_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
return 1;
}
-EXPORT_SYMBOL_GPL(l2tp_udp_encap_recv);
/* UDP encapsulation receive error handler. See net/ipv4/udp.c for details. */
static void l2tp_udp_encap_err_recv(struct sock *sk, struct sk_buff *skb, int err,
diff --git a/net/l2tp/l2tp_core.h b/net/l2tp/l2tp_core.h
index 25ae4c25d3ef..371aea239705 100644
--- a/net/l2tp/l2tp_core.h
+++ b/net/l2tp/l2tp_core.h
@@ -254,7 +254,6 @@ void l2tp_session_delete(struct l2tp_session *session);
void l2tp_recv_common(struct l2tp_session *session, struct sk_buff *skb,
unsigned char *ptr, unsigned char *optr, u16 hdrflags,
int length);
-int l2tp_udp_encap_recv(struct sock *sk, struct sk_buff *skb);
/* Transmit path helpers for sending packets over the tunnel socket. */
int l2tp_xmit_skb(struct l2tp_session *session, struct sk_buff *skb);
--
2.43.0
prev parent reply other threads:[~2026-11-03 5:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 5:56 [PATCH net-next v2 1/2] l2tp: ppp: remove unused backlog callback Qingfang Deng
2026-11-03 5:56 ` Qingfang Deng [this message]
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=20261103055614.3729-2-qingfang.deng@linux.dev \
--to=qingfang.deng@linux.dev \
--cc=alice.kernel@fastmail.im \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=gnault@redhat.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mail@david-bauer.net \
--cc=michael.bommarito@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=nicoyip.dev@gmail.com \
--cc=pabeni@redhat.com \
--cc=xiaolinkui@126.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
all inboxes | Powered by JetHome®