Re: [RFC PATCH v2 net-next 4/7] tcp: Make use of MSG_EOR flag in tcp_sendmsg

2016-04-19 Thread Eric Dumazet
On Tue, 2016-04-19 at 09:47 +, David Laight wrote: > From: Eric Dumazet > > Sent: 19 April 2016 00:18 > ... > > MSG_EOR should not depend on SKBTX_ANY_TSTAMP > > > > Really, simply using send(fd, ..., len, MSG_EOR) should instruct TCP to > > mark the cooked skb as a non candidate for future co

RE: [RFC PATCH v2 net-next 4/7] tcp: Make use of MSG_EOR flag in tcp_sendmsg

2016-04-19 Thread David Laight
From: Eric Dumazet > Sent: 19 April 2016 00:18 ... > MSG_EOR should not depend on SKBTX_ANY_TSTAMP > > Really, simply using send(fd, ..., len, MSG_EOR) should instruct TCP to > mark the cooked skb as a non candidate for future coalescing. Isn't that very similar to the inverse of MSG_MORE? Or a s

Re: [RFC PATCH v2 net-next 4/7] tcp: Make use of MSG_EOR flag in tcp_sendmsg

2016-04-18 Thread Eric Dumazet
On Mon, 2016-04-18 at 20:18 -0700, Martin KaFai Lau wrote: > On Mon, Apr 18, 2016 at 07:50:41PM -0700, Eric Dumazet wrote: > > I believe it is slightly wrong (to do the goto new_segment if there is > > no data to send) > Aha. Thanks for pointing it out. > > > > > I would instead use this fast path

Re: [RFC PATCH v2 net-next 4/7] tcp: Make use of MSG_EOR flag in tcp_sendmsg

2016-04-18 Thread Martin KaFai Lau
On Mon, Apr 18, 2016 at 07:50:41PM -0700, Eric Dumazet wrote: > I believe it is slightly wrong (to do the goto new_segment if there is > no data to send) Aha. Thanks for pointing it out. > > I would instead use this fast path, doing the test _when_ we already > have an skb to test for. The v1 was

Re: [RFC PATCH v2 net-next 4/7] tcp: Make use of MSG_EOR flag in tcp_sendmsg

2016-04-18 Thread Eric Dumazet
On Mon, 2016-04-18 at 19:27 -0700, Martin KaFai Lau wrote: > On Mon, Apr 18, 2016 at 05:06:57PM -0700, Eric Dumazet wrote: > > It should only be a request from user space to ask TCP to not aggregate > > stuff on future sendpage()/sendmsg() on the skb carrying this new flag. > > > How about somethin

Re: [RFC PATCH v2 net-next 4/7] tcp: Make use of MSG_EOR flag in tcp_sendmsg

2016-04-18 Thread Martin KaFai Lau
On Mon, Apr 18, 2016 at 05:06:57PM -0700, Eric Dumazet wrote: > It should only be a request from user space to ask TCP to not aggregate > stuff on future sendpage()/sendmsg() on the skb carrying this new flag. > How about something like this. Please advise if tcp_sendmsg_noappend can be simpler.

Re: [RFC PATCH v2 net-next 4/7] tcp: Make use of MSG_EOR flag in tcp_sendmsg

2016-04-18 Thread Eric Dumazet
On Mon, 2016-04-18 at 16:43 -0700, ka...@fb.com wrote: > > > > netperf could then get an option to set this MSG_EOR ;) > Not sure how it is related. Can you share how netperf can > benefit from MSG_EOR in TCP tests without any of the > SOF_TIMESTAMPING_TX_RECORD_MASK. Simply setting MSG_EOR woul

Re: [RFC PATCH v2 net-next 4/7] tcp: Make use of MSG_EOR flag in tcp_sendmsg

2016-04-18 Thread kafai
On Mon, Apr 18, 2016 at 04:18:13PM -0700, Eric Dumazet wrote: > On Mon, 2016-04-18 at 15:46 -0700, Martin KaFai Lau wrote: > > This patch allows the user process to use MSG_EOR during > > tcp_sendmsg to tell the kernel that it is the last byte > > of an application response message. > > > > It is c

Re: [RFC PATCH v2 net-next 4/7] tcp: Make use of MSG_EOR flag in tcp_sendmsg

2016-04-18 Thread Eric Dumazet
On Mon, 2016-04-18 at 15:46 -0700, Martin KaFai Lau wrote: > This patch allows the user process to use MSG_EOR during > tcp_sendmsg to tell the kernel that it is the last byte > of an application response message. > > It is currently useful when the end-user has turned on any bit of the > SOF_TIME

[RFC PATCH v2 net-next 4/7] tcp: Make use of MSG_EOR flag in tcp_sendmsg

2016-04-18 Thread Martin KaFai Lau
This patch allows the user process to use MSG_EOR during tcp_sendmsg to tell the kernel that it is the last byte of an application response message. It is currently useful when the end-user has turned on any bit of the SOF_TIMESTAMPING_TX_RECORD_MASK (either by setsockopt or cmsg). The kernel will