Socket filters: limiting amount of swallowed mbufs
Socket filters: limiting amount of swallowed mbufs
- Subject: Socket filters: limiting amount of swallowed mbufs
- From: Bogdan Harjoc <email@hidden>
- Date: Fri, 30 Apr 2010 13:28:46 +0300
Hello,
I am looking for a way to let the tcp_input machinery know how many
mbufs my socket filter has swallowed but not yet injected back into a
TCP stream. This is so both swallowed data and data already in the
sockbuf are taken into account when adjusting window sizes.
So my first question would be whether changing the sockbuf->sb_hiwat
and sb_cc fields is doable. From the setsockopt code, it seems that
zero values are not valid for SO_RCVBUF and SO_LOWAT.
I'm also considering pausing the receiving stream once a number of
mbufs are stuck inside my filter. So I'd like to know whether using
TRAFFIC_MGT_SO_BG_SUPPRESSED, or simply setting TF_RXWIN0SENT
into tcpcp->t_flags and clearing it later would work reliably.
Since the above would require modifying internal structs that NKEs
don't have access to, a hint towards something less intrusive would
of course be appreciated.
Thanks,
Bogdan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden