Page MenuHomeFreeBSD

[sockbuf] Don't expose lock details when isn't needed
Needs RevisionPublic

Authored by davide on Feb 9 2015, 2:34 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 8 2024, 5:10 PM
Unknown Object (File)
Dec 20 2023, 1:27 AM
Unknown Object (File)
Dec 13 2023, 3:13 PM
Unknown Object (File)
Nov 21 2023, 9:57 PM
Unknown Object (File)
Nov 1 2023, 9:31 AM
Unknown Object (File)
Oct 22 2023, 4:48 AM
Unknown Object (File)
Sep 24 2023, 2:14 PM
Unknown Object (File)
Sep 6 2023, 9:21 PM

Details

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

davide retitled this revision from to [sockbuf] Don't expose lock details when isn't needed.
davide updated this object.
davide edited the test plan for this revision. (Show Details)
davide added reviewers: kmacy, np, rrs, lstewart, rwatson.
davide set the repository for this revision to rS FreeBSD src repository - subversion.
davide added a subscriber: Unknown Object (MLST).

I plan to commit this in two days or such, so if there are objections, please raise them.

Is the reason here to just make the lines shorter or is there a deeper reason? (e.g. to prepare for some upcoming change)

Mainly for consistency at this point with whatever else it's used in the stack.

Seems reasonable. I'm slightly surprised that any code other than sbwait() actually implements the sleep on sb_acc, and wonder if either a use of abstraction improvement, or an actual abstraction improvement, is needed to fix t4_ddp.c.

rwatson requested changes to this revision.Feb 11 2015, 8:46 AM
rwatson edited edge metadata.

Looks like some serious transcription errors are in this patch.

sys/kern/uipc_sockbuf.c
225

Should this be so->so_rcv?

234

Should this be so->so_rcv?

This revision now requires changes to proceed.Feb 11 2015, 8:46 AM

Robert,
an added (somewhat related) note.
SCTP has already its own sockbuf(s) and this makes integration very hackish in the tree. IIRC glebius experienced this himself while working on sendfile(), and I'm pretty sure rrs@ is kind of familiar with the problem. Introducing a better abstraction for sockbuf might help with this.

sys/kern/uipc_sockbuf.c
234

Thanks for spotting i'll fix up and upload a new patch.

The socket buffer with SCTP is just not something thats workable. There are
all sorts of pre-defined notions that closely align a socket buffer to stream-of-bytes
semantics of TCP. With UDP its never an issue, since you have all un-ordered who
cares up come the messages.

With SCTP there are all sorts of interesting ordering constraints and settings that
make it so that you can't just read from a linear socket buffer.

We definitely would need a completely different abstraction!