Page MenuHomeFreeBSD

Add kevent EVFILT_EMPTY for notification when a client has received all data
ClosedPublic

Authored by kbowling on Jan 12 2017, 2:51 AM.

Details

Summary

This is used in production at Limelight Networks to monitor when a client has received all data in a socket buffer

Test Plan

A test daemon with usage instructions is available at https://github.com/kev009/filtempty. You will need to rewind one commit because the last commit uses TCP_INFO additions we have not yet upstreamed.

Diff Detail

Repository
rS 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

kbowling updated this revision to Diff 23913.Jan 12 2017, 2:51 AM
kbowling retitled this revision from to Add kevent EVFILT_EMPTY for socket empty notification.
kbowling updated this object.
kbowling edited the test plan for this revision. (Show Details)
kbowling added reviewers: gnn, hiren.
kbowling set the repository for this revision to rS FreeBSD src repository.
kbowling added a subscriber: network.
kbowling retitled this revision from Add kevent EVFILT_EMPTY for socket empty notification to Add kevent EVFILT_EMPTY for notification when a client has received all data.Jan 12 2017, 3:04 AM
kbowling updated this object.
kbowling edited edge metadata.
hiren resigned from this revision.Jan 12 2017, 6:44 AM
hiren edited reviewers, added: network; removed: hiren.

Can't actually review as an author of the patch. It'd be nice if someone else can look at it.

gnn accepted this revision.Jan 12 2017, 3:23 PM
gnn edited edge metadata.

Do it.

This revision is now accepted and ready to land.Jan 12 2017, 3:23 PM
kbowling updated this revision to Diff 23949.Jan 12 2017, 9:53 PM
kbowling edited edge metadata.

Updated to use sb_ccc. Add diff context

This revision now requires review to proceed.Jan 12 2017, 9:53 PM
bz requested changes to this revision.Jan 12 2017, 10:07 PM
bz added a reviewer: bz.
bz added a subscriber: bz.

otherwise looks good.

sys/kern/uipc_socket.c
3364 ↗(On Diff #23949)

I'd suggest using sbused(&so->so_snd) there rather than directly accessing sb_ccc.

This revision now requires changes to proceed.Jan 12 2017, 10:07 PM
emaste added a subscriber: emaste.Jan 12 2017, 10:37 PM
kbowling updated this revision to Diff 23970.Jan 13 2017, 7:25 PM
kbowling edited edge metadata.

Use sbused accessor per BZ

kbowling marked an inline comment as done.Jan 13 2017, 7:26 PM
bz accepted this revision.Jan 13 2017, 10:35 PM
bz edited edge metadata.
This revision is now accepted and ready to land.Jan 13 2017, 10:35 PM
This revision was automatically updated to reflect the committed changes.