Re: SV: Automatic TCP send socker buffer sizing

From: Andre Oppermann <andre_at_freebsd.org>
Date: Thu, 16 Nov 2006 23:49:04 +0100
Morgan wrote:
>> This is a patch adding automatic TCP send socket buffer 
>> sizing.
> 
> <snip>
> 
>> The patch is available here:
>>
>>   http://people.freebsd.org/~andre/tcp_auto_sndbuf-20061116.diff
>>
>> Any testers, especially with busy FTP servers, are very welcome.
>>
> 
> 
> Very nice indeed! I've actually been looking for something like this :-) I
> would very much like to try it out but I need to know if I can benefit from
> it with my setup. My network knowledge on this deep level is very limited so
> I need to ask a few questions that probably sounds stupid... but here we go:
> 
> Would this patch only benefit traffic generated from or destined to the
> FreeBSD box itself or would it also benefit traffic generated behind it on a
> LAN if the FreeBSD box was configured as:
> 
> a) a router with NAT
> 
> b) a router without NAT
> 
> c) a bridge only
> 
> Add to this the extra complexity of pf with synproxy and modulate state. I
> simply don't know how (if at all) FreeBSD interacts with or manipulates
> packets going through it under any of these circumstances, so I have to ask
> to learn :-)

It helps only if the FreeBSD box is the sender of data on a TCP connection.
In all the cases you've listed there it doesn't (and can't) help.  It would
help though if you were running a full http proxy on it.

> The patch didn't apply cleanly to my 6.1-RELEASE. Since this patch was
> cross-posted to -current I guess it wasn't meant for me. Any chance you can
> provide a patch for 6.1-RELEASE? This is the output:

I'll do a backport to RELENG_6 tomorrow when I'm back in the office.

> # patch <tcp_auto_sndbuf-20061116.diff
> Hmm...  Looks like a unified diff to me...
> The text leading up to this was:
> --------------------------
> |Index: tcp_output.c
> |===================================================================
> |RCS file: /home/ncvs/src/sys/netinet/tcp_output.c,v
> |retrieving revision 1.121
> |diff -u -p -r1.121 tcp_output.c
> |--- tcp_output.c       22 Oct 2006 11:52:16 -0000      1.121
> |+++ tcp_output.c       16 Nov 2006 18:35:43 -0000
> --------------------------
> File to patch: /usr/src/sys/netinet/tcp_output.c
> Patching file /usr/src/sys/netinet/tcp_output.c using Plan A...
> Hunk #1 succeeded at 49 (offset 1 line).
> Hunk #2 failed at 105.
> Hunk #3 failed at 395.
> 2 out of 3 hunks failed--saving rejects to
> /usr/src/sys/netinet/tcp_output.c.rej
> Done
> 
> 
> 
> Lastly, is it enough to rebuild only the kernel after applying this patch?

Yes.

> Once again, sorry for these stupid questions but this is the only way for me
> to learn and I really would like to have this patch running on my system.

No problem.  Your effort is appreciated.

-- 
Andre
Received on Thu Nov 16 2006 - 21:49:04 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:02 UTC