SYNcache do I need to compile?

I am running an experiment to compare performance of SYNcache & SYNcookies (tcp_syncache.c) across different releases of FreeBSD on a Raspberry Pi.

I setup the Pi with RaspBSD and deployed subversion (svn) to populate /usr/src/sys:
svn checkout [URL][/URL] /usr/src/sys

Will the setup above allow me to by changing the release from 10.3 to 4.4 to have the corresponding working version (4.4) of tcp_syncache.c? Or should I recompile the kernel?

I setup the Pi with RaspBSD and deployed subversion (svn) to populate /usr/src/sys:
svn checkout [URL][/URL] /usr/src/sys
The source tree is meant to be checked out in its entirety, not just a small section of it. Besides that, you have the wrong repository. You should use /base/releng/10.3/ if you need the 10.3-RELEASE sources.
No need to checkout the second copy at all. This how you diff your current sys/conf/ (releng/10.3 in my case) against the version from releng/4.4:

svnlite diff /usr/src/sys/conf/ ^/releng/4.4/sys/conf/

Same method can be used with any other file in the tree or any branch that is under

Note, the caret sign ^ is a relative "URL" in SVN, it expands to the repository root when used.
Thank you again for the support.

The issue now is that subversion seem to be timing out every single time. I tried for the last two days: svn checkout /usr/src/ and I always get svn: E000060: Operation timed out sooner or later.

I tried different boxes and network connections, is there anyway to change the time out value? Cheers
Last edited by a moderator:
Hi, can you successfully ping ? If yes - try to change url method from https:// to svn:// like this - svn checkout svn:// /usr/src/ and try again. Probably you miss new certificates..
The issue was due to the speed (or lack of it) of the Raspberry Pi 2. In the end the only thing that worked has been: after each timeout, do a svn cleanup followed by a svn update.

Now that the subversion is in place I've got a last burning question.

is the content of /usr/src/ the repository of code used currently by the kernel, or is it exclusively used to rebuild the kernel?

My final goal is to get SYNcache and SYNcookies working, and my assumption was that the default Raspberry Pi did not ship with this feature. This is because the tcp_syncache.c file is missing from the path I was expecting to find it in /usr/src/sys/netinet as well from anywhere else on the system.
That made an interesting reading thanks ab2k. So I guess in order to swap from one version of tcp_syscache.c (let's say 4.4) to another (10.3) I need get the relevant subversion in /usr/src and makeworld. That makes a lot of sense considering at what level tcp_syncache.c works.o_O
You are welcome! yeah, seems you have to build 2 different systems to test performance. But before you will start please check compatibility list - probably Raspberry Pi is not supported... I bet on FreeBSD 4.4 Raspberry Pi is not supprted. Also if you use FreeBSD >=10 you can use svnlite command to get source tree, it's already built in system.
Great tips :)! In other words I won't be able to makeworld using the source tree with just a modified (4.4) version of tcp_syncache.c ?
Sorry to keep nagging you mate, but this is a bit of deal breaker for my experiment. Cheers
Hi again, no probs at all. You may try to get old version of it and replace new one; after that you may try to build system, but i think something will not work or it even will not compile.. New version may have some calls from/to other libraries, but older version will not know how to do it; also compiler may differ (new versions of FreeBSD use clang, older gcc)... But who knows - you may always try! and please note tcp_syncache.c arrived to FreeBSD 4.5.0 (don't see that file in 4.4.0 source).

Also seems that Raspberry PI 2 is only supported by FreeBSD 11 CURRENT.. there are few images of it here.
I am getting there, thank to you. Now I've got my RPi2 up and running with FreeBSD 11.0-ALPHA3 #0 r301873.
My idea would be synching the source and change the (famous) tcp_syncache.c to the one found in RELENG_9 - hoping that it will work.
The issue is locating the source of 11.0-ALPHA3 r301873, I dig deep but I could not find the appropriate subversion.
I've downloaded tcp_syncache.c and tcp_syncache.h from base/stable/9 but as anticipated the kernel won't compile :( under /base/stable/11 conf=RPI2


Considering that I just need to swap the hashing algorithm from SipHash to MD5 .. I was wondering if someone fancies a Sunday challenge :rolleyes:

I'll try it myself but I am not too confident of getting anywhere with my very basic programming skills. :beer: to the winner !