Re: [Dnsmasq-discuss] TCP Fast Open?

2019-03-10 Thread Simon Kelley
On 10/03/2019 02:02, Craig Andrews wrote:
> TCP Fast Open eliminates a round trip for TCP connections. Since dnsmasq
> is performance sensitive and uses many TCP connections, using TCP Fast
> Open would be a nice improvement. See https://lwn.net/Articles/508865/
> for background.
> 
> On the client side, it's as simple as setting the TCP_FASTOPEN_CONNECT
> option on the socket.
> 
> On the server side, dnsmasq would do something like this on the
> listening socket:
> 
> int qlen = 5;
> setsockopt(fd, SOL_TCP, TCP_FASTOPEN, , sizeof(qlen));
> 
> Chrome and Firefox have supported TCP Fast Open for clients for over a
> year, and other DNS servers (ex unbound) use it for client and sever
> connections too.
> 
> Could dnsmasq implement TCP Fast Open?
> 
> Thanks,
> ~Craig
> 
> ___
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 

I think

http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=608aa9fcfca2ffeba40d78c7c4e0dcb50e0d5704

should do the trick. Please test.


Cheers,

Simon.



signature.asc
Description: OpenPGP digital signature
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


[Dnsmasq-discuss] TCP Fast Open?

2019-03-09 Thread Craig Andrews
TCP Fast Open eliminates a round trip for TCP connections. Since dnsmasq 
is performance sensitive and uses many TCP connections, using TCP Fast 
Open would be a nice improvement. See https://lwn.net/Articles/508865/ 
for background.


On the client side, it's as simple as setting the TCP_FASTOPEN_CONNECT 
option on the socket.


On the server side, dnsmasq would do something like this on the 
listening socket:


int qlen = 5;
setsockopt(fd, SOL_TCP, TCP_FASTOPEN, , sizeof(qlen));

Chrome and Firefox have supported TCP Fast Open for clients for over a 
year, and other DNS servers (ex unbound) use it for client and sever 
connections too.


Could dnsmasq implement TCP Fast Open?

Thanks,
~Craig


signature.asc
Description: OpenPGP digital signature
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss