Page MenuHomeFreeBSD

tcp: Add a new kernel-only TCP_USE_DDP socket option
ClosedPublic

Authored by jhb on Feb 21 2024, 12:55 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Aug 14, 10:06 PM
Unknown Object (File)
Mon, Jul 28, 2:33 PM
Unknown Object (File)
Sat, Jul 26, 9:57 AM
Unknown Object (File)
Jul 6 2025, 1:55 PM
Unknown Object (File)
Jul 1 2025, 11:07 PM
Unknown Object (File)
Jun 30 2025, 3:53 PM
Unknown Object (File)
Jun 28 2025, 11:38 PM
Unknown Object (File)
Jun 25 2025, 3:42 PM

Details

Summary

This socket option can be used by in-kernel consumers (like NFS) to
request a NIC to use optimized receive of large buffers for a
connection. The current use case is to support DDP by the TOE on
Chelsio NICs.

Sponsored by: Chelsio Communications

Diff Detail

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

Event Timeline

I also considered adding this as a protocol-independent socket option (SO_DDP) but that is somewhat annoying when it comes to implementation in the next patch in the series as the TOE module only really gets to hook pr_ctloutput and socket-level options don't invoke that hook normally.

This revision is now accepted and ready to land.Feb 21 2024, 8:01 AM

btw, I'm getting close to divorce unix(4) from soreceive_generic/sosend_generic. That means the functions are left for TCP and a few leftovers (rtsock, bluetooth). The plan to create tcp_soreceive() and tcp_sosend() that will not carry any code for other sockets and would be much easier to extend.