NetBSD/sys/netinet
riastradh 076e35792d if_attach and if_initialize cannot fail, don't test return value
These were originally made failable back in 2017 when if_initialize
allocated a softint in every interface for link state changes, so
that it could fail gracefully instead of panicking:

https://mail-index.NetBSD.org/source-changes/2017/10/23/msg089053.html

However, this spawned many seldom- or never-tested error branches,
which are risky to have around.  And that softint in every interface
has since been replaced by a single global workqueue, because link
state changes require thread context but not low latency or high
throughput:

https://mail-index.NetBSD.org/source-changes/2020/02/06/msg113759.html

So there is no longer any reason for if_initialize to fail.  (The
subroutine if_stats_init can't fail because percpu_alloc can't fail
either.)

There is a snag: the softint_establish in if_percpuq_create could
fail, potentially leading to bad consequences later on trying to use
the softint.  This change doesn't introduce any new bugs because of
the snag -- if_percpuq_attach was already broken.  However, the snag
can be better addressed without spawning error branches, either by
using a single softint or making softints less scarce.

(Separate commit will change the signatures of if_attach and
if_initialize to return void, scheduled to ride whatever is the next
convenient kernel bump.)

Patch and testing on amd64 and evbmips64-eb by maya@; commit message
soliloquy, and compile-testing on evbppc/i386/earmv7hf, by me.
2021-06-16 00:21:17 +00:00
..
Makefile
accept_filter.h
accf_data.c
accf_http.c Use the module subsystem's ability to process SYSCTL_SETUP() entries to 2020-03-16 21:20:09 +00:00
cpu_in_cksum.c
dccp.h
dccp_cc_sw.c
dccp_cc_sw.h
dccp_tcplike.c
dccp_tcplike.h
dccp_tfrc.c s/inital/initial/ 2019-12-27 09:25:57 +00:00
dccp_tfrc.h
dccp_tfrc_lookup.h
dccp_usrreq.c
dccp_var.h
files.ipfilter Build ip_sync.c with -Wno-error to avoid failing due to excessive stack 2020-12-04 00:44:39 +00:00
files.netinet remove now unused pseudo-random ip id code. 2021-03-08 18:03:25 +00:00
icmp6.h icmp6: Remove __packed attribute from icmp6 structures 2020-07-27 14:52:55 +00:00
icmp_private.h - pass the alignment instead of the mask (as Roy asked and to match the 2021-02-17 22:32:04 +00:00
icmp_var.h
if_arp.c - Make ALIGNED_POINTER use __alignof(t) instead of sizeof(t). This is more 2021-02-19 14:51:59 +00:00
if_ether.h Guard CTASSERT 2021-02-03 17:10:13 +00:00
if_inarp.h ARP: Use ND rather than our own. 2020-09-11 15:16:00 +00:00
igmp.c igmp_sendpkt() expects ip_output() to set 'imo.imo_multicast_ttl' into 2020-05-15 06:34:34 +00:00
igmp.h CTASSERT -> __CTASSERT to unbreak userland build. 2021-02-03 18:13:13 +00:00
igmp_var.h - pass the alignment instead of the mask (as Roy asked and to match the 2021-02-17 22:32:04 +00:00
in.c inet: Treat LINK_STATE_UNKNOWN as LINK_STATE_UP when changing 2020-09-29 19:33:36 +00:00
in.h CTASSERT -> __CTASSERT to unbreak userland build. 2021-02-03 18:13:13 +00:00
in4_cksum.c
in_cksum.c
in_gif.c
in_gif.h
in_ifattach.h
in_l2tp.c - Make ALIGNED_POINTER use __alignof(t) instead of sizeof(t). This is more 2021-02-19 14:51:59 +00:00
in_l2tp.h
in_offload.c fix in4_cksum() panic "in4_cksum: mbuf 14 too short for IP header 20" 2020-03-27 16:34:58 +00:00
in_offload.h
in_pcb.c Add IP_BINDANY, IPV6_BINDANY which can be used to bind to any address in 2020-09-08 14:12:57 +00:00
in_pcb.h Add IP_BINDANY, IPV6_BINDANY which can be used to bind to any address in 2020-09-08 14:12:57 +00:00
in_pcb_hdr.h netinet: Include the needful so include order doesn't matter. 2020-08-28 07:01:57 +00:00
in_print.c
in_proto.c
in_proto.h
in_selsrc.c
in_selsrc.h
in_systm.h netinet: Include the needful so include order doesn't matter. 2020-08-28 07:01:57 +00:00
in_var.h mv <sys/cprng.h> include to the kernel portion 2021-03-08 22:01:18 +00:00
ip.h CTASSERT -> __CTASSERT to unbreak userland build. 2021-02-03 18:13:13 +00:00
ip6.h netinet/netinet6: Add necessary includes to make these standalone. 2021-03-07 15:01:00 +00:00
ip_carp.c if_attach and if_initialize cannot fail, don't test return value 2021-06-16 00:21:17 +00:00
ip_carp.h CTASSERT -> __CTASSERT to unbreak userland build. 2021-02-03 18:13:13 +00:00
ip_ecn.c
ip_ecn.h
ip_encap.c Mark KASSERT-only variable __diagused. 2020-08-22 01:43:07 +00:00
ip_encap.h
ip_flow.c - Make ALIGNED_POINTER use __alignof(t) instead of sizeof(t). This is more 2021-02-19 14:51:59 +00:00
ip_icmp.c
ip_icmp.h CTASSERT -> __CTASSERT to unbreak userland build. 2021-02-03 18:13:13 +00:00
ip_input.c remove now unused pseudo-random ip id code. 2021-03-08 18:03:25 +00:00
ip_mroute.c PR kern/55779: 2020-11-12 13:13:45 +00:00
ip_mroute.h CTASSERT -> __CTASSERT to unbreak userland build. 2021-02-03 18:13:13 +00:00
ip_output.c Add IP_BINDANY, IPV6_BINDANY which can be used to bind to any address in 2020-09-08 14:12:57 +00:00
ip_private.h - Make ALIGNED_POINTER use __alignof(t) instead of sizeof(t). This is more 2021-02-19 14:51:59 +00:00
ip_reass.c
ip_var.h CTASSERT -> __CTASSERT to unbreak userland build. 2021-02-03 18:13:13 +00:00
pim.h
pim_var.h
portalgo.c
portalgo.h
raw_ip.c Add IP_BINDANY, IPV6_BINDANY which can be used to bind to any address in 2020-09-08 14:12:57 +00:00
sctp.h
sctp_asconf.c
sctp_asconf.h
sctp_constants.h s/inital/initial/ 2019-12-27 09:25:57 +00:00
sctp_crc32.c
sctp_crc32.h
sctp_hashdriver.c
sctp_hashdriver.h
sctp_header.h
sctp_indata.c
sctp_indata.h
sctp_input.c
sctp_input.h
sctp_output.c SCTP: Use ifp->if_mtu rather than ND_IFINFO(ifp)->linkmtu 2020-06-13 01:41:59 +00:00
sctp_output.h
sctp_pcb.c Omit needless #include <sys/rnd.h>. 2020-04-30 03:30:10 +00:00
sctp_pcb.h Replace kooky sctp random number generation by cprng_strong32(). 2020-01-19 20:51:13 +00:00
sctp_peeloff.c
sctp_peeloff.h
sctp_route.h
sctp_structs.h
sctp_timer.c
sctp_timer.h
sctp_uio.h
sctp_usrreq.c Do sctp_connectx() handling using ioctl() for IPv6 as well. 2020-04-27 19:21:43 +00:00
sctp_var.h Do sctp_connectx() handling using ioctl() for IPv6 as well. 2020-04-27 19:21:43 +00:00
sctputil.c Replace kooky sctp random number generation by cprng_strong32(). 2020-01-19 20:51:13 +00:00
sctputil.h Replace kooky sctp random number generation by cprng_strong32(). 2020-01-19 20:51:13 +00:00
tcp.h CTASSERT -> __CTASSERT to unbreak userland build. 2021-02-03 18:13:13 +00:00
tcp_congctl.c
tcp_congctl.h
tcp_debug.c
tcp_debug.h CTASSERT -> __CTASSERT to unbreak userland build. 2021-02-03 18:13:13 +00:00
tcp_fsm.h
tcp_input.c Remove the unused "addin" argument (it was always 0) and go back using 2021-03-08 18:17:27 +00:00
tcp_output.c Remove in-kernel handling of Router Advertisements 2020-06-12 11:04:44 +00:00
tcp_private.h - Make ALIGNED_POINTER use __alignof(t) instead of sizeof(t). This is more 2021-02-19 14:51:59 +00:00
tcp_sack.c
tcp_seq.h
tcp_subr.c Move the offset addition in one place and mask the random generated value 2021-03-09 13:48:16 +00:00
tcp_timer.c Add some randomness to the iss offset 2021-03-08 17:54:43 +00:00
tcp_timer.h
tcp_usrreq.c Remove the unused "addin" argument (it was always 0) and go back using 2021-03-08 18:17:27 +00:00
tcp_var.h Remove the unused "addin" argument (it was always 0) and go back using 2021-03-08 18:17:27 +00:00
tcp_vtw.c
tcp_vtw.h
tcpip.h
udp.h CTASSERT -> __CTASSERT to unbreak userland build. 2021-02-03 18:13:13 +00:00
udp_private.h - Make ALIGNED_POINTER use __alignof(t) instead of sizeof(t). This is more 2021-02-19 14:51:59 +00:00
udp_usrreq.c - Make ALIGNED_POINTER use __alignof(t) instead of sizeof(t). This is more 2021-02-19 14:51:59 +00:00
udp_var.h Sprinkle CTASSERT to enforce on-wire layout without __packed 2021-02-03 11:53:43 +00:00
wqinput.c Use percpu_foreach_xcall() to gather volatile per-cpu counters. These 2020-02-07 12:35:33 +00:00
wqinput.h