freebsd-src/sys/net
Gleb Smirnoff 507f87a799 sockets: retire sorflush()
With removal of dom_dispose method the function boils down to two
meaningful function calls: socantrcvmore() and sbrelease().  The latter is
only relevant for protocols that use generic socket buffers.

The socket I/O sx(9) lock acquisition in sorflush() is not relevant for
shutdown(2) operation as it doesn't do any I/O that may interleave with
read(2) or write(2).  The socket buffer mutex acquisition inside
sbrelease() is what guarantees thread safety.  This sx(9) acquisition in
soshutdown() can be tracked down to 4.4BSD times, where it used to be
sblock(), and it was carried over through the years evolving together with
sockets with no reconsideration of why do we carry it over.  I can't tell
if that sblock() made sense back then, but it doesn't make any today.

Reviewed by:		tuexen
Differential Revision:	https://reviews.freebsd.org/D43415
2024-01-16 10:30:49 -08:00
..
altq sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
route sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
bpf.c sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
bpf.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
bpf_buffer.c sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
bpf_buffer.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
bpf_filter.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
bpf_jitter.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
bpf_jitter.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
bpf_zerocopy.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
bpf_zerocopy.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
bpfdesc.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
bridgestp.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
bridgestp.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
debugnet.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
debugnet.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
debugnet_inet.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
debugnet_int.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
dlt.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
ethernet.h Teach if_smsc to get MAC from bootargs. 2023-12-07 12:32:01 +01:00
firewire.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ieee8023ad_lacp.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ieee8023ad_lacp.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ieee_oui.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
if.c sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
if.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
if_arp.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
if_bridge.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
if_bridgevar.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
if_clone.c sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
if_clone.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
if_dead.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
if_disc.c sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
if_dl.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
if_edsc.c sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
if_enc.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
if_enc.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
if_epair.c sys: Use mbufq_empty instead of comparing mbufq_len against 0 2024-01-09 11:00:46 -08:00
if_ethersubr.c Teach if_smsc to get MAC from bootargs. 2023-12-07 12:32:01 +01:00
if_fwsubr.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
if_gif.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
if_gif.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
if_gre.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
if_gre.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
if_infiniband.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
if_ipsec.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
if_ipsec.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
if_lagg.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
if_lagg.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
if_llatbl.c lltable: fix ddb show llentry l3_addr pretty printer 2023-10-17 19:03:49 +02:00
if_llatbl.h sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
if_llc.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
if_loop.c sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
if_me.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
if_media.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
if_media.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
if_mib.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
if_mib.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
if_ovpn.c sockets: don't malloc/free sockaddr memory on getpeername/getsockname 2023-11-30 08:31:10 -08:00
if_ovpn.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
if_pflog.h pflog: pass the action to pflog directly 2024-01-04 23:08:08 +01:00
if_pfsync.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
if_private.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
if_stf.c sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
if_stf.h if_stf: make if_stf.h self-contained 2021-12-17 12:38:34 +01:00
if_strings.h ifnet: fix if_strings.h build check 2023-06-16 15:54:29 +00:00
if_tap.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
if_tun.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
if_tuntap.c if_tun: check device name 2023-12-12 06:02:11 +02:00
if_types.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
if_var.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
if_vlan.c netlink: move NETLINK define to opt_global.h 2023-10-13 09:23:47 +02:00
if_vlan_var.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
if_vxlan.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
if_vxlan.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ifdi_if.m iflib: invert default restart on VLAN changes 2023-08-24 13:48:19 -07:00
iflib.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
iflib.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ifq.c sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
ifq.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
infiniband.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
mp_ring.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
mp_ring.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
mppc.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
mppcc.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
mppcd.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
netisr.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
netisr.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
netisr_internal.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
netmap.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
netmap_legacy.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
netmap_user.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
netmap_virt.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
paravirt.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
pfil.c pfil: don't leak pfil_head_t on interface detach 2023-12-21 10:53:49 -08:00
pfil.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
pfkeyv2.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
pflow.h pflow: Turn `pflowstats' statistics counters into per-CPU counters to make them mpsafe. 2024-01-16 09:45:55 +01:00
pfvar.h pf: store state creation/expiration timestamps with milisecond precision 2024-01-16 09:45:54 +01:00
ppp_defs.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
radix.c sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
radix.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
rndis.h net: Fix typo (triple S) 2023-12-27 20:24:32 -07:00
route.c sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
route.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
rss_config.c sys: Remove $FreeBSD$: two-line .c pattern 2023-08-16 11:54:30 -06:00
rss_config.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
rtsock.c sockets: retire sorflush() 2024-01-16 10:30:49 -08:00
sff8436.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
sff8472.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
slcompress.c sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
slcompress.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
toeplitz.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
toeplitz.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
vnet.c vnet: (read) lock the vnet list while iterating it 2023-12-07 13:34:47 +01:00
vnet.h sysctl: Update 'master' copy of vnet SYSCTLs on kernel environment variables change 2023-09-21 12:11:28 +08:00