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.

ipv6: replace IS_BUILTIN(CONFIG_IPV6) with IS_ENABLED(CONFIG_IPV6)

As IPv6 is built-in only, it does not make sense to continue using
IS_BUILTIN(CONFIG_IPV6). Therefore, replace it with IS_ENABLED() when
necessary and drop it if it isn't valid anymore.

Notice that there is still one instance related to ICMPv6, as it
requires more changes it will be handle separately.

Signed-off-by: Fernando Fernandez Mancera <fmancera@suse.de>
Tested-by: Ricardo B. Marlière <rbm@suse.com>
Acked-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://patch.msgid.link/20260325120928.15848-4-fmancera@suse.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Fernando Fernandez Mancera and committed by
Jakub Kicinski
fde39f7d 0557a344

+12 -18
+1 -1
include/linux/indirect_call_wrapper.h
··· 57 57 * builtin, this macro simplify dealing with indirect calls with only ipv4/ipv6 58 58 * alternatives 59 59 */ 60 - #if IS_BUILTIN(CONFIG_IPV6) 60 + #if IS_ENABLED(CONFIG_IPV6) 61 61 #define INDIRECT_CALL_INET(f, f2, f1, ...) \ 62 62 INDIRECT_CALL_2(f, f2, f1, __VA_ARGS__) 63 63 #elif IS_ENABLED(CONFIG_INET)
+1 -1
include/net/ip6_fib.h
··· 599 599 void fib6_info_hw_flags_set(struct net *net, struct fib6_info *f6i, 600 600 bool offload, bool trap, bool offload_failed); 601 601 602 - #if IS_BUILTIN(CONFIG_IPV6) && defined(CONFIG_BPF_SYSCALL) 602 + #if IS_ENABLED(CONFIG_IPV6) && defined(CONFIG_BPF_SYSCALL) 603 603 struct bpf_iter__ipv6_route { 604 604 __bpf_md_ptr(struct bpf_iter_meta *, meta); 605 605 __bpf_md_ptr(struct fib6_info *, rt);
+7 -7
net/core/filter.c
··· 7590 7590 ret = __cookie_v4_check((struct iphdr *)iph, th); 7591 7591 break; 7592 7592 7593 - #if IS_BUILTIN(CONFIG_IPV6) 7593 + #if IS_ENABLED(CONFIG_IPV6) 7594 7594 case 6: 7595 7595 if (unlikely(iph_len < sizeof(struct ipv6hdr))) 7596 7596 return -EINVAL; ··· 7660 7660 mss = tcp_v4_get_syncookie(sk, iph, th, &cookie); 7661 7661 break; 7662 7662 7663 - #if IS_BUILTIN(CONFIG_IPV6) 7663 + #if IS_ENABLED(CONFIG_IPV6) 7664 7664 case 6: 7665 7665 if (unlikely(iph_len < sizeof(struct ipv6hdr))) 7666 7666 return -EINVAL; ··· 8026 8026 BPF_CALL_3(bpf_tcp_raw_gen_syncookie_ipv6, struct ipv6hdr *, iph, 8027 8027 struct tcphdr *, th, u32, th_len) 8028 8028 { 8029 - #if IS_BUILTIN(CONFIG_IPV6) 8029 + #if IS_ENABLED(CONFIG_IPV6) 8030 8030 const u16 mss_clamp = IPV6_MIN_MTU - sizeof(struct tcphdr) - 8031 8031 sizeof(struct ipv6hdr); 8032 8032 u32 cookie; ··· 8078 8078 BPF_CALL_2(bpf_tcp_raw_check_syncookie_ipv6, struct ipv6hdr *, iph, 8079 8079 struct tcphdr *, th) 8080 8080 { 8081 - #if IS_BUILTIN(CONFIG_IPV6) 8081 + #if IS_ENABLED(CONFIG_IPV6) 8082 8082 if (__cookie_v6_check(iph, th) > 0) 8083 8083 return 0; 8084 8084 ··· 11964 11964 return (unsigned long)sk; 11965 11965 #endif 11966 11966 11967 - #if IS_BUILTIN(CONFIG_IPV6) 11967 + #if IS_ENABLED(CONFIG_IPV6) 11968 11968 if (sk && sk->sk_prot == &tcpv6_prot && sk->sk_state == TCP_TIME_WAIT) 11969 11969 return (unsigned long)sk; 11970 11970 #endif ··· 11987 11987 return (unsigned long)sk; 11988 11988 #endif 11989 11989 11990 - #if IS_BUILTIN(CONFIG_IPV6) 11990 + #if IS_ENABLED(CONFIG_IPV6) 11991 11991 if (sk && sk->sk_prot == &tcpv6_prot && sk->sk_state == TCP_NEW_SYN_RECV) 11992 11992 return (unsigned long)sk; 11993 11993 #endif ··· 12250 12250 ops = &tcp_request_sock_ops; 12251 12251 min_mss = 536; 12252 12252 break; 12253 - #if IS_BUILTIN(CONFIG_IPV6) 12253 + #if IS_ENABLED(CONFIG_IPV6) 12254 12254 case htons(ETH_P_IPV6): 12255 12255 ops = &tcp6_request_sock_ops; 12256 12256 min_mss = IPV6_MIN_MTU - 60;
+1 -1
net/ipv6/ip6_fib.c
··· 2774 2774 rcu_read_unlock(); 2775 2775 } 2776 2776 2777 - #if IS_BUILTIN(CONFIG_IPV6) && defined(CONFIG_BPF_SYSCALL) 2777 + #if defined(CONFIG_BPF_SYSCALL) 2778 2778 static int ipv6_route_prog_seq_show(struct bpf_prog *prog, 2779 2779 struct bpf_iter_meta *meta, 2780 2780 void *v)
+2 -2
net/ipv6/ip6_offload.c
··· 286 286 287 287 if (likely(proto == IPPROTO_TCP)) 288 288 pp = tcp6_gro_receive(head, skb); 289 - #if IS_BUILTIN(CONFIG_IPV6) 289 + #if IS_ENABLED(CONFIG_IPV6) 290 290 else if (likely(proto == IPPROTO_UDP)) 291 291 pp = udp6_gro_receive(head, skb); 292 292 #endif ··· 346 346 347 347 if (likely(ops == &net_hotdata.tcpv6_offload)) 348 348 return tcp6_gro_complete(skb, nhoff); 349 - #if IS_BUILTIN(CONFIG_IPV6) 349 + #if IS_ENABLED(CONFIG_IPV6) 350 350 if (ops == &net_hotdata.udpv6_offload) 351 351 return udp6_gro_complete(skb, nhoff); 352 352 #endif
-6
net/ipv6/route.c
··· 6826 6826 #endif 6827 6827 } 6828 6828 6829 - #if IS_BUILTIN(CONFIG_IPV6) 6830 6829 #if defined(CONFIG_BPF_SYSCALL) && defined(CONFIG_PROC_FS) 6831 6830 DEFINE_BPF_ITER_FUNC(ipv6_route, struct bpf_iter_meta *meta, struct fib6_info *rt) 6832 6831 ··· 6858 6859 { 6859 6860 bpf_iter_unreg_target(&ipv6_route_reg_info); 6860 6861 } 6861 - #endif 6862 6862 #endif 6863 6863 6864 6864 static const struct rtnl_msg_handler ip6_route_rtnl_msg_handlers[] __initconst_or_module = { ··· 6919 6921 if (ret) 6920 6922 goto out_register_late_subsys; 6921 6923 6922 - #if IS_BUILTIN(CONFIG_IPV6) 6923 6924 #if defined(CONFIG_BPF_SYSCALL) && defined(CONFIG_PROC_FS) 6924 6925 ret = bpf_iter_register(); 6925 6926 if (ret) 6926 6927 goto out_register_late_subsys; 6927 - #endif 6928 6928 #endif 6929 6929 6930 6930 for_each_possible_cpu(cpu) { ··· 6957 6961 6958 6962 void ip6_route_cleanup(void) 6959 6963 { 6960 - #if IS_BUILTIN(CONFIG_IPV6) 6961 6964 #if defined(CONFIG_BPF_SYSCALL) && defined(CONFIG_PROC_FS) 6962 6965 bpf_iter_unregister(); 6963 - #endif 6964 6966 #endif 6965 6967 unregister_netdevice_notifier(&ip6_route_dev_notifier); 6966 6968 unregister_pernet_subsys(&ip6_route_net_late_ops);