HomeFreeBSD

sockets: provide sousrsend() that does socket specific error handling

Description

sockets: provide sousrsend() that does socket specific error handling

Sockets have special handling for EPIPE on a write, that was spread out
into several places. Treating transient errors is also special - if
protocol is atomic, than we should ignore any changes to uio_resid, a
transient error means the write had completely failed (see d2b3a0ed31e).

  • Provide sousrsend() that expects a valid uio, and leave sosend() for kernel consumers only. Do all special error handling right here.
  • In dofilewrite() don't do special handling of error for DTYPE_SOCKET.
  • For send(2), write(2) and aio_write(2) call into sousrsend() and remove error handling for kern_sendit(), soo_write() and soaio_process_job().

PR: 265087
Reported by: rz-rpi03 at h-ka.de
Reviewed by: markj
Differential revision: https://reviews.freebsd.org/D35863

Details

Provenance
glebiusAuthored on Dec 14 2022, 6:02 PM
Reviewer
markj
Differential Revision
D35863: sockets: provide sousrsend() that does socket specific error handling
Parents
rGeaabc9376483: tcp: retire TCPDEBUG
Branches
Unknown
Tags
Unknown