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
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

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 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 edited edge metadata.

Do it.

This revision is now accepted and ready to land.Jan 12 2017, 3:23 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
3363

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
kbowling edited edge metadata.

Use sbused accessor per BZ

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.