On Tue, Jan 24, 2017 at 09:42:07AM -0800, Eric Dumazet wrote: > On Tue, 2017-01-24 at 09:26 -0800, Yuchung Cheng wrote: > > > > > > > Do you think there's a compelling reason for adding a new option or > > > are you interested in a small patch to perform the change above ? > > I like the proposal especially other stack also uses TCP_FASTOPEN > > https://msdn.microsoft.com/en-us/library/windows/desktop/ms738596(v=vs.85).aspx > > > Problem is that might break existing applications that were using > TCP_FASTOPEN before a connect() (it was a NOP until now) > > I prefer we use a separate new option to be 100% safe, not adding > regressions. > > Only new applications, tested, will use this new feature at their risk.
That's indeed a good point. I Yuchung's comment above made me wonder about application's portability but very few OSes will use this and in the end it might be that portable applications will just add : #define TCP_FASTOPEN_CONNECT TCP_FASTOPEN For other OSes and use TCP_FASTOPEN_CONNECT only for the connect() case. Willy