Page MenuHomeFreeBSD

Handle partial data re-sending on ktls/sendfile on FreeBSD
ClosedPublic

Authored by jhb on Tue, Feb 16, 6:58 PM.

Details

Summary

Add a handler for EBUSY sendfile error in addition to
EAGAIN. With EBUSY returned the data still can be partially
sent and user code has to be notified about it, otherwise it
may try to send data multiple times.

PR: 251969
Obtained from: OpenSSL (dfcfd17f2818cf520ce6381aed9ec3d2fc12170d)

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

jhb requested review of this revision.Tue, Feb 16, 6:58 PM

I've tested this on Netflix servers, and it seems to work.

It also reduces by about 50% the clients that close the connection for no reason, which sometimes indicate they got bad crypto data.

@jkim would you be able to commit a followup change to regenerate the relevant manual page after this lands?

In D28714#642840, @jhb wrote:

@jkim would you be able to commit a followup change to regenerate the relevant manual page after this lands?

Yes but I am working on importing OpenSSL 1.1.1j now.

In D28714#642846, @jkim wrote:
In D28714#642840, @jhb wrote:

@jkim would you be able to commit a followup change to regenerate the relevant manual page after this lands?

Yes but I am working on importing OpenSSL 1.1.1j now.

Totally fine, I figured you wouldn't have time to review this until after finishing up 1.1.1j.

This revision is now accepted and ready to land.Wed, Feb 17, 5:17 AM

@jhb Are you MFC'ing this to stable/13 and/or releng/13.0?