]> git.ipfire.org Git - thirdparty/haproxy.git/log
thirdparty/haproxy.git
18 years ago[MAJOR] last bunch of capture changes for mempool v2
Willy Tarreau [Sun, 13 May 2007 20:46:04 +0000 (22:46 +0200)] 
[MAJOR] last bunch of capture changes for mempool v2

The header captures had lots of pools. They have all been transformed.

18 years ago[MAJOR] ported the captures to use the new mempool v2
Willy Tarreau [Sun, 13 May 2007 19:45:51 +0000 (21:45 +0200)] 
[MAJOR] ported the captures to use the new mempool v2

The "capture.c" file has also been removed since it was empty.

18 years ago[MAJOR] ported requri to use mempools v2
Willy Tarreau [Sun, 13 May 2007 19:36:56 +0000 (21:36 +0200)] 
[MAJOR] ported requri to use mempools v2

18 years ago[MAJOR] ported appsession to use mempools v2
Willy Tarreau [Sun, 13 May 2007 19:29:55 +0000 (21:29 +0200)] 
[MAJOR] ported appsession to use mempools v2

Also during this process, a bug was found in appsession_refresh().
It would not automatically requeue the task in the queue, so the
old sessions would not vanish.

18 years ago[MAJOR] ported pendconn to mempools v2
Willy Tarreau [Sun, 13 May 2007 18:19:55 +0000 (20:19 +0200)] 
[MAJOR] ported pendconn to mempools v2

A pool_destroy() was also missing in deinit()

18 years ago[MAJOR] switched buffers to mempools v2
Willy Tarreau [Sun, 13 May 2007 17:56:02 +0000 (19:56 +0200)] 
[MAJOR] switched buffers to mempools v2

18 years ago[MAJOR] migrated task, tree64 and session to pool2
Willy Tarreau [Sun, 13 May 2007 17:43:47 +0000 (19:43 +0200)] 
[MAJOR] migrated task, tree64 and session to pool2

task and tree64 are already very close in size and are merged together.
Overall performance gained slightly by this simple change.

18 years ago[MEDIUM] add new memory management functions
Willy Tarreau [Sun, 13 May 2007 17:38:49 +0000 (19:38 +0200)] 
[MEDIUM] add new memory management functions

Implement pool_destroy2, pool_flush2, pool_gc2. It is safe to call
pool_gc2 to free whatever memory possible.

18 years ago[MEDIUM] implement memory pools version 2
Willy Tarreau [Sun, 13 May 2007 16:26:08 +0000 (18:26 +0200)] 
[MEDIUM] implement memory pools version 2

The new pools know about their size and usage. Malloc is not used
anymore, instead a dedicated function to refill the entries is used.

18 years agoMerge branch 'timers' into merge-timers
Willy Tarreau [Sun, 13 May 2007 14:10:04 +0000 (16:10 +0200)] 
Merge branch 'timers' into merge-timers

18 years ago[MINOR] use non-inline tv_* functions in many locations
Willy Tarreau [Sun, 13 May 2007 14:08:19 +0000 (16:08 +0200)] 
[MINOR] use non-inline tv_* functions in many locations

The __tv_* functions were abused. They are not that small and it is not
always worth using them.

18 years ago[MINOR] avoid inlining in task.c
Willy Tarreau [Sun, 13 May 2007 14:07:06 +0000 (16:07 +0200)] 
[MINOR] avoid inlining in task.c

The task management functions used to call __tv_* which is not really
optimal given the size of the functions.

18 years ago[MINOR] add new tv_* functions
Willy Tarreau [Sun, 13 May 2007 14:03:27 +0000 (16:03 +0200)] 
[MINOR] add new tv_* functions

The most useful, tv_add_ifset only adds the increment if it is set. It
is designed for use in expiration computation.

18 years agoMerge branch 'master' into timers
Willy Tarreau [Sun, 13 May 2007 12:51:41 +0000 (14:51 +0200)] 
Merge branch 'master' into timers

18 years ago[TESTS] updates to hash experimentations
Willy Tarreau [Sun, 13 May 2007 09:40:04 +0000 (11:40 +0200)] 
[TESTS] updates to hash experimentations

Aleksandar Lazic has collected many hashing algorithms and put them
in one file to ease benchmarking. Some algos look promising, some
of them have been checked further with uri_hash. Some results on
various systems/hardware are stored in hash_results.txt.

18 years ago[BUG] fix ev_sepoll again, this time with a new state machine
Willy Tarreau [Sat, 12 May 2007 23:52:05 +0000 (01:52 +0200)] 
[BUG] fix ev_sepoll again, this time with a new state machine

It was possible in ev_sepoll() to ignore certain events if
all speculative events had been processed at once, because
the epoll_wait() timeout was not cleared, thus delaying the
events delivery.

The state machine was complicated, it has been rewritten.
It seems faster and more correct right now.

18 years ago[MAJOR] replaced all timeouts with struct timeval
Willy Tarreau [Sat, 12 May 2007 20:35:00 +0000 (22:35 +0200)] 
[MAJOR] replaced all timeouts with struct timeval

The timeout functions were difficult to manipulate because they were
rounding results to the millisecond. Thus, it was difficult to compare
and to check what expired and what did not. Also, the comparison
functions were heavy with multiplies and divides by 1000. Now, all
timeouts are stored in timevals, reducing the number of operations
for updates and leading to cleaner and more efficient code.

18 years ago[MINOR] time.h: added a few tv_* functions to manipulate timevals
Willy Tarreau [Sat, 12 May 2007 20:29:44 +0000 (22:29 +0200)] 
[MINOR] time.h: added a few tv_* functions to manipulate timevals

A few more tv_* functions will be needed to switch from a millisecond-based
scheduler to a struct timeval-based one.

18 years ago[TESTS] test_pools: added support for dlmalloc()
Willy Tarreau [Sat, 12 May 2007 14:14:55 +0000 (16:14 +0200)] 
[TESTS] test_pools: added support for dlmalloc()

18 years ago[TESTS] added test_pools from Aleksandar Lazic
Willy Tarreau [Sat, 12 May 2007 13:51:02 +0000 (15:51 +0200)] 
[TESTS] added test_pools from Aleksandar Lazic

This simple test performs memory allocations using pools and
mallocs and returns the average number of allocations per second.

18 years ago[RELEASE] Released version 1.3.10.2 with the following main changes : v1.3.10.2
Willy Tarreau [Thu, 10 May 2007 05:51:17 +0000 (07:51 +0200)] 
[RELEASE] Released version 1.3.10.2 with the following main changes :

    - fixed build of files including standard.h on OpenBSD

18 years ago[BUILD] fixed build of files including standard.h on OpenBSD
Willy Tarreau [Thu, 10 May 2007 04:39:03 +0000 (06:39 +0200)] 
[BUILD] fixed build of files including standard.h on OpenBSD

The file standard.h included netinet/in.h without including
sys/types.h. This broke build on OpenBSD.

18 years ago[RELEASE] Released version 1.3.10.1 with the following main changes : v1.3.10.1
Willy Tarreau [Wed, 9 May 2007 20:58:28 +0000 (22:58 +0200)] 
[RELEASE] Released version 1.3.10.1 with the following main changes :

    - fixed sepoll transition matrix (two states were missing)

18 years ago[BUG] two missing states in sepoll transition matrix
Willy Tarreau [Wed, 9 May 2007 19:57:51 +0000 (21:57 +0200)] 
[BUG] two missing states in sepoll transition matrix

Two states were missing in the speculative epoll state transition
matrix. This could cause some timeouts and unhandled events. The
problem showed up in TCP mode with a fast server at high session
rates, but could in theory also affect HTTP mode.

18 years ago[RELEASE] Released version 1.3.10 with the following main changes : v1.3.10
Willy Tarreau [Tue, 8 May 2007 23:44:58 +0000 (01:44 +0200)] 
[RELEASE] Released version 1.3.10 with the following main changes :
    - several fixes in ev_sepoll
    - fixed some expiration dates on some tasks
    - fixed a bug in connection establishment detection due to speculative I/O
    - fixed rare bug occuring on TCP with early close (reported by Andy Smith)
    - implemented URI hashing algorithm (Guillaume Dallaire)
    - implemented SMTP health checks (Peter van Dijk)
    - replaced the rbtree with ul2tree from old scheduler project
    - new framework for generic ACL support
    - added the 'acl' and 'block' keywords to the config language
    - added several ACL criteria and matches (IP, port, URI, ...)
    - cleaned up and better modularization for some time functions
    - fixed list macros
    - fixed useless memory allocation in str2net()
    - store the original destination address in the session

18 years ago[DOC] add some documentation about ACLs
Willy Tarreau [Tue, 8 May 2007 23:31:45 +0000 (01:31 +0200)] 
[DOC] add some documentation about ACLs

Minimal documentation about ACLs

18 years ago[MAJOR] fixed some expiration dates on tasks
Willy Tarreau [Tue, 8 May 2007 22:54:10 +0000 (00:54 +0200)] 
[MAJOR] fixed some expiration dates on tasks

The time subsystem really needs fixing. It was still possible
that some tasks with expiration date below the millisecond in
the future caused busy loop around poll() waiting for the
timeout to happen.

18 years ago[MEDIUM] implement SMTP health checks
Willy Tarreau [Tue, 8 May 2007 21:50:35 +0000 (23:50 +0200)] 
[MEDIUM] implement SMTP health checks

Peter van Dijk contributed this patch which implements the "smtpchk"
option, which is to SMTP what "httpchk" is to HTTP. By default, it sends
"HELO localhost" to the servers, and waits for the 250 message, but it
can also send a specific request.

18 years ago[MINOR] ACL regex matching on the URI ; uri_reg
Willy Tarreau [Tue, 8 May 2007 20:45:09 +0000 (22:45 +0200)] 
[MINOR] ACL regex matching on the URI ; uri_reg

The URI can be matched on regexen now. The upcase/lowcase flag
can not be set yet and will soon have to.

18 years ago[MINOR] implement the ACL keywords 'dst' and 'dport'
Willy Tarreau [Tue, 8 May 2007 17:56:15 +0000 (19:56 +0200)] 
[MINOR] implement the ACL keywords 'dst' and 'dport'

The file client.c now provides acl_fetch_dip and acl_fetch_dport
to be able to check the client's destination address and port. The
corresponding ACL keywords 'dst' and 'dport' have been added.

18 years ago[MINOR] implement acl_parse_ip and acl_match_ip
Willy Tarreau [Tue, 8 May 2007 17:50:09 +0000 (19:50 +0200)] 
[MINOR] implement acl_parse_ip and acl_match_ip

The ACL can now compare IP addresses. The client's IP address
can be checked.

18 years ago[MEDIUM] added the 'block' keyword to the config language
Willy Tarreau [Sun, 6 May 2007 22:58:25 +0000 (00:58 +0200)] 
[MEDIUM] added the 'block' keyword to the config language

The new 'block' keyword makes it possible to block a request based on
ACL test results. Block accepts two optional arguments : 'if' <cond>
and 'unless' <cond>.

The request will be blocked with a 403 response if the condition is validated
(if) or if it is not (unless). Do not rely on this one too much, as it's more
of a proof of concept helping in developing other matches.

18 years ago[MEDIUM] added several ACL criteria and matches
Willy Tarreau [Sun, 6 May 2007 22:55:35 +0000 (00:55 +0200)] 
[MEDIUM] added several ACL criteria and matches

Many ACL criteria have been added. Some others are still commented out
because some functions are still missing.

18 years ago[MEDIUM] add the 'acl' keyword to the config language
Willy Tarreau [Sun, 6 May 2007 22:53:22 +0000 (00:53 +0200)] 
[MEDIUM] add the 'acl' keyword to the config language

The 'acl' keyword allows one to declare a new ACL. It is an important part
of the ACL framework.

18 years ago[MAJOR] new framework for generic ACL support
Willy Tarreau [Sun, 6 May 2007 22:36:48 +0000 (00:36 +0200)] 
[MAJOR] new framework for generic ACL support

This framework offers all other subsystems the ability to register
ACL matching criteria. Some generic matching functions are already
provided. Others will come soon and the framework shall evolve.

18 years ago[MEDIUM] store the original destination address in the session
Willy Tarreau [Tue, 8 May 2007 17:46:30 +0000 (19:46 +0200)] 
[MEDIUM] store the original destination address in the session

There are multiple places where the client's destination address is
required. Let's store it in the session when needed, and add a flag
to inform that it has been retrieved.

18 years ago[MINOR] fixed useless memory allocation in str2net()
Willy Tarreau [Tue, 8 May 2007 16:28:09 +0000 (18:28 +0200)] 
[MINOR] fixed useless memory allocation in str2net()

It was not necessary anymore to allocate memory in str2net().
Moreover, some calls to free() were missing in case of errors.

18 years ago[TESTS] added a trivial program to benchmark hash algos
Willy Tarreau [Tue, 8 May 2007 21:22:43 +0000 (23:22 +0200)] 
[TESTS] added a trivial program to benchmark hash algos

The uri_hash.c program makes it very easy to benchmark the
distribution of hash algos. Pass it one word per line, and
it will show the distribution per server for 1 to 10 servers.

18 years ago[BUG] fix early server close after client close
Willy Tarreau [Tue, 8 May 2007 12:46:53 +0000 (14:46 +0200)] 
[BUG] fix early server close after client close

Problem reported by Andy Smith. If a client sends TCP data
and quickly closes the connection before the server connection
is established, AND the whole buffer can be sent at once when
the connection establishes, then the server side believes that
it can simply abort the connection because the buffer is empty,
without checking that some work was performed.

Fix: ensure that nothing was written before closing.

18 years ago[MEDIUM] ensure that we always have a null word in config
Willy Tarreau [Wed, 2 May 2007 18:50:16 +0000 (20:50 +0200)] 
[MEDIUM] ensure that we always have a null word in config

It is important when parsing configuration file to ensure that at
least one word is empty to mark the end of the line. This will be
required with ACLs in order to avoid reading past the end of line.

18 years ago[MINOR] add support for variable size arrays in structures
Willy Tarreau [Sun, 6 May 2007 22:19:57 +0000 (00:19 +0200)] 
[MINOR] add support for variable size arrays in structures

Depending on the version of GCC, variable size arrays are not
declared in the same manner. Let's add a check for the version
and provide a macro.

18 years ago[MINOR] add LIST_HEAD_INIT to the list management macros
Willy Tarreau [Sun, 6 May 2007 22:18:32 +0000 (00:18 +0200)] 
[MINOR] add LIST_HEAD_INIT to the list management macros

It is useful to have the ability to initialize a list while declaring it.

18 years ago[MEDIUM] add better list management macros
Willy Tarreau [Wed, 2 May 2007 18:46:49 +0000 (20:46 +0200)] 
[MEDIUM] add better list management macros

The FOREACH_ITEM and FOREACH_ITEM_SAFE macros are nasty, they
require too many arguments. Let's port those from linux instead.

18 years ago[MEDIUM] implement the URI hash algorithm
Willy Tarreau [Tue, 8 May 2007 11:35:26 +0000 (13:35 +0200)] 
[MEDIUM] implement the URI hash algorithm

Guillaume Dallaire contributed the URI hashing algorithm for
use with proxy-caches. It provides the advantage of optimizing
the cache hit rate.

18 years ago[MEDIUM] always have msg->sol point to beginning of message
Willy Tarreau [Wed, 2 May 2007 18:58:19 +0000 (20:58 +0200)] 
[MEDIUM] always have msg->sol point to beginning of message

Since the 'data' pointer is not stored in message structures, it is
useful to have such a pointer to it when the message has been fully
parsed.

18 years ago[BUILD] do not build rbtree anymore
Willy Tarreau [Mon, 30 Apr 2007 15:30:59 +0000 (17:30 +0200)] 
[BUILD] do not build rbtree anymore

Rbtree is not used anymore. Remove it from the makefiles.

18 years ago[MINOR] uninline task_wakeup
Willy Tarreau [Mon, 30 Apr 2007 11:15:14 +0000 (13:15 +0200)] 
[MINOR] uninline task_wakeup

task_wakup has become bigger since we used the trees. Let's not
inline it anymore.

18 years ago[MINOR] ev_sepoll: refine flags management.
Willy Tarreau [Mon, 30 Apr 2007 10:56:21 +0000 (12:56 +0200)] 
[MINOR] ev_sepoll: refine flags management.

Ensure that we don't call the event handlers if the FD is already
marked FD_STERROR, and ensure that we properly catch HUP and ERR.

18 years ago[BUG] fixed connection establishment detection
Willy Tarreau [Mon, 30 Apr 2007 12:37:43 +0000 (14:37 +0200)] 
[BUG] fixed connection establishment detection

Since the introduction of speculative I/O, it was not always possible
to correctly detect a connection establishment. Particularly, in TCP
mode, there is no data to send and getsockopt() returns no error. The
solution consists in trying a connect() again to get its diagnostic.

18 years ago[MINOR] remove wait_time nullification in ev_sepoll
Willy Tarreau [Sun, 29 Apr 2007 19:49:00 +0000 (21:49 +0200)] 
[MINOR] remove wait_time nullification in ev_sepoll

in ev_sepoll(), wait_time is forced to zero if at least one
speculative event is converted to a real event. This is completely
wrong.

18 years ago[MINOR] pre-compute t->expire in event_accept
Willy Tarreau [Sun, 29 Apr 2007 17:09:47 +0000 (19:09 +0200)] 
[MINOR] pre-compute t->expire in event_accept

At the end of event_accept(), t->expire is computed with tv_min
between two exclusive values. Let's simply assign it at the same
time.

18 years ago[MEDIUM] many cleanups in the time functions
Willy Tarreau [Sun, 29 Apr 2007 15:43:56 +0000 (17:43 +0200)] 
[MEDIUM] many cleanups in the time functions

Now, functions whose name begins with '__tv_' are inlined. Also,
'tv_ms' is used as a prefix for functions using milliseconds.

18 years ago[MINOR] tell the compiler that debug more is unlikely to happen
Willy Tarreau [Sat, 28 Apr 2007 21:26:14 +0000 (23:26 +0200)] 
[MINOR] tell the compiler that debug more is unlikely to happen

In process_session(), add unlikely() around debug code.

18 years ago[MEDIUM] implement and use tv_cmp2_le instead of tv_cmp2_ms
Willy Tarreau [Sun, 29 Apr 2007 08:50:43 +0000 (10:50 +0200)] 
[MEDIUM] implement and use tv_cmp2_le instead of tv_cmp2_ms

tv_cmp2_ms handles multiple combinations of tv1 and tv2, but only
one form is used: (tv1 <= tv2). So it is overkill to use it everywhere.
A new function designed to do exactly this has been written for that
purpose: tv_cmp2_le. Also, removed old unused tv_* functions.

18 years ago[MAJOR] changed TV_ETERNITY to ~0 instead of 0
Willy Tarreau [Sat, 28 Apr 2007 20:40:08 +0000 (22:40 +0200)] 
[MAJOR] changed TV_ETERNITY to ~0 instead of 0

The fact that TV_ETERNITY was 0 was very awkward because it
required that comparison functions handled the special case.
Now it is ~0 and all comparisons are performed on unsigned
values, so that it is naturally greater than any other value.

A performance gain of about 2-5% has been noticed.

18 years ago[MAJOR] replaced rbtree with ul2tree.
Willy Tarreau [Sun, 29 Apr 2007 08:41:56 +0000 (10:41 +0200)] 
[MAJOR] replaced rbtree with ul2tree.

The rbtree-based wait queue consumes a lot of CPU. Use the ul2tree
instead. Lots of cleanups and code reorganizations made it possible
to reduce the task struct and simplify the code a bit.

18 years ago[MINOR] removed useless counters from ul2tree_insert()
Willy Tarreau [Sun, 29 Apr 2007 11:37:23 +0000 (13:37 +0200)] 
[MINOR] removed useless counters from ul2tree_insert()

node_right_lookup and node_right_lookup were two statistical counters.
Let's remove them as we do not need them.

18 years ago[MINOR] import ul2tree from old librt project
Willy Tarreau [Sat, 28 Apr 2007 12:00:17 +0000 (14:00 +0200)] 
[MINOR] import ul2tree from old librt project

This is an import of the old ul2tree code as well as required bitops.
All of them will have to be refreshed at one moment.

18 years ago[MINOR] added support for dual-linked lists
Willy Tarreau [Sat, 28 Apr 2007 10:42:06 +0000 (12:42 +0200)] 
[MINOR] added support for dual-linked lists

Imported dual-linked lists management macros from the old scheduler project,
and fixed a long-standing nasty bug in the DLIST_ADD() macro.

18 years ago[RELEASE] Released version 1.3.9 with the following changes : v1.3.9
Willy Tarreau [Sun, 15 Apr 2007 23:18:12 +0000 (01:18 +0200)] 
[RELEASE] Released version 1.3.9 with the following changes :

    - modularized the polling mechanisms and use function pointers instead
      of macros at many places
    - implemented support for FreeBSD's kqueue() polling mechanism
    - fixed a warning on OpenBSD : MIN/MAX redefined
    - change socket registration order at startup to accomodate kqueue.
    - several makefile cleanups to support old shells
    - fix build with limits.h once for all
    - ev_epoll: do not rely on fd_sets anymore, use changes stacks instead.
    - fdtab now holds the results of polling
    - implemented support for speculative I/O processing with epoll()
    - remove useless calls to shutdown(SHUT_RD), resulting in small speed boost
    - auto-registering of pollers at load time

18 years ago[BUILD] regparm in fd.h broke build on gcc-2.95
Willy Tarreau [Sun, 15 Apr 2007 23:33:26 +0000 (01:33 +0200)] 
[BUILD] regparm in fd.h broke build on gcc-2.95

It was necessary to put the attribute after the type.

18 years ago[MAJOR] introduced speculative I/O with epoll()
Willy Tarreau [Sun, 15 Apr 2007 22:53:59 +0000 (00:53 +0200)] 
[MAJOR] introduced speculative I/O with epoll()

The principle behind speculative I/O is to speculatively try to
perform I/O before registering the events in the system. This
considerably reduces the number of calls to epoll_ctl() and
sometimes even epoll_wait(), and manages to increase overall
performance by about 10%.

The new poller has been called "sepoll". It is used by default
on Linux when it works. A corresponding option "nosepoll" and
the command line argument "-ds" allow to disable it.

18 years ago[MAJOR] auto-registering of pollers at load time
Willy Tarreau [Sun, 15 Apr 2007 22:25:25 +0000 (00:25 +0200)] 
[MAJOR] auto-registering of pollers at load time

Gcc provides __attribute__((constructor)) which is very convenient
to execute functions at startup right before main(). All the pollers
have been converted to have their register() function declared like
this, so that it is not necessary anymore to call them from a centralized
file.

18 years ago[BUILD] declare epoll_* as static when using our own functions
Willy Tarreau [Sun, 15 Apr 2007 21:57:41 +0000 (23:57 +0200)] 
[BUILD] declare epoll_* as static when using our own functions

We will have to share this code among several implementations.

18 years ago[MAJOR] remove useless calls to shutdown(SHUT_RD)
Willy Tarreau [Sun, 15 Apr 2007 19:26:58 +0000 (21:26 +0200)] 
[MAJOR] remove useless calls to shutdown(SHUT_RD)

shutdown(SHUT_RD) is useless on data TCP sockets. It does nothing
and consumes one syscall. Remove it.

18 years ago[MAJOR] implemented support for speculative I/O processing
Willy Tarreau [Sun, 15 Apr 2007 18:56:27 +0000 (20:56 +0200)] 
[MAJOR] implemented support for speculative I/O processing

The pollers will now be able to speculatively call the I/O
processing functions and decide whether or not they want to
poll on those FDs. The changes primarily consist in teaching
those functions how to pass the info they got an EAGAIN.

18 years ago[MINOR] add support for the polling results in fdtab
Willy Tarreau [Sun, 15 Apr 2007 09:31:05 +0000 (11:31 +0200)] 
[MINOR] add support for the polling results in fdtab

Now fdtab can contain the FD_POLL_* events so that the pollers
which can fill them can give userful information to readers and
writers about the precise condition of wakeup.

18 years ago[MINOR] recompute maxfd before touching fdtab
Willy Tarreau [Sun, 15 Apr 2007 08:58:02 +0000 (10:58 +0200)] 
[MINOR] recompute maxfd before touching fdtab

It may be dangerous to play with fdtab before doing fd_insert()
because this last one is responsible for growing maxfd as needed.
Call fd_insert() before instead.

18 years ago[MINOR] copy-paste typo when checking for -dk to disable kqueue.
Willy Tarreau [Tue, 10 Apr 2007 20:45:11 +0000 (22:45 +0200)] 
[MINOR] copy-paste typo when checking for -dk to disable kqueue.

18 years ago[MAJOR] missing tv_now in kqueue_poll() blocking timeouts
Willy Tarreau [Tue, 10 Apr 2007 00:31:54 +0000 (02:31 +0200)] 
[MAJOR] missing tv_now in kqueue_poll() blocking timeouts

a missing call to tv_now(&now) just after kevent() prevented
the timeouts from expiring.

18 years ago[MAJOR] ev_epoll: do not rely on fd_sets anymore
Willy Tarreau [Mon, 9 Apr 2007 23:33:20 +0000 (01:33 +0200)] 
[MAJOR] ev_epoll: do not rely on fd_sets anymore

The new epoll-based poller uses a list of changes in order to
process only the fds which have changed.

18 years ago[BUILD] Fix limits.h once for all
Willy Tarreau [Mon, 9 Apr 2007 20:16:12 +0000 (22:16 +0200)] 
[BUILD] Fix limits.h once for all

Patch #cf83df3d162687d9c74783357421bd89f596eaac was stupid. Including
limits.h is portable and easier. At least it now builds on Solaris,
FreeBSD, Linux and OpenBSD.

18 years ago[CLEANUP] make makefile more old sh-friendly
Willy Tarreau [Mon, 9 Apr 2007 20:07:11 +0000 (22:07 +0200)] 
[CLEANUP] make makefile more old sh-friendly

Older SH on Solaris does not know about $(cmd) but only know `cmd`.

18 years ago[MINOR] kqueue: use fd_clo() to close the fd
Willy Tarreau [Mon, 9 Apr 2007 18:38:57 +0000 (20:38 +0200)] 
[MINOR] kqueue: use fd_clo() to close the fd

fd_clo() does not call kevent() which is not needed during a close().
This one will be faster.

18 years ago[MAJOR] delay registering of listener sockets at startup
Willy Tarreau [Mon, 9 Apr 2007 17:29:56 +0000 (19:29 +0200)] 
[MAJOR] delay registering of listener sockets at startup

Some pollers such as kqueue lose their FD across fork(), meaning that
the registered file descriptors are lost too. Now when the proxies are
started by start_proxies(), the file descriptors are not registered yet,
leaving enough time for the fork() to take place and to get a new pollfd.
It will be the first call to maintain_proxies that will register them.

18 years ago[MEDIUM] kqueue: do not manually remove fds
Willy Tarreau [Mon, 9 Apr 2007 15:16:07 +0000 (17:16 +0200)] 
[MEDIUM] kqueue: do not manually remove fds

FDs attached to a kevent are automatically removed after close().
Also, do not mark the FDs as EV_CLEAR. We want to stay informed
about readiness.

18 years ago[BUILD] enable kqueue on MacOS X too
Willy Tarreau [Mon, 9 Apr 2007 14:30:28 +0000 (16:30 +0200)] 
[BUILD] enable kqueue on MacOS X too

MacOS X is said to have kqueue. Let's enable it too.

18 years ago[MAJOR] kqueue bug in handling infinite timeouts
Willy Tarreau [Mon, 9 Apr 2007 14:25:46 +0000 (16:25 +0200)] 
[MAJOR] kqueue bug in handling infinite timeouts

Calls to kevent() need to pass NULL when there is no timeout.

18 years ago[MAJOR] kqueue was not initialized during startup
Willy Tarreau [Mon, 9 Apr 2007 14:11:49 +0000 (16:11 +0200)] 
[MAJOR] kqueue was not initialized during startup

18 years ago[BUILD] fixed a warning on OpenBSD : MIN/MAX redefined
Willy Tarreau [Mon, 9 Apr 2007 14:10:57 +0000 (16:10 +0200)] 
[BUILD] fixed a warning on OpenBSD : MIN/MAX redefined

18 years ago[BUILD] fix build on FreeBSD for INT_MIN/INT_MAX
Willy Tarreau [Mon, 9 Apr 2007 13:57:51 +0000 (15:57 +0200)] 
[BUILD] fix build on FreeBSD for INT_MIN/INT_MAX

FreeBSD stores INT_MIN and INT_MAX in sys/limits.h only. Other systems
(Solaris) have it in sys/types.h and do not have sys/limits.h. Let's
include sys/limits.h only if INT_MAX is not defined.

18 years ago[MINOR] use 'is_set' instead of 'isset' in struct poller
Willy Tarreau [Mon, 9 Apr 2007 13:34:49 +0000 (15:34 +0200)] 
[MINOR] use 'is_set' instead of 'isset' in struct poller

'isset' was defined as a macro in /usr/include/sys/param.h, and
it breaks build on at least OpenBSD.

18 years ago[MINOR] removed proto/polling.h which was not used anymore
Willy Tarreau [Mon, 9 Apr 2007 13:28:51 +0000 (15:28 +0200)] 
[MINOR] removed proto/polling.h which was not used anymore

18 years ago[MAJOR] implemented support for FreeBSD's kqueue() polling mechanism
Willy Tarreau [Mon, 9 Apr 2007 10:03:06 +0000 (12:03 +0200)] 
[MAJOR] implemented support for FreeBSD's kqueue() polling mechanism

It has not been tested yet, but at least it builds.

18 years ago[MINOR] ev_* : moved the poll function closer to fd_*
Willy Tarreau [Mon, 9 Apr 2007 07:23:31 +0000 (09:23 +0200)] 
[MINOR] ev_* : moved the poll function closer to fd_*

18 years ago[MINOR] changed fd_set*/fd_clr* functions to return ints
Willy Tarreau [Sun, 8 Apr 2007 22:54:46 +0000 (00:54 +0200)] 
[MINOR] changed fd_set*/fd_clr* functions to return ints

The fd_* functions now return ints so that they can be
factored when appropriate.

18 years ago[MEDIUM] pollers: store the events in arrays
Willy Tarreau [Sun, 8 Apr 2007 15:42:27 +0000 (17:42 +0200)] 
[MEDIUM] pollers: store the events in arrays

Instead of managing StaticReadEvent/StaticWriteEvent, use evts[dir]

18 years ago[MEDIUM] factor FD_ISSET/FD_CLR and !FD_ISSET/FD_SET
Willy Tarreau [Sun, 8 Apr 2007 15:17:37 +0000 (17:17 +0200)] 
[MEDIUM] factor FD_ISSET/FD_CLR and !FD_ISSET/FD_SET

Use the new FD_COND_C/FD_COND_S macros to reduce the number of
operations during tests and sets.

18 years ago[MEDIUM] updated all files to use EV_FD_*
Willy Tarreau [Sun, 8 Apr 2007 14:59:42 +0000 (16:59 +0200)] 
[MEDIUM] updated all files to use EV_FD_*

Removed the temporary dirty hack.

18 years ago[MAJOR] modularize the polling mechanisms
Willy Tarreau [Sun, 8 Apr 2007 14:39:58 +0000 (16:39 +0200)] 
[MAJOR] modularize the polling mechanisms

select, poll and epoll now have their dedicated functions and have
been split into distinct files. Several FD manipulation primitives
have been provided with each poller.

The rest of the code needs to be cleaned to remove traces of
StaticReadEvent/StaticWriteEvent. A trick involving a macro has
temporarily been used right now. Some work needs to be done to
factorize tests and sets everywhere.

18 years ago[MINOR] pollers should not use MY_FD_*
Willy Tarreau [Sun, 8 Apr 2007 07:32:47 +0000 (09:32 +0200)] 
[MINOR] pollers should not use MY_FD_*

18 years ago[RELEASE] Released version 1.3.8.2 with the following changes : v1.3.8.2
Willy Tarreau [Tue, 3 Apr 2007 18:30:13 +0000 (20:30 +0200)] 
[RELEASE] Released version 1.3.8.2 with the following changes :

    - rewriting either the status line or request line could crash the
      process due to a pointer which ought to be reset before parsing.
    - rewriting the status line in the response did not work, it caused
      a 502 Bad Gateway due to an erroneous state during parsing

18 years ago[BUG] initialize msg->sol before parsing first line
Willy Tarreau [Tue, 3 Apr 2007 18:03:18 +0000 (20:03 +0200)] 
[BUG] initialize msg->sol before parsing first line

Before calling http_parse_{sts,req}line(), it is necessary
to make msg->sol point to the beginning of the line. This
was not done, resulting in the proxy sometimes crashing when
URI rewriting or result rewriting was used.

18 years ago[BUG] Status line in HTTP response could not be rewritten
Willy Tarreau [Tue, 3 Apr 2007 12:45:44 +0000 (14:45 +0200)] 
[BUG] Status line in HTTP response could not be rewritten

Typo implied use of HTTP_MSG_RQMETH state instead of HTTP_MSG_RPVER.

18 years ago[CONTRIB] the URLs in the SPEC files were obsolete
Willy Tarreau [Sun, 1 Apr 2007 09:37:02 +0000 (11:37 +0200)] 
[CONTRIB] the URLs in the SPEC files were obsolete

18 years ago[RELEASE] Released version 1.3.8.1 with the following changes : v1.3.8.1
Willy Tarreau [Sun, 1 Apr 2007 09:06:22 +0000 (11:06 +0200)] 
[RELEASE] Released version 1.3.8.1 with the following changes :

    - fix reqadd when no option httpclose is used.
    - removed now unused fiprm and beprm from proxies
    - split logs into two versions : TCP and HTTP
    - added some docs about http headers storage and acls
    - added a VIM script for syntax color highlighting (Bruno Michel)

18 years ago[CONTRIB] added the 'except' keyword to haproxy.vim
Willy Tarreau [Sun, 1 Apr 2007 09:05:06 +0000 (11:05 +0200)] 
[CONTRIB] added the 'except' keyword to haproxy.vim

18 years ago[CONTRIB] added a VIM script for syntax coloring
Willy Tarreau [Sun, 1 Apr 2007 08:09:10 +0000 (10:09 +0200)] 
[CONTRIB] added a VIM script for syntax coloring

18 years ago[DOC] added some docs about http headers storage and acls
Willy Tarreau [Sun, 1 Apr 2007 07:44:10 +0000 (09:44 +0200)] 
[DOC] added some docs about http headers storage and acls

18 years ago[MEDIUM] splitted logs into two versions : TCP and HTTP
Willy Tarreau [Sat, 31 Mar 2007 23:30:43 +0000 (01:30 +0200)] 
[MEDIUM] splitted logs into two versions : TCP and HTTP

logs are handled better with dedicated functions. The HTTP implementation
moved to proto_http.c. It has been cleaned up a bit. Now a frontend with
option httplog and no log will not call the function anymore.