Reporting when event EPOLLRDHUP occurs in a file descriptor registered in an epoll instance
Merge pull request #128 from tssavita/patch1_epoll

Epoll: Reporting when event EPOLLRDHUP occurs for an fd
Kernel: new interface to query Linux Kernel version.

This patch implements two things:

  1. Macro MK_KERNEL_VERSION() to return an unique representative integer
     of the Linux Kernel version given the 3 common values.
  2. Function mk_kernel_version() that returns the Kernel version from
     the running system.

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Socket: enable TCP_FASTOPEN only on Kernel >= 3.7.0

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Socket: TCP Auto Corking only on Linux >= 3.14.0

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Config: fix typo in mk_kernel_runver

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Scheduler: new REUSEPORT balancing method/architecture.

Starting from Linux Kernel 3.9, there is a new TCP/UDP socket option which allows
to bind same port and address from multiples threads (or any instance under the
same process context).

This patch implements the SO_REUSEPORT TCP Flag if the running Kernel is >= 3.9,
so on that mode each working thread create it own socket that bind the same address,
with this implementation we reduce the number of system calls involved when a new
connection arrives, avoid lookup the lowest loaded thread and also we allow the
Kernel to perform a better Scheduling on SMP systems that requires to scale.

If the detected Kernel is lower than 3.9, it will use the old Fair Balancing
mechanism.

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Scheduler: Little improvements over REUSEPORT implementation.

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Kernel: new features interfaces and core flags

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Kernel: remove unused variable

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Config: check kernel_features flag for REUSEPORT

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
HTTP/Server: use new server_cork_flag() interface

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Plugin API: export mk_kernel_features_print

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Cheetah: on status command, print new Kernel features

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Scheduler: enable TCP_DEFER_ACCEPT on REUSEPORT mode

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
PolarSSL: Drops polarssl v1.1 support.

Signed-off-by: Sonny Karlsson <ksonny@lotrax.org>
PolarSSL: Fixes error where connection isn't terminated on error.

Signed-off-by: Sonny Karlsson <ksonny@lotrax.org>
PolarSSL: Enable session cache.

Sets session cache on ssl context.
Moves pk_context to local thread context to allow use of polarssl
compiled without threading support.

Signed-off-by: Sonny Karlsson <ksonny@lotrax.org>
PolarSSL: Enable REUSEPORT feature

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Socket: fix array index.

Signed-off-by: Eduardo Silva <edsiper@gmail.com>