Re: [systemd-devel] [PATCH 2/3] socket: Add support for TCP Fast Open

2014-08-14 Thread Susant Sahani

Hi Lennart,

On 08/14/2014 06:16 AM, Lennart Poettering wrote:

On Tue, 29.07.14 23:10, Susant Sahani (sus...@redhat.com) wrote:

Looks good. Wanted to apply. But this requires your previous patch, so
please rebase on a new version of that! Thanks!


Since this patch does not depend on the other patches I merged it with
the current code.

Susant

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 2/3] socket: Add support for TCP Fast Open

2014-08-13 Thread Lennart Poettering
On Tue, 29.07.14 23:10, Susant Sahani (sus...@redhat.com) wrote:

Looks good. Wanted to apply. But this requires your previous patch, so
please rebase on a new version of that! Thanks!

 TCP Fast Open (TFO) speeds up the opening of successive
 TCP)connections between two endpoints.It works by using a TFO cookie
 in the initial SYN packet to authenticate a previously connected client.
 It starts sending data to the client before the receipt
 of the final ACK packet of the three way handshake is received, skipping
 a round trip and lowering the latency in the start of transmission of
 data.
 ---
  man/systemd.socket.xml| 15 +++
  src/core/dbus-socket.c|  1 +
  src/core/load-fragment-gperf.gperf.m4 |  1 +
  src/core/socket.c |  8 
  src/core/socket.h |  1 +
  5 files changed, 26 insertions(+)
 
 diff --git a/man/systemd.socket.xml b/man/systemd.socket.xml
 index 6dbcc81..e6bbb2e 100644
 --- a/man/systemd.socket.xml
 +++ b/man/systemd.socket.xml
 @@ -524,6 +524,21 @@
  /varlistentry
  
  varlistentry
 +termvarnameFastOpen=/varname/term
 +listitemparaTakes a boolean
 +argument. It works by using a TFO cookie (a 
 TCP option) in the initial
 +SYN packet to authenticate a previously 
 connected client. If successful,
 +it may start sending data to the client 
 before the receipt of the final
 +ACK packet of the three way handshake is 
 received, skipping a round trip
 +and lowering the latency in the start of 
 transmission of data.
 +This controls the TCP_FASTOPEN socket option 
 (see
 +the ulink 
 url=http://lwn.net/Articles/508865/;TCP
 +Fast Open: expediting web services/ulink 
 for details.)
 +Defaults to
 +optionfalse/option./para/listitem
 +/varlistentry
 +
 +varlistentry
  termvarnamePriority=/varname/term
  listitemparaTakes an integer
  argument controlling the priority for
 diff --git a/src/core/dbus-socket.c b/src/core/dbus-socket.c
 index 348afbd..f9ef7ef 100644
 --- a/src/core/dbus-socket.c
 +++ b/src/core/dbus-socket.c
 @@ -100,6 +100,7 @@ const sd_bus_vtable bus_socket_vtable[] = {
  SD_BUS_PROPERTY(KeepAliveTime, t, bus_property_get_usec, 
 offsetof(Socket, keep_alive_time), SD_BUS_VTABLE_PROPERTY_CONST),
  SD_BUS_PROPERTY(KeepAliveInterval, t, bus_property_get_usec, 
 offsetof(Socket, keep_alive_interval), SD_BUS_VTABLE_PROPERTY_CONST),
  SD_BUS_PROPERTY(KeepAliveProbes, i, bus_property_get_int, 
 offsetof(Socket, keep_alive_cnt), SD_BUS_VTABLE_PROPERTY_CONST),
 +SD_BUS_PROPERTY(FastOpen , b, bus_property_get_bool, 
 offsetof(Socket, fast_open), SD_BUS_VTABLE_PROPERTY_CONST),
  SD_BUS_PROPERTY(Priority, i, bus_property_get_int, 
 offsetof(Socket, priority), SD_BUS_VTABLE_PROPERTY_CONST),
  SD_BUS_PROPERTY(ReceiveBuffer, t, bus_property_get_size, 
 offsetof(Socket, receive_buffer), SD_BUS_VTABLE_PROPERTY_CONST),
  SD_BUS_PROPERTY(SendBuffer, t, bus_property_get_size, 
 offsetof(Socket, send_buffer), SD_BUS_VTABLE_PROPERTY_CONST),
 diff --git a/src/core/load-fragment-gperf.gperf.m4 
 b/src/core/load-fragment-gperf.gperf.m4
 index af9f9cc..3fea038 100644
 --- a/src/core/load-fragment-gperf.gperf.m4
 +++ b/src/core/load-fragment-gperf.gperf.m4
 @@ -234,6 +234,7 @@ Socket.KeepAlive,config_parse_bool,   
0,
  Socket.KeepAliveTime,config_parse_sec,   0,  
offsetof(Socket, keep_alive_time)
  Socket.KeepAliveInterval,config_parse_sec,   0,  
offsetof(Socket, keep_alive_interval)
  Socket.KeepAliveProbes,  config_parse_unsigned,  0,  
offsetof(Socket, keep_alive_cnt)
 +Socket.FastOpen, config_parse_bool,  0,  
offsetof(Socket, fast_open)
  Socket.Priority, config_parse_int,   0,  
offsetof(Socket, priority)
  Socket.ReceiveBuffer,config_parse_iec_size,  0,  
offsetof(Socket, receive_buffer)
  Socket.SendBuffer,   config_parse_iec_size,  0,  
offsetof(Socket, send_buffer)
 diff --git a/src/core/socket.c b/src/core/socket.c
 index c770fe2..b798d4e 100644
 --- a/src/core/socket.c
 +++