Re: SO_SPLICE implementation

From: Dave Cottlehuber <dch_at_skunkwerks.at>
Date: Sat, 31 Aug 2024 07:37:30 UTC

On Thu, 29 Aug 2024, at 21:43, Mark Johnston wrote:
> Hello,
>
> Drew Gallatin and I have been working on an implementation of SO_SPLICE,
> an interface which allows TCP connections to be spliced together.  This
> is intended for use in proxy applications to reduce the overhead of
> copying data between connections.

Awesome!

> At the moment the interface isn't widely used, though I'll make sure
> that net/relayd can take advantage of it (which it already does on
> OpenBSD).  If there are existing applications that might take advantage
> of it, especially in the FreeBSD base system, I'd be interested to hear
> suggestions.

net/haproxy would be another good one. Currently it's enabled by option
https://docs.haproxy.org/3.0/configuration.html#4.2-option splice-auto
and AFAICT requires https://github.com/haproxy/haproxy/blob/master/Makefile#L30
preset in https://github.com/haproxy/haproxy/blob/master/Makefile#L416

> The code review is here if anyone's interested in looking at the
> implementation: https://reviews.freebsd.org/D46411

A+
Dave