Hi Lukas,

On Wed, Feb 13, 2013 at 01:03:40AM +0100, Lukas Tribus wrote:
> 
> Hi Willy,
> 
> I tried to enable tfo on the bind line today, however, it failed even on
> recent kernels for me.
> 
> At first it was failing with:
> [ALERT] 042/223418 (1141) : parsing [haproxy.cfg:14] : 'bind *:1234' unknown 
> keyword 'tfo'. Registered keywords :
> 
> Since this pointed to a trivial parser issue, I checked the code and believe
> to have fixed that particular issue by adding a missing tfo related line in
> src/proto_tcp.c (NULL parse function):
> 
> (yes, this patch is mangled too, but it didn't fix all the issues anyway)
> 
> diff --git a/src/proto_tcp.c b/src/proto_tcp.c
> index 60b111c..3d3c678 100644
> --- a/src/proto_tcp.c
> +++ b/src/proto_tcp.c
> @@ -1910,6 +1910,7 @@ static struct bind_kw_list bind_kws = { "TCP", { }, {
>         { "defer-accept",  NULL,  0 },
>         { "interface",     NULL,  1 },
>         { "mss",           NULL,  1 },
> +        { "tfo",           NULL,  0 },
>         { "transparent",   NULL,  0 },
>         { "v4v6",          NULL,  0 },
>         { "v6only",        NULL,  0 },

Huh ? It is already present a few lines above :

$ git grep -nwC1 tfo src
src/proto_tcp.c-1899-#ifdef TCP_FASTOPEN
src/proto_tcp.c:1900:   { "tfo",           bind_parse_tfo,          0 }, /* 
enable TCP_FASTOPEN of listening socket */
src/proto_tcp.c-1901-#endif

I think your libc simply does not define TCP_FASTOPEN which is very
recent. You should simply do like me, pass DEFINE="-DTCP_FASTOPEN=23"
to make when building.

(...)
> btw: 2 minor cosmetic issues about the tfo commit :
> 
>   - support for server side TFO was actually introduced in linux-3.7,
>     linux-3.6 just has TFO client support: doc/configuration.txt and
>     a code comment in include/types/listener.h will need to be updated

I remember that, I initially thought it was on both sides in 3.6 when I
did it (patches were available but not merged).

>   - a small copy&paste issue in src/proto_tcp.c: the code comment above
>     "static int bind_parse_tfo" actually indicates the defer-accept
>     keyword, not the tfo keyword.
> 
> 
> If you want I can send patches, but I will have to fix the mailer first.

Yes, please do !

If your mailer causes too much trouble, you can export a patch with git
in mailbox format (git format-patch, eg: "git format-patch -1" to make
a patch from last commit). Then you attach it to your mail, the mailer
will probably not notice and will not try to be smart... If you do so,
please ensure that the patch description is in the commit message and
not in the mail itself, as it is very tempting to do so in general.

Willy


Reply via email to