Page MenuHomeFreeBSD

sendfile: retire M_BLOCKED
AcceptedPublic

Authored by glebius on Fri, Jun 6, 5:54 PM.
Tags
None
Referenced Files
F122430504: D50728.id.diff
Sat, Jul 5, 7:23 AM
Unknown Object (File)
Thu, Jul 3, 10:50 AM
Unknown Object (File)
Wed, Jul 2, 9:06 PM
Unknown Object (File)
Tue, Jul 1, 7:37 AM
Unknown Object (File)
Tue, Jul 1, 2:14 AM
Unknown Object (File)
Mon, Jun 30, 11:27 PM
Unknown Object (File)
Mon, Jun 30, 7:07 PM
Unknown Object (File)
Mon, Jun 30, 2:45 PM
Subscribers

Details

Reviewers
gallatin
markj
np
Group Reviewers
network
transport
Summary

Follow unix(4) commit 51ac5ee0d57f and retire M_BLOCKED for TCP sockets as
well. The M_BLOCKED flag was introduced back 2016 together with non-
blocking sendfile(2). It marked mbufs in a sending socket buffer that
could be ready to sent, but are sitting behind an M_NOTREADY mbuf(s), that
blocks them.

You may consider this flag as an INVARIANT flag that helped to ensure
socket buffer consistency. Or maybe the socket code was so convoluted
back then, that it was unclear if sbfree() may be called on an mbuf that
is in the middle of the buffer, and I decided to introduce the flag to
protect against that. With today state of socket buffer code it became
clear that the latter cannot happen. And this commit adds an assertion
proving that.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 64687
Build 61571: arc lint + arc unit