Re: Socket filters: limiting amount of swallowed mbufs
Re: Socket filters: limiting amount of swallowed mbufs
- Subject: Re: Socket filters: limiting amount of swallowed mbufs
- From: Bogdan Harjoc <email@hidden>
- Date: Mon, 3 May 2010 16:12:08 +0300
On Fri, Apr 30, 2010 at 9:48 PM, Terry Lambert
<email@hidden> wrote:
On Apr 30, 2010, at 3:28 AM, Bogdan Harjoc wrote:
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.
Output packets or input packets? It sounds like you are talking about input packets because you are referencing tcp_input().
Input packets for now. The goal is to have a bound on how much data from the sender
accumulates in my filter (I can control outgoing data more easily).
Although there are some traffic shaping paradigms that use the window size in order to control the send buffering on the sending side of a remote server/router, they do so by controlling the size of the window in the TCP ACKs sent to the other end, to indicate how much space is left in the window.
This is what I am doing at the moment: when my filter buffers are full, I set the sb_hiwat equal to sb_cc, which means the receiving window size decreases to zero, making the sender stop until sb_hiwat is reset to its original value.
The Pittsburgh Supercomputing Center (PSC) at CMU has a number of papers which would probably be useful to you, as well as some of the Scala Server work out of Peter Druschel's group at Rice University.
I hope I won't have to go that far from the "stable and tested API" mindset in order to solve this. Thanks for the insightful and prompt reply,
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