All of lore.kernel.org
 help / color / mirror / Atom feed
* Issues related to TCP Fast Open flags: TFO_SERVER_COOKIE_NOT_CHKED and TFO_SERVER_WO_SOCKOPT2
@ 2016-08-13 23:05 Piotr Jurkiewicz
  2016-08-15 16:52 ` Yuchung Cheng
  0 siblings, 1 reply; 2+ messages in thread
From: Piotr Jurkiewicz @ 2016-08-13 23:05 UTC (permalink / raw)
  To: netdev

1. Handling of TFO_SERVER_COOKIE_NOT_CHKED flag was removed back in 2014, but this flag is still mentioned in the documentation:

Documentation/networking/ip-sysctl.txt:
	0x100: Accept SYN data w/o validating the cookie.

2. There is no explanation how TFO_SERVER_WO_SOCKOPT1 and TFO_SERVER_WO_SOCKOPT2 differ, the docs only say:

Documentation/networking/ip-sysctl.txt:
	0x400/0x800: Enable Fast Open on all listeners regardless of the
	   TCP_FASTOPEN socket option. The two different flags designate two
	   different ways of setting max_qlen without the TCP_FASTOPEN socket
	   option.

3. When TFO_SERVER_WO_SOCKOPT2 flag is set, the fastopenq.max_qlen is set to the value of sysctl bitmap containing flags (sysctl_tcp_fastopen), what is (at least for me) completely irrational and I believe is a bug:

net/ipv4/af_inet.c:
225                         else if ((sysctl_tcp_fastopen &
226                                   TFO_SERVER_WO_SOCKOPT2) != 0)
227                                 fastopen_queue_tune(sk,
228                                     ((uint)sysctl_tcp_fastopen) >> 16);

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Issues related to TCP Fast Open flags: TFO_SERVER_COOKIE_NOT_CHKED and TFO_SERVER_WO_SOCKOPT2
  2016-08-13 23:05 Issues related to TCP Fast Open flags: TFO_SERVER_COOKIE_NOT_CHKED and TFO_SERVER_WO_SOCKOPT2 Piotr Jurkiewicz
@ 2016-08-15 16:52 ` Yuchung Cheng
  0 siblings, 0 replies; 2+ messages in thread
From: Yuchung Cheng @ 2016-08-15 16:52 UTC (permalink / raw)
  To: Piotr Jurkiewicz; +Cc: netdev

On Sat, Aug 13, 2016 at 4:05 PM, Piotr Jurkiewicz
<piotr.jerzy.jurkiewicz@gmail.com> wrote:
> 1. Handling of TFO_SERVER_COOKIE_NOT_CHKED flag was removed back in 2014,
> but this flag is still mentioned in the documentation:
>
> Documentation/networking/ip-sysctl.txt:
>         0x100: Accept SYN data w/o validating the cookie.
>
> 2. There is no explanation how TFO_SERVER_WO_SOCKOPT1 and
> TFO_SERVER_WO_SOCKOPT2 differ, the docs only say:
>
> Documentation/networking/ip-sysctl.txt:
>         0x400/0x800: Enable Fast Open on all listeners regardless of the
>            TCP_FASTOPEN socket option. The two different flags designate two
>            different ways of setting max_qlen without the TCP_FASTOPEN
> socket
>            option.
>
> 3. When TFO_SERVER_WO_SOCKOPT2 flag is set, the fastopenq.max_qlen is set to
> the value of sysctl bitmap containing flags (sysctl_tcp_fastopen), what is
> (at least for me) completely irrational and I believe is a bug:
>
> net/ipv4/af_inet.c:
> 225                         else if ((sysctl_tcp_fastopen &
> 226                                   TFO_SERVER_WO_SOCKOPT2) != 0)
> 227                                 fastopen_queue_tune(sk,
> 228                                     ((uint)sysctl_tcp_fastopen) >> 16);
Thanks for pointing these issues out. The document indeed needs work.

TFO_SERVERS_WO_SOCKEOPT2 was used for debugging purposes that we
forget to clean up before upstream. Here is my plan:

1) send a patch to remove this opaque/buggy internal debugging option
2) update the ip-sysctl, perhaps update tcp option man pages

How does that sound?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-15 16:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-13 23:05 Issues related to TCP Fast Open flags: TFO_SERVER_COOKIE_NOT_CHKED and TFO_SERVER_WO_SOCKOPT2 Piotr Jurkiewicz
2016-08-15 16:52 ` Yuchung Cheng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.