Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: convert remaining ipv6_stub users to direct function calls

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>
Tested-by: Ricardo B. Marlière <rbm@suse.com>
Link: https://patch.msgid.link/20260325120928.15848-9-fmancera@suse.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Fernando Fernandez Mancera and committed by
Jakub Kicinski
d76f6b17 d98adfbd

+13 -20
+1 -1
include/net/udp_tunnel.h
··· 230 230 231 231 #if IS_ENABLED(CONFIG_IPV6) 232 232 if (READ_ONCE(sk->sk_family) == PF_INET6) 233 - ipv6_stub->udpv6_encap_enable(); 233 + udpv6_encap_enable(); 234 234 #endif 235 235 udp_encap_enable(); 236 236 }
+1 -2
net/mpls/af_mpls.c
··· 24 24 #if IS_ENABLED(CONFIG_IPV6) 25 25 #include <net/ipv6.h> 26 26 #endif 27 - #include <net/ipv6_stubs.h> 28 27 #include <net/rtnh.h> 29 28 #include "internal.h" 30 29 ··· 641 642 642 643 memset(&fl6, 0, sizeof(fl6)); 643 644 memcpy(&fl6.daddr, addr, sizeof(struct in6_addr)); 644 - dst = ipv6_stub->ipv6_dst_lookup_flow(net, NULL, &fl6, NULL); 645 + dst = ip6_dst_lookup_flow(net, NULL, &fl6, NULL); 645 646 if (IS_ERR(dst)) 646 647 return ERR_CAST(dst); 647 648
+2 -1
net/openvswitch/actions.c
··· 21 21 #include <net/ip.h> 22 22 #include <net/ipv6.h> 23 23 #include <net/ip6_fib.h> 24 + #include <net/ip6_route.h> 24 25 #include <net/checksum.h> 25 26 #include <net/dsfield.h> 26 27 #include <net/mpls.h> ··· 811 810 skb_dst_set_noref(skb, &ovs_rt.dst); 812 811 IP6CB(skb)->frag_max_size = mru; 813 812 814 - ipv6_stub->ipv6_fragment(net, skb->sk, skb, ovs_vport_output); 813 + ip6_fragment(net, skb->sk, skb, ovs_vport_output); 815 814 refdst_drop(orig_dst); 816 815 } else { 817 816 WARN_ONCE(1, "Failed fragment ->%s: eth=%04x, MRU=%d, MTU=%d.",
+2 -2
net/sched/sch_frag.c
··· 6 6 #include <net/dst.h> 7 7 #include <net/ip.h> 8 8 #include <net/ip6_fib.h> 9 + #include <net/ip6_route.h> 9 10 10 11 struct sch_frag_data { 11 12 unsigned long dst; ··· 128 127 skb_dst_set_noref(skb, &sch_frag_rt.dst); 129 128 IP6CB(skb)->frag_max_size = mru; 130 129 131 - ret = ipv6_stub->ipv6_fragment(net, skb->sk, skb, 132 - sch_frag_xmit); 130 + ret = ip6_fragment(net, skb->sk, skb, sch_frag_xmit); 133 131 local_unlock_nested_bh(&sch_frag_data_storage.bh_lock); 134 132 refdst_drop(orig_dst); 135 133 } else {
+3 -6
net/tipc/udp_media.c
··· 44 44 #include <net/sock.h> 45 45 #include <net/ip.h> 46 46 #include <net/udp_tunnel.h> 47 - #include <net/ipv6_stubs.h> 48 47 #include <linux/tipc_netlink.h> 49 48 #include "core.h" 50 49 #include "addr.h" ··· 206 207 .saddr = src->ipv6, 207 208 .flowi6_proto = IPPROTO_UDP 208 209 }; 209 - ndst = ipv6_stub->ipv6_dst_lookup_flow(net, 210 - ub->ubsock->sk, 211 - &fl6, NULL); 210 + ndst = ip6_dst_lookup_flow(net, ub->ubsock->sk, 211 + &fl6, NULL); 212 212 if (IS_ERR(ndst)) { 213 213 err = PTR_ERR(ndst); 214 214 goto tx_error; ··· 416 418 #if IS_ENABLED(CONFIG_IPV6) 417 419 } else { 418 420 lock_sock(sk); 419 - err = ipv6_stub->ipv6_sock_mc_join(sk, ub->ifindex, 420 - &remote->ipv6); 421 + err = ipv6_sock_mc_join(sk, ub->ifindex, &remote->ipv6); 421 422 release_sock(sk); 422 423 #endif 423 424 }
+1 -4
net/xfrm/espintcp.c
··· 7 7 #include <linux/skmsg.h> 8 8 #include <net/inet_common.h> 9 9 #include <trace/events/sock.h> 10 - #if IS_ENABLED(CONFIG_IPV6) 11 - #include <net/ipv6_stubs.h> 12 - #endif 13 10 #include <net/hotdata.h> 14 11 15 12 static void handle_nonesp(struct espintcp_ctx *ctx, struct sk_buff *skb, ··· 40 43 local_bh_disable(); 41 44 #if IS_ENABLED(CONFIG_IPV6) 42 45 if (sk->sk_family == AF_INET6) 43 - ipv6_stub->xfrm6_rcv_encap(skb, IPPROTO_ESP, 0, TCP_ENCAP_ESPINTCP); 46 + xfrm6_rcv_encap(skb, IPPROTO_ESP, 0, TCP_ENCAP_ESPINTCP); 44 47 else 45 48 #endif 46 49 xfrm4_rcv_encap(skb, IPPROTO_ESP, 0, TCP_ENCAP_ESPINTCP);
+2 -2
net/xfrm/xfrm_nat_keepalive.c
··· 98 98 local_lock_nested_bh(&nat_keepalive_sk_ipv6.bh_lock); 99 99 sk = this_cpu_read(nat_keepalive_sk_ipv6.sock); 100 100 sock_net_set(sk, net); 101 - dst = ipv6_stub->ipv6_dst_lookup_flow(net, sk, &fl6, NULL); 101 + dst = ip6_dst_lookup_flow(net, sk, &fl6, NULL); 102 102 if (IS_ERR(dst)) { 103 103 local_unlock_nested_bh(&nat_keepalive_sk_ipv6.bh_lock); 104 104 return PTR_ERR(dst); 105 105 } 106 106 107 107 skb_dst_set(skb, dst); 108 - err = ipv6_stub->ip6_xmit(sk, skb, &fl6, skb->mark, NULL, 0, 0); 108 + err = ip6_xmit(sk, skb, &fl6, skb->mark, NULL, 0, 0); 109 109 sock_net_set(sk, &init_net); 110 110 local_unlock_nested_bh(&nat_keepalive_sk_ipv6.bh_lock); 111 111 return err;
+1 -2
net/xfrm/xfrm_output.c
··· 20 20 21 21 #if IS_ENABLED(CONFIG_IPV6) 22 22 #include <net/ip6_route.h> 23 - #include <net/ipv6_stubs.h> 24 23 #endif 25 24 26 25 #include "xfrm_inout.h" ··· 899 900 skb->protocol = htons(ETH_P_IPV6); 900 901 901 902 if (xfrm6_local_dontfrag(sk)) 902 - ipv6_stub->xfrm6_local_rxpmtu(skb, mtu); 903 + xfrm6_local_rxpmtu(skb, mtu); 903 904 else if (sk) 904 905 xfrm_local_error(skb, mtu); 905 906 else