HomeFreeBSD

Fix regression from r297400, which truncates headers in case of low socket

Description

Fix regression from r297400, which truncates headers in case of low socket
buffer and put a small optimization for low socket buffer case:

  • Do not hack uio_resid, and let m_uiotombuf() properly take care of it. This fixes truncation of headers at low buffer.
  • If headers ate all the space, jump right to the end of the cycle, to avoid doing single page I/O and allocating zero length mbuf.
  • Clear hdr_uio only if space is positive, which indicates that all uio was copied in.

Reviewed by: pluknet, jtl, emax, rrs, lstewart, emax, gallatin, scottl

Details

Provenance
glebiusAuthored on
Reviewer
pluknet
Parents
rS306211: Prepare for 11.0-RELEASE builds.
Branches
Unknown
Tags
Unknown