]> err.no Git - varnish/log
varnish
18 years agoRework the classic hasher to reduce lock contention and CPU usage.
phk [Tue, 22 Aug 2006 07:52:33 +0000 (07:52 +0000)]
Rework the classic hasher to reduce lock contention and CPU usage.

Make nbuckets=nhash mandatory.

Order hash lists by the length of key instead of the key contents,
comparing the length is much faster.

Also compare disgest before we take the expensive content compare.

Use memcmp() for content compare instead of strcmp().

Use a two-pass algorithm for inserts to lower mutex contention.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@884 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoAdd cache_acceptor.h to noinst_HEADERS.
des [Tue, 22 Aug 2006 07:24:07 +0000 (07:24 +0000)]
Add cache_acceptor.h to noinst_HEADERS.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@883 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoAdd strndup() to libcompat.
des [Tue, 22 Aug 2006 07:11:59 +0000 (07:11 +0000)]
Add strndup() to libcompat.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@882 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoFlexelint inpired cleanups
phk [Mon, 21 Aug 2006 20:42:47 +0000 (20:42 +0000)]
Flexelint inpired cleanups

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@881 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoGive VBE_ClosedFd() an argument to tell if the fd has already
phk [Mon, 21 Aug 2006 20:30:29 +0000 (20:30 +0000)]
Give VBE_ClosedFd() an argument to tell if the fd has already
been closed.

Pipe does this and would panic otherwise.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@880 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoFix these two up to current standard.
phk [Mon, 21 Aug 2006 20:25:28 +0000 (20:25 +0000)]
Fix these two up to current standard.

Poll is tested, epoll isn't.

While the three implementations share a lot of identical code
right now, I will wait a bit before unifying more of them, at
least until performance proves that this is the right way for
kqueue.

XXX: they're really not acceptors any more, they're herders.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@879 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoMake it easier to experiement with acceptors by having a single
phk [Mon, 21 Aug 2006 20:23:47 +0000 (20:23 +0000)]
Make it easier to experiement with acceptors by having a single
pointer to the one in use.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@878 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoRemove unused #includes
phk [Mon, 21 Aug 2006 20:23:14 +0000 (20:23 +0000)]
Remove unused #includes

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@877 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoAdd asserts.
phk [Mon, 21 Aug 2006 19:05:57 +0000 (19:05 +0000)]
Add asserts.

Return if we pass on directly.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@876 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoOverhaul kqueue acceptor in light of todays learnings.
phk [Mon, 21 Aug 2006 18:55:24 +0000 (18:55 +0000)]
Overhaul kqueue acceptor in light of todays learnings.

Use the pipe trick to inject sessions into the system, as far as I
can tell it is cheaper because of the low rate it happens and the
high rate of mutex operations avoided.

Ignore the timer event, but purge the list every time we wake up
to reduce lumpyness of timeout'ing.

Centralize the polling of a session so we don't have the same two
messages spread out all over the place.

Centralize the acceptor thread and send things directly to the worker
thread, leaving only the session-herder in the split out files.

poll & epoll not yet updated accordingly.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@875 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoBandaid until Dag Erling does what's necessary
phk [Mon, 21 Aug 2006 17:49:39 +0000 (17:49 +0000)]
Bandaid until Dag Erling does what's necessary

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@874 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoRetire sessions if the workspace size changes, properly cache the
phk [Mon, 21 Aug 2006 17:32:41 +0000 (17:32 +0000)]
Retire sessions if the workspace size changes, properly cache the
workspace size so we do not get caught unaware when it changes.

Implement flip-flop free queue where SES_New() can read from
one of them without a lock, which frees happen to the other one
under lock.  If the lock-less queue is empty, SES_New() flips
the two queues under lock and tries again.  If that queue is
also empty call malloc(3).

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@873 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoRename open_tcp() to TCP_open() and modify it to open only one socket of
des [Mon, 21 Aug 2006 17:26:11 +0000 (17:26 +0000)]
Rename open_tcp() to TCP_open() and modify it to open only one socket of
the appropriate type for the address that was passed in.

Introduce TCP_parse(), which extracts an address and port from a string of
the form "hostname:port", "i.p.v.4:port" or "[i:p:v:6]:port" (where "port"
can be either a decimal number or a service name).

Use TCP_parse() to parse the argument to -a (listen address), -b (backend
address) and -T (telnet address).  Eliminate -p (listen port).

While there, rename a bunch of "fooflag" variables which aren't flags to
"foo_arg".

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@872 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoAdd n_sess_mem
phk [Mon, 21 Aug 2006 13:15:40 +0000 (13:15 +0000)]
Add n_sess_mem

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@871 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoIncrease client hash to 1k
phk [Mon, 21 Aug 2006 13:15:02 +0000 (13:15 +0000)]
Increase client hash to 1k

Cache used sessmem chunks on a private list and recycle from there,
no point in bothering malloc all the time.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@870 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoWhen writing to a file, open it with O_APPEND rather than O_TRUNC.
des [Mon, 21 Aug 2006 12:57:32 +0000 (12:57 +0000)]
When writing to a file, open it with O_APPEND rather than O_TRUNC.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@869 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoSet properties.
des [Mon, 21 Aug 2006 12:55:56 +0000 (12:55 +0000)]
Set properties.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@868 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoSet properties.
des [Mon, 21 Aug 2006 12:54:53 +0000 (12:54 +0000)]
Set properties.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@867 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoCreate the possiblity for the the acceptor to send the session directly
phk [Mon, 21 Aug 2006 12:12:16 +0000 (12:12 +0000)]
Create the possiblity for the the acceptor to send the session directly
to the workerpool instead of taking the detour around the session-herder.

This saves a context switch and is presumabley a good idea because the
majority of sessions will have requst already in the pipeline.

For accept filters it makes even more sense because we know this to
be the case.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@866 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoSplit the accepting and session-herding functionality into two threads,
phk [Mon, 21 Aug 2006 11:18:26 +0000 (11:18 +0000)]
Split the accepting and session-herding functionality into two threads,
this is totally free from a locking point of view, but will cost
in context switches.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@865 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoAdd file
phk [Mon, 21 Aug 2006 11:11:02 +0000 (11:11 +0000)]
Add file

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@864 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agovarious cleanups.
phk [Mon, 21 Aug 2006 11:05:08 +0000 (11:05 +0000)]
various cleanups.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@863 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoBreak the acceptors out into their own files.
phk [Mon, 21 Aug 2006 10:59:00 +0000 (10:59 +0000)]
Break the acceptors out into their own files.

The intent here is to compile in all acceptors supported on the
operating system and allow the user to select one at startup time.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@862 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoAdjusments to scale.
phk [Mon, 21 Aug 2006 09:51:23 +0000 (09:51 +0000)]
Adjusments to scale.

Refresh 1/sec max

Put more in the rolling buffer.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@861 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoDon't hose TIMER kevent with READ kevent
phk [Mon, 21 Aug 2006 09:49:43 +0000 (09:49 +0000)]
Don't hose TIMER kevent with READ kevent

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@860 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoThis assert is not warranted, a connection might disappear before
phk [Mon, 21 Aug 2006 09:49:02 +0000 (09:49 +0000)]
This assert is not warranted, a connection might disappear before
we get to it.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@859 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoClose another tiny race.
phk [Sun, 20 Aug 2006 19:55:55 +0000 (19:55 +0000)]
Close another tiny race.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@858 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoGive the kevent acceptor another overhaul.
phk [Sun, 20 Aug 2006 18:33:21 +0000 (18:33 +0000)]
Give the kevent acceptor another overhaul.

On a number of fine points the kevent API behaves different from
what I would have expected.

For instance EV_DISABLE/EV_ENABLE on a timer does not reset the
timer.

This is a very defensive version and if that works, it can be optimized
some more.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@857 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoHeavy-duty work on kqueue acceptor.
phk [Sun, 20 Aug 2006 16:35:19 +0000 (16:35 +0000)]
Heavy-duty work on kqueue acceptor.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@856 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoAdd some debugging
phk [Sun, 20 Aug 2006 16:35:01 +0000 (16:35 +0000)]
Add some debugging

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@855 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoRemove unused variable.
phk [Sun, 20 Aug 2006 16:34:51 +0000 (16:34 +0000)]
Remove unused variable.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@854 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoUse TxHeader for pipe backend.
phk [Sun, 20 Aug 2006 15:12:26 +0000 (15:12 +0000)]
Use TxHeader for pipe backend.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@853 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoDon't chat up non-running childs.
phk [Sun, 20 Aug 2006 15:12:13 +0000 (15:12 +0000)]
Don't chat up non-running childs.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@852 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoMake sure the returns have some value.
phk [Sun, 20 Aug 2006 15:11:53 +0000 (15:11 +0000)]
Make sure the returns have some value.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@851 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoAssert that the cli status is valid
phk [Sun, 20 Aug 2006 15:11:34 +0000 (15:11 +0000)]
Assert that the cli status is valid

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@850 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agopid -1 is not our child
phk [Sun, 20 Aug 2006 14:53:26 +0000 (14:53 +0000)]
pid -1 is not our child

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@849 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoFix malloc bug.
phk [Sun, 20 Aug 2006 14:53:12 +0000 (14:53 +0000)]
Fix malloc bug.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@848 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoNew defaults:
phk [Sun, 20 Aug 2006 13:39:24 +0000 (13:39 +0000)]
New defaults:
5 sec session timeout
60 sec thread pool timeout

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@847 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoMake autostart a tweakable parameter, this is useful for debugging
phk [Sun, 20 Aug 2006 13:38:34 +0000 (13:38 +0000)]
Make autostart a tweakable parameter, this is useful for debugging

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@846 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoPull out up to 20 kevents at time instead of just one.
phk [Sun, 20 Aug 2006 12:15:15 +0000 (12:15 +0000)]
Pull out up to 20 kevents at time instead of just one.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@845 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoRespect lower pool limit dynamically
phk [Sun, 20 Aug 2006 11:19:20 +0000 (11:19 +0000)]
Respect lower pool limit dynamically

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@844 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoRemember to open the shmlog
phk [Sun, 20 Aug 2006 07:32:50 +0000 (07:32 +0000)]
Remember to open the shmlog

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@843 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoAdd varnishhist(1) a program that shows the responsetime as a curses
phk [Sun, 20 Aug 2006 07:27:52 +0000 (07:27 +0000)]
Add varnishhist(1) a program that shows the responsetime as a curses
histogram.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@842 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoAdd note that send_timeout has DELAYED effect
phk [Sun, 20 Aug 2006 07:27:33 +0000 (07:27 +0000)]
Add note that send_timeout has DELAYED effect

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@841 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoMake sure we have predictable column numbers by printing '-' if it
phk [Sun, 20 Aug 2006 07:26:52 +0000 (07:26 +0000)]
Make sure we have predictable column numbers by printing '-' if it
is neither classified as client or backend.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@840 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoMake the session timeout and send timeout tweakables.
phk [Sat, 19 Aug 2006 21:48:30 +0000 (21:48 +0000)]
Make the session timeout and send timeout tweakables.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@839 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoImplement the first load of tweable parameters
phk [Sat, 19 Aug 2006 21:32:10 +0000 (21:32 +0000)]
Implement the first load of tweable parameters

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@838 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoAdd two new CLI commands: param.set and param.show.
phk [Sat, 19 Aug 2006 20:28:30 +0000 (20:28 +0000)]
Add two new CLI commands: param.set and param.show.

Eliminate requirement that "help" be first, I was just lazy I guess.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@837 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agocleanup
phk [Sat, 19 Aug 2006 20:16:48 +0000 (20:16 +0000)]
cleanup

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@836 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoWe have a number of adjustable parameters, things like "default TTL" which
phk [Sat, 19 Aug 2006 20:15:09 +0000 (20:15 +0000)]
We have a number of adjustable parameters, things like "default TTL" which
should be adjustable at runtime.

We need to make adjustments in such a way that a restart of the child also
uses the new paramters.

We can either do this by parsing the CLI in both mgt+child and have both
update their private copy, or we can parse it only in one of them and
update a shared copy.

We opt for the latter method.

Add a "struct params" which holds the adjustable parameters and put on
in the shmlog segment, between struct shmloghead and the round-robin
buffer.

Move parameters from heritage to params.

We put it there without exposing it in struct shmloghead which is
the public view of the shared memory because we do not want to make
it a public API or even to tempt people to think that it is one.

Now I just need to add the CLI functions to actually twiddle the
parameters.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@835 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoDon't re-mmap the shmlog in the child, we already did it in the management
phk [Sat, 19 Aug 2006 19:46:32 +0000 (19:46 +0000)]
Don't re-mmap the shmlog in the child, we already did it in the management
process and the inherited copy is perfectly fine to use.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@834 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoRespect and clear TAG also on flush
phk [Fri, 18 Aug 2006 20:07:37 +0000 (20:07 +0000)]
Respect and clear TAG also on flush

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@833 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoDo a better job on Connection: header processing in client requests.
phk [Fri, 18 Aug 2006 19:53:43 +0000 (19:53 +0000)]
Do a better job on Connection: header processing in client requests.

Add a flag field for each HTTP header and define a bit HDF_FILTER
to mean "filter this out", and initialize to zero all relevant
places.

If HDF_FILTER is set, do not copy the header across when filtering.

Run through Connection: header (if present) and set HDF_FILTER on
any header that matches a word in the contents.

If we are not HTTP/1.1 and have no Connection header, we close
the session when this reqest is done.

If we have a Connection header, we respect that.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@832 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoSet REG_NOSUB for speed
phk [Fri, 18 Aug 2006 19:10:44 +0000 (19:10 +0000)]
Set REG_NOSUB for speed

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@831 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoRemember to clear match bit
phk [Fri, 18 Aug 2006 18:16:53 +0000 (18:16 +0000)]
Remember to clear match bit

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@830 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoMake it possible to select which requests we want to see in
phk [Fri, 18 Aug 2006 18:14:10 +0000 (18:14 +0000)]
Make it possible to select which requests we want to see in
ordered mode.  For instance
./varnishlog -o rxurl foo
will only show requests that match the regexp "foo" on the rxurl field

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@829 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoTurn the "invcl" array into a flag array so we can put more stuff there.
phk [Fri, 18 Aug 2006 18:00:25 +0000 (18:00 +0000)]
Turn the "invcl" array into a flag array so we can put more stuff there.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@828 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoDeeper listenqueue for HTTP sockets
phk [Fri, 18 Aug 2006 16:04:42 +0000 (16:04 +0000)]
Deeper listenqueue for HTTP sockets

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@827 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoCorrect inverted test in If-Modified-Since logic. This should fix the
des [Tue, 15 Aug 2006 10:38:20 +0000 (10:38 +0000)]
Correct inverted test in If-Modified-Since logic.  This should fix the
"stale front page" problem that has plagued VG.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@826 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoFix a bug in previous commit: an extra CR LF was inserted after the Date
des [Tue, 15 Aug 2006 10:36:43 +0000 (10:36 +0000)]
Fix a bug in previous commit: an extra CR LF was inserted after the Date
header in a 304 response.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@825 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoBetter 304 responses: include a Date header, and send the correct
des [Tue, 15 Aug 2006 07:55:17 +0000 (07:55 +0000)]
Better 304 responses: include a Date header, and send the correct
Last-Modified value.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@824 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoImplement the "error" VCL keyword:
des [Sun, 13 Aug 2006 11:38:13 +0000 (11:38 +0000)]
Implement the "error" VCL keyword:

 - add fields to struct sess where VRT_error can store the error code and
   message
 - modify cnt_error() to pass these fields to RES_Error(), then clear them
 - modify RES_Error() (and the entire chain) to accept a third argument
   giving an explanation of the error.
 - have RES_Error() reset the worker before writing the error document, to
   make sure wfd is set.

fixes: #4

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@823 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoWhen -b and -c given, supress "other" messages.
phk [Fri, 11 Aug 2006 20:47:28 +0000 (20:47 +0000)]
When -b and -c given, supress "other" messages.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@822 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agofix formatting glitches in -o mode
phk [Fri, 11 Aug 2006 20:46:08 +0000 (20:46 +0000)]
fix formatting glitches in -o mode

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@821 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoAlso mark as client on ReqStart
phk [Fri, 11 Aug 2006 20:43:45 +0000 (20:43 +0000)]
Also mark as client on ReqStart

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@820 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoMake lack of -d option work as expected.
phk [Fri, 11 Aug 2006 20:34:20 +0000 (20:34 +0000)]
Make lack of -d option work as expected.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@819 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoDrop the -h option, it never really worked out.
phk [Fri, 11 Aug 2006 20:28:45 +0000 (20:28 +0000)]
Drop the -h option, it never really worked out.

Use the new libvarnishapi facilities to structure code better.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@818 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoImprove the shmlog facilities.
phk [Fri, 11 Aug 2006 20:24:40 +0000 (20:24 +0000)]
Improve the shmlog facilities.

Move the sleeping and timing out into the library so we do not
have to repeat it in all apps.  Should we ever find an app
that needs something else, we will cater for it then.

Add VSL_Dispatch() which calls a (supplied) function (pointer) for each
record.  Additional useful information is passed as arguments, such
as classification (backend/client/other) etc.

Add a default handler for printing a record.

Add VSL_Select() where the application can specify tags that are mandatory
and which should not be subject to -i/-x/-I/-X/-b/-c filtering.

Be more frugal with memory.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@817 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoDirty hack: strip the leading "::ffff:" from v4-to-v6-mapped addresses.
des [Fri, 11 Aug 2006 14:45:37 +0000 (14:45 +0000)]
Dirty hack: strip the leading "::ffff:" from v4-to-v6-mapped addresses.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@816 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoAssert regexp != NULL
phk [Fri, 11 Aug 2006 14:26:59 +0000 (14:26 +0000)]
Assert regexp != NULL

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@815 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoA NULL pointer does not match a regexp
phk [Fri, 11 Aug 2006 14:21:55 +0000 (14:21 +0000)]
A NULL pointer does not match a regexp

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@814 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoUse 1:1 for hashbucket:mutex ratio
phk [Fri, 11 Aug 2006 14:09:09 +0000 (14:09 +0000)]
Use 1:1 for hashbucket:mutex ratio

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@813 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoAdd -T <telnetport> option.
phk [Fri, 11 Aug 2006 13:41:28 +0000 (13:41 +0000)]
Add -T <telnetport> option.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@812 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoUse the already decoded CSTR where applicable and use
phk [Fri, 11 Aug 2006 11:23:12 +0000 (11:23 +0000)]
Use the already decoded CSTR where applicable and use
EncString() to encode strings for C source usage.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@811 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoUntil we know of a legitimate use for them, consider non !isgraph()
phk [Fri, 11 Aug 2006 11:22:33 +0000 (11:22 +0000)]
Until we know of a legitimate use for them, consider non !isgraph()
%xx escapes an error.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@810 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoDon't recognize '\' as magic in CSTR tokens, use %xx escapes instead.
phk [Fri, 11 Aug 2006 10:47:40 +0000 (10:47 +0000)]
Don't recognize '\' as magic in CSTR tokens, use %xx escapes instead.

Add decoded string element to struct token.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@809 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoImprove flexelint setup
phk [Fri, 11 Aug 2006 10:20:05 +0000 (10:20 +0000)]
Improve flexelint setup

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@808 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoMore meat, and even more debug code. I am free()'ing stuff that does not exsist.
andersb [Fri, 11 Aug 2006 10:17:19 +0000 (10:17 +0000)]
More meat, and even more debug code. I am free()'ing stuff that does not exsist.

Strugling with the pointers and strings, since they obviously are "bleeding" from one to another.
I take that as a clear sign of not allocating and freeing right.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@807 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoRegenerate.
des [Fri, 11 Aug 2006 08:41:23 +0000 (08:41 +0000)]
Regenerate.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@804 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoWiden left and right margins, and add a blank line between the paths and
des [Fri, 11 Aug 2006 08:40:25 +0000 (08:40 +0000)]
Widen left and right margins, and add a blank line between the paths and
the message.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@803 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoPrint the message separately from the paths to avoid strange wrapping.
des [Fri, 11 Aug 2006 08:35:22 +0000 (08:35 +0000)]
Print the message separately from the paths to avoid strange wrapping.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@802 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoThis is the XSL stylesheet used to generate the ChangeLog.
des [Fri, 11 Aug 2006 08:34:43 +0000 (08:34 +0000)]
This is the XSL stylesheet used to generate the ChangeLog.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@801 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoInclude LICENSE and autogen.sh in the dist tarball.
des [Fri, 11 Aug 2006 08:25:20 +0000 (08:25 +0000)]
Include LICENSE and autogen.sh in the dist tarball.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@800 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoDon't install libcompat.a.
des [Fri, 11 Aug 2006 08:25:04 +0000 (08:25 +0000)]
Don't install libcompat.a.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@799 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoAdd a README and installation instructions.
des [Fri, 11 Aug 2006 08:24:47 +0000 (08:24 +0000)]
Add a README and installation instructions.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@798 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoDon't filter Cache-Control out in replies from backend.
phk [Fri, 11 Aug 2006 07:35:33 +0000 (07:35 +0000)]
Don't filter Cache-Control out in replies from backend.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@797 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoFix protocol family selection logic to also work on
phk [Fri, 11 Aug 2006 07:35:09 +0000 (07:35 +0000)]
Fix protocol family selection logic to also work on
a FreeBSD machine with now IPv6.

Remember to also free the addrinfo in case of success.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@796 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoBail if we don't get a listening socket.
phk [Fri, 11 Aug 2006 07:33:59 +0000 (07:33 +0000)]
Bail if we don't get a listening socket.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@795 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoMissed one: Only include compat headers if necessary
phk [Fri, 11 Aug 2006 07:12:24 +0000 (07:12 +0000)]
Missed one:  Only include compat headers if necessary

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@794 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoPull in ../../config.h when running flexelint.
phk [Fri, 11 Aug 2006 07:11:32 +0000 (07:11 +0000)]
Pull in ../../config.h when running flexelint.

Only include compat headers if we need them.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@793 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoFix indentation
phk [Fri, 11 Aug 2006 07:03:19 +0000 (07:03 +0000)]
Fix indentation

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@792 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoRemove unused variable.
phk [Fri, 11 Aug 2006 07:02:05 +0000 (07:02 +0000)]
Remove unused variable.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@791 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoPoint at KQUEUE version of acceptor by default.
phk [Fri, 11 Aug 2006 07:01:40 +0000 (07:01 +0000)]
Point at KQUEUE version of acceptor by default.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@790 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoFix an assert so it actually has a chance of firing: (an unsigned is
phk [Fri, 11 Aug 2006 07:01:13 +0000 (07:01 +0000)]
Fix an assert so it actually has a chance of firing: (an unsigned is
always >= 0)

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@789 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoRewrite pass_chunked().
des [Thu, 10 Aug 2006 13:03:09 +0000 (13:03 +0000)]
Rewrite pass_chunked().

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@785 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoGot the requesttime right this time.
andersb [Thu, 10 Aug 2006 11:48:24 +0000 (11:48 +0000)]
Got the requesttime right this time.

I am noticing free()'s that are freeing empty variables/pointers. Have to find where is happens.
Also noticing IP adresses not set correctly.

Still load of debugcode.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@784 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoUpdated to work with new inner workings (ReqStart, ReqEnd, sbuf replacement etc).
andersb [Thu, 10 Aug 2006 11:10:16 +0000 (11:10 +0000)]
Updated to work with new inner workings (ReqStart, ReqEnd, sbuf replacement etc).

Code now compiles.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@783 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoFreeBSD needs <netinet/in.h> for IPPROTO_IPV6 and IPV6_V6ONLY.
des [Thu, 10 Aug 2006 08:56:42 +0000 (08:56 +0000)]
FreeBSD needs <netinet/in.h> for IPPROTO_IPV6 and IPV6_V6ONLY.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@782 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoAdded some more meat to the program. Loads of debug code still on.
andersb [Thu, 10 Aug 2006 07:38:47 +0000 (07:38 +0000)]
Added some more meat to the program. Loads of debug code still on.

Next step is to add the correct time. It's a bit tricky, and I haven't gotten it right just yet.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@781 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoAdd an epoll()-based acceptor for Linux 2.6. Simple empirical tests indicate
des [Wed, 9 Aug 2006 14:49:49 +0000 (14:49 +0000)]
Add an epoll()-based acceptor for Linux 2.6.  Simple empirical tests indicate
that epoll() performs significantly better than poll() (less CPU usage).

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@780 d4fa192b-c00b-0410-8231-f00ffab90ce4