From: Fernando Fernandez Mancera <fmancera@suse.de>
To: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
Fernando Fernandez Mancera <fmancera@suse.de>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
Alexander Aring <alex.aring@gmail.com>,
Stefan Schmidt <stefan@datenfreihafen.org>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Aaron Conole <aconole@redhat.com>,
Eelco Chaudron <echaudro@redhat.com>,
Ilya Maximets <i.maximets@ovn.org>,
Jamal Hadi Salim <jhs@mojatatu.com>,
Jiri Pirko <jiri@resnulli.us>, Jon Maloy <jmaloy@redhat.com>,
Steffen Klassert <steffen.klassert@secunet.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
Kuniyuki Iwashima <kuniyu@google.com>,
Guillaume Nault <gnault@redhat.com>,
Breno Leitao <leitao@debian.org>,
Stanislav Fomichev <sdf@fomichev.me>, Kees Cook <kees@kernel.org>,
linux-wpan@vger.kernel.org (open list:IEEE 802.15.4 SUBSYSTEM),
dev@openvswitch.org (open list:OPENVSWITCH),
tipc-discussion@lists.sourceforge.net (open list:TIPC NETWORK
LAYER)
Subject: [PATCH 07/10 net-next] net: convert remaining ipv6_stub users to direct function calls
Date: Mon, 9 Mar 2026 03:19:40 +0100 [thread overview]
Message-ID: <20260309022013.5199-8-fmancera@suse.de> (raw)
In-Reply-To: <20260309022013.5199-1-fmancera@suse.de>
As IPv6 is built-in only, the ipv6_stub infrastructure is no longer
necessary.
Convert remaining ipv6_stub users to make direct function calls. The
fallback functions introduced previously will prevent linkage errors
when CONFIG_IPV6 is disabled.
Signed-off-by: Fernando Fernandez Mancera <fmancera@suse.de>
---
include/net/udp_tunnel.h | 2 +-
net/ieee802154/6lowpan/tx.c | 2 +-
net/mpls/af_mpls.c | 3 +--
net/openvswitch/actions.c | 3 ++-
net/sched/sch_frag.c | 4 ++--
net/tipc/udp_media.c | 9 +++------
net/xfrm/espintcp.c | 5 +----
net/xfrm/xfrm_nat_keepalive.c | 4 ++--
net/xfrm/xfrm_output.c | 3 +--
9 files changed, 14 insertions(+), 21 deletions(-)
diff --git a/include/net/udp_tunnel.h b/include/net/udp_tunnel.h
index d9c6d04bb3b5..277f1ce1c02d 100644
--- a/include/net/udp_tunnel.h
+++ b/include/net/udp_tunnel.h
@@ -230,7 +230,7 @@ static inline void udp_tunnel_encap_enable(struct sock *sk)
#if IS_ENABLED(CONFIG_IPV6)
if (READ_ONCE(sk->sk_family) == PF_INET6)
- ipv6_stub->udpv6_encap_enable();
+ udpv6_encap_enable();
#endif
udp_encap_enable();
}
diff --git a/net/ieee802154/6lowpan/tx.c b/net/ieee802154/6lowpan/tx.c
index 0c07662b44c0..69ec02386aaa 100644
--- a/net/ieee802154/6lowpan/tx.c
+++ b/net/ieee802154/6lowpan/tx.c
@@ -59,7 +59,7 @@ int lowpan_header_create(struct sk_buff *skb, struct net_device *ldev,
} else {
__le16 short_addr = cpu_to_le16(IEEE802154_ADDR_SHORT_UNSPEC);
- n = neigh_lookup(&nd_tbl, &hdr->daddr, ldev);
+ n = neigh_lookup(ipv6_get_nd_tbl(), &hdr->daddr, ldev);
if (n) {
llneigh = lowpan_802154_neigh(neighbour_priv(n));
read_lock_bh(&n->lock);
diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c
index ae85a7654b1f..8b4c0b7d55a2 100644
--- a/net/mpls/af_mpls.c
+++ b/net/mpls/af_mpls.c
@@ -24,7 +24,6 @@
#if IS_ENABLED(CONFIG_IPV6)
#include <net/ipv6.h>
#endif
-#include <net/ipv6_stubs.h>
#include <net/rtnh.h>
#include "internal.h"
@@ -642,7 +641,7 @@ static struct net_device *inet6_fib_lookup_dev(struct net *net,
memset(&fl6, 0, sizeof(fl6));
memcpy(&fl6.daddr, addr, sizeof(struct in6_addr));
- dst = ipv6_stub->ipv6_dst_lookup_flow(net, NULL, &fl6, NULL);
+ dst = ip6_dst_lookup_flow(net, NULL, &fl6, NULL);
if (IS_ERR(dst))
return ERR_CAST(dst);
diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c
index 792ca44a461d..140388a18ae0 100644
--- a/net/openvswitch/actions.c
+++ b/net/openvswitch/actions.c
@@ -21,6 +21,7 @@
#include <net/ip.h>
#include <net/ipv6.h>
#include <net/ip6_fib.h>
+#include <net/ip6_route.h>
#include <net/checksum.h>
#include <net/dsfield.h>
#include <net/mpls.h>
@@ -810,7 +811,7 @@ static void ovs_fragment(struct net *net, struct vport *vport,
skb_dst_set_noref(skb, &ovs_rt.dst);
IP6CB(skb)->frag_max_size = mru;
- ipv6_stub->ipv6_fragment(net, skb->sk, skb, ovs_vport_output);
+ ip6_fragment(net, skb->sk, skb, ovs_vport_output);
refdst_drop(orig_dst);
} else {
WARN_ONCE(1, "Failed fragment ->%s: eth=%04x, MRU=%d, MTU=%d.",
diff --git a/net/sched/sch_frag.c b/net/sched/sch_frag.c
index d1d87dce7f3f..75ee52750919 100644
--- a/net/sched/sch_frag.c
+++ b/net/sched/sch_frag.c
@@ -6,6 +6,7 @@
#include <net/dst.h>
#include <net/ip.h>
#include <net/ip6_fib.h>
+#include <net/ip6_route.h>
struct sch_frag_data {
unsigned long dst;
@@ -127,8 +128,7 @@ static int sch_fragment(struct net *net, struct sk_buff *skb,
skb_dst_set_noref(skb, &sch_frag_rt.dst);
IP6CB(skb)->frag_max_size = mru;
- ret = ipv6_stub->ipv6_fragment(net, skb->sk, skb,
- sch_frag_xmit);
+ ret = ip6_fragment(net, skb->sk, skb, sch_frag_xmit);
local_unlock_nested_bh(&sch_frag_data_storage.bh_lock);
refdst_drop(orig_dst);
} else {
diff --git a/net/tipc/udp_media.c b/net/tipc/udp_media.c
index 2b8e385d1e51..2c66b356025a 100644
--- a/net/tipc/udp_media.c
+++ b/net/tipc/udp_media.c
@@ -44,7 +44,6 @@
#include <net/sock.h>
#include <net/ip.h>
#include <net/udp_tunnel.h>
-#include <net/ipv6_stubs.h>
#include <linux/tipc_netlink.h>
#include "core.h"
#include "addr.h"
@@ -207,9 +206,8 @@ static int tipc_udp_xmit(struct net *net, struct sk_buff *skb,
.saddr = src->ipv6,
.flowi6_proto = IPPROTO_UDP
};
- ndst = ipv6_stub->ipv6_dst_lookup_flow(net,
- ub->ubsock->sk,
- &fl6, NULL);
+ ndst = ip6_dst_lookup_flow(net, ub->ubsock->sk,
+ &fl6, NULL);
if (IS_ERR(ndst)) {
err = PTR_ERR(ndst);
goto tx_error;
@@ -418,8 +416,7 @@ static int enable_mcast(struct udp_bearer *ub, struct udp_media_addr *remote)
#if IS_ENABLED(CONFIG_IPV6)
} else {
lock_sock(sk);
- err = ipv6_stub->ipv6_sock_mc_join(sk, ub->ifindex,
- &remote->ipv6);
+ err = ipv6_sock_mc_join(sk, ub->ifindex, &remote->ipv6);
release_sock(sk);
#endif
}
diff --git a/net/xfrm/espintcp.c b/net/xfrm/espintcp.c
index 998832419097..a2756186e13a 100644
--- a/net/xfrm/espintcp.c
+++ b/net/xfrm/espintcp.c
@@ -7,9 +7,6 @@
#include <linux/skmsg.h>
#include <net/inet_common.h>
#include <trace/events/sock.h>
-#if IS_ENABLED(CONFIG_IPV6)
-#include <net/ipv6_stubs.h>
-#endif
#include <net/hotdata.h>
static void handle_nonesp(struct espintcp_ctx *ctx, struct sk_buff *skb,
@@ -43,7 +40,7 @@ static void handle_esp(struct sk_buff *skb, struct sock *sk)
local_bh_disable();
#if IS_ENABLED(CONFIG_IPV6)
if (sk->sk_family == AF_INET6)
- ipv6_stub->xfrm6_rcv_encap(skb, IPPROTO_ESP, 0, TCP_ENCAP_ESPINTCP);
+ xfrm6_rcv_encap(skb, IPPROTO_ESP, 0, TCP_ENCAP_ESPINTCP);
else
#endif
xfrm4_rcv_encap(skb, IPPROTO_ESP, 0, TCP_ENCAP_ESPINTCP);
diff --git a/net/xfrm/xfrm_nat_keepalive.c b/net/xfrm/xfrm_nat_keepalive.c
index ebf95d48e86c..d47f2ed8005c 100644
--- a/net/xfrm/xfrm_nat_keepalive.c
+++ b/net/xfrm/xfrm_nat_keepalive.c
@@ -98,14 +98,14 @@ static int nat_keepalive_send_ipv6(struct sk_buff *skb,
local_lock_nested_bh(&nat_keepalive_sk_ipv6.bh_lock);
sk = this_cpu_read(nat_keepalive_sk_ipv6.sock);
sock_net_set(sk, net);
- dst = ipv6_stub->ipv6_dst_lookup_flow(net, sk, &fl6, NULL);
+ dst = ip6_dst_lookup_flow(net, sk, &fl6, NULL);
if (IS_ERR(dst)) {
local_unlock_nested_bh(&nat_keepalive_sk_ipv6.bh_lock);
return PTR_ERR(dst);
}
skb_dst_set(skb, dst);
- err = ipv6_stub->ip6_xmit(sk, skb, &fl6, skb->mark, NULL, 0, 0);
+ err = ip6_xmit(sk, skb, &fl6, skb->mark, NULL, 0, 0);
sock_net_set(sk, &init_net);
local_unlock_nested_bh(&nat_keepalive_sk_ipv6.bh_lock);
return err;
diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c
index 54222fcbd7fd..a9652b422f51 100644
--- a/net/xfrm/xfrm_output.c
+++ b/net/xfrm/xfrm_output.c
@@ -20,7 +20,6 @@
#if IS_ENABLED(CONFIG_IPV6)
#include <net/ip6_route.h>
-#include <net/ipv6_stubs.h>
#endif
#include "xfrm_inout.h"
@@ -900,7 +899,7 @@ int xfrm6_tunnel_check_size(struct sk_buff *skb)
skb->protocol = htons(ETH_P_IPV6);
if (xfrm6_local_dontfrag(sk))
- ipv6_stub->xfrm6_local_rxpmtu(skb, mtu);
+ xfrm6_local_rxpmtu(skb, mtu);
else if (sk)
xfrm_local_error(skb, mtu);
else
--
2.53.0
next prev parent reply other threads:[~2026-03-09 2:21 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-09 2:19 [PATCH 00/10 net-next] Convert CONFIG_IPV6 to built-in and remove stubs Fernando Fernandez Mancera
2026-03-09 2:19 ` [PATCH 01/10 net-next] ipv6: convert CONFIG_IPV6 to built-in only and clean up Kconfigs Fernando Fernandez Mancera
2026-03-09 10:24 ` Krzysztof Kozlowski
2026-03-10 19:40 ` Kolbjørn Barmen
2026-03-10 19:58 ` Arnd Bergmann
2026-03-10 20:35 ` Sabrina Dubroca
2026-03-10 21:18 ` Bjørn Mork
2026-03-10 22:18 ` Arnd Bergmann
2026-03-11 8:21 ` Geert Uytterhoeven
2026-03-09 2:19 ` [PATCH 02/10 net-next] ipv6: replace IS_BUILTIN(CONFIG_IPV6) with IS_ENABLED(CONFIG_IPV6) Fernando Fernandez Mancera
2026-03-09 2:19 ` [PATCH 03/10 net-next] ipv6: remove dynamic ICMPv6 sender registration infrastructure Fernando Fernandez Mancera
2026-03-09 2:19 ` [PATCH 04/10 net-next] ipv6: prepare headers for ipv6_stub removal Fernando Fernandez Mancera
2026-03-09 2:19 ` [PATCH 05/10 net-next] drivers: net: drop ipv6_stub usage and use direct function calls Fernando Fernandez Mancera
2026-03-09 2:19 ` [PATCH 06/10 net-next] ipv4: " Fernando Fernandez Mancera
2026-03-09 2:19 ` Fernando Fernandez Mancera [this message]
2026-03-09 2:19 ` [PATCH 08/10 net-next] bpf: remove ipv6_bpf_stub completely " Fernando Fernandez Mancera
2026-03-09 2:19 ` [PATCH 09/10 net-next] ipv6: remove ipv6_stub infrastructure completely Fernando Fernandez Mancera
2026-03-09 2:19 ` [PATCH 10/10 net-next] netfilter: remove nf_ipv6_ops and use direct function calls Fernando Fernandez Mancera
2026-03-09 10:22 ` [PATCH 00/10 net-next] Convert CONFIG_IPV6 to built-in and remove stubs Krzysztof Kozlowski
2026-03-09 10:26 ` Krzysztof Kozlowski
2026-03-09 23:18 ` Jakub Kicinski
2026-03-10 20:02 ` Krzysztof Kozlowski
2026-03-10 21:42 ` Jakub Kicinski
2026-03-10 22:15 ` Fernando Fernandez Mancera
2026-03-09 11:33 ` David Woodhouse
2026-03-09 11:38 ` Fernando Fernandez Mancera
2026-03-09 12:43 ` Krzysztof Kozlowski
2026-03-09 12:58 ` Daniel Borkmann
2026-03-09 13:02 ` Krzysztof Kozlowski
2026-03-09 13:14 ` Fernando Fernandez Mancera
2026-03-16 10:24 ` Lorenzo Stoakes (Oracle)
2026-03-16 10:33 ` Krzysztof Kozlowski
2026-03-16 10:50 ` Lorenzo Stoakes (Oracle)
2026-03-16 10:58 ` Krzysztof Kozlowski
2026-03-16 11:10 ` Vlastimil Babka
2026-03-16 11:17 ` Krzysztof Kozlowski
2026-03-09 13:07 ` Fernando Fernandez Mancera
2026-03-09 14:47 ` Jakub Kicinski
2026-03-09 15:10 ` Fernando Fernandez Mancera
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=20260309022013.5199-8-fmancera@suse.de \
--to=fmancera@suse.de \
--cc=aconole@redhat.com \
--cc=alex.aring@gmail.com \
--cc=davem@davemloft.net \
--cc=dev@openvswitch.org \
--cc=echaudro@redhat.com \
--cc=edumazet@google.com \
--cc=gnault@redhat.com \
--cc=herbert@gondor.apana.org.au \
--cc=horms@kernel.org \
--cc=i.maximets@ovn.org \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=jmaloy@redhat.com \
--cc=kees@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=leitao@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wpan@vger.kernel.org \
--cc=miquel.raynal@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@fomichev.me \
--cc=stefan@datenfreihafen.org \
--cc=steffen.klassert@secunet.com \
--cc=tipc-discussion@lists.sourceforge.net \
/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