Re: [PATCH net-next 2/2] sctp: add support for MSG_MORE

2017-03-28 Thread 'Marcelo Ricardo Leitner'
On Tue, Mar 28, 2017 at 10:29:27AM +, David Laight wrote: > From: Marcelo Ricardo Leitner > > Sent: 21 March 2017 22:04 > ... > > > > 3. then if user send more small chunks with MSG_MORE set, > > > > the queue is like: > > > > chkB[set] -> chkA[set] -> chk4[clear] -> chk3 [clear] -> chk2 [cle

RE: [PATCH net-next 2/2] sctp: add support for MSG_MORE

2017-03-28 Thread David Laight
From: Marcelo Ricardo Leitner > Sent: 21 March 2017 22:04 ... > > > 3. then if user send more small chunks with MSG_MORE set, > > > the queue is like: > > > chkB[set] -> chkA[set] -> chk4[clear] -> chk3 [clear] -> chk2 [clear] > > > -> chk1 [clear] > > > so that the new small chunks' flag will n

RE: [PATCH net-next 2/2] sctp: add support for MSG_MORE

2017-03-24 Thread David Laight
From: Marcelo Ricardo Leitner > Sent: 23 March 2017 16:42 ... > > > David, are we on the same page now? ;-) Probably... > > > Xin, what do you think? > > If we insist that MSG_MORE means not to send ANY data, I compromise. > > does ANY include retransmission DATA? should MSG_MORE block > > retra

Re: [PATCH net-next 2/2] sctp: add support for MSG_MORE

2017-03-24 Thread Xin Long
On Fri, Mar 24, 2017 at 12:42 AM, Marcelo Ricardo Leitner wrote: > On Thu, Mar 23, 2017 at 12:35:46PM +0800, Xin Long wrote: >> On Thu, Mar 23, 2017 at 1:33 AM, Marcelo Ricardo Leitner >> wrote: >> > On Wed, Mar 22, 2017 at 02:07:37PM +, David Laight wrote: >> >> Regardless of the MSG_MORE fl

Re: [PATCH net-next 2/2] sctp: add support for MSG_MORE

2017-03-23 Thread Marcelo Ricardo Leitner
On Thu, Mar 23, 2017 at 12:35:46PM +0800, Xin Long wrote: > On Thu, Mar 23, 2017 at 1:33 AM, Marcelo Ricardo Leitner > wrote: > > On Wed, Mar 22, 2017 at 02:07:37PM +, David Laight wrote: > >> Regardless of the MSG_MORE flags associated with any specific send() > >> request there will always b

Re: [PATCH net-next 2/2] sctp: add support for MSG_MORE

2017-03-22 Thread Xin Long
On Thu, Mar 23, 2017 at 1:33 AM, Marcelo Ricardo Leitner wrote: > On Wed, Mar 22, 2017 at 02:07:37PM +, David Laight wrote: >> From: Marcelo Ricardo Leitner [mailto:marcelo.leit...@gmail.com] >> > Sent: 21 March 2017 22:04 >> > Hi, >> ... >> > > > 2. send 1 more chunk with MSG_MORE clear, the

Re: [PATCH net-next 2/2] sctp: add support for MSG_MORE

2017-03-22 Thread 'Marcelo Ricardo Leitner'
On Wed, Mar 22, 2017 at 02:07:37PM +, David Laight wrote: > From: Marcelo Ricardo Leitner [mailto:marcelo.leit...@gmail.com] > > Sent: 21 March 2017 22:04 > > Hi, > ... > > > > 2. send 1 more chunk with MSG_MORE clear, the queue is: > > > > chk4[clear] -> chk3 [clear] -> chk2 [clear] -> chk1

RE: [PATCH net-next 2/2] sctp: add support for MSG_MORE

2017-03-22 Thread David Laight
From: Marcelo Ricardo Leitner [mailto:marcelo.leit...@gmail.com] > Sent: 21 March 2017 22:04 > Hi, ... > > > 2. send 1 more chunk with MSG_MORE clear, the queue is: > > > chk4[clear] -> chk3 [clear] -> chk2 [clear] -> chk1 [clear] > > > > I don't think processing the entire queue is a good idea.

Re: [PATCH net-next 2/2] sctp: add support for MSG_MORE

2017-03-21 Thread Marcelo Ricardo Leitner
Hi, On Fri, Feb 24, 2017 at 10:14:09AM +, David Laight wrote: > From: Xin Long > > Sent: 24 February 2017 06:44 > ... > > > IIRC sctp_packet_can_append_data() is called for the first queued > > > data chunk in order to decide whether to generate a message that > > > consists only of data chunk

RE: [PATCH net-next 2/2] sctp: add support for MSG_MORE

2017-02-27 Thread David Laight
From: Xin Long > Sent: 27 February 2017 04:49 ... > > what I'm worried about is if the msg_more is saved in assoc: > > chk4[clear] -> chk3 [clear] -> chk2 [clear] -> chk1 [clear] > > then when you send a small chkA with MSG_MORE, > > the queue will be like: > > chkA [set] -> chk4[set] ->

Re: [PATCH net-next 2/2] sctp: add support for MSG_MORE

2017-02-26 Thread Xin Long
On Sat, Feb 25, 2017 at 4:41 PM, Xin Long wrote: > On Fri, Feb 24, 2017 at 6:14 PM, David Laight wrote: >> >> From: Xin Long >> > Sent: 24 February 2017 06:44 >> ... >> > > IIRC sctp_packet_can_append_data() is called for the first queued >> > > data chunk in order to decide whether to generate a

Re: [PATCH net-next 2/2] sctp: add support for MSG_MORE

2017-02-25 Thread Xin Long
On Fri, Feb 24, 2017 at 6:14 PM, David Laight wrote: > > From: Xin Long > > Sent: 24 February 2017 06:44 > ... > > > IIRC sctp_packet_can_append_data() is called for the first queued > > > data chunk in order to decide whether to generate a message that > > > consists only of data chunks. > > > If

RE: [PATCH net-next 2/2] sctp: add support for MSG_MORE

2017-02-24 Thread David Laight
From: Xin Long > Sent: 24 February 2017 06:44 ... > > IIRC sctp_packet_can_append_data() is called for the first queued > > data chunk in order to decide whether to generate a message that > > consists only of data chunks. > > If it returns SCTP_XMIT_OK then a message is built collecting the > > re

Re: [PATCH net-next 2/2] sctp: add support for MSG_MORE

2017-02-23 Thread Xin Long
On Fri, Feb 24, 2017 at 12:04 AM, David Laight wrote: > From: Xin Long >> Sent: 23 February 2017 03:46 >> On Tue, Feb 21, 2017 at 10:27 PM, David Laight >> wrote: >> > From: Xin Long >> >> Sent: 18 February 2017 17:53 >> >> This patch is to add support for MSG_MORE on sctp. >> >> >> >> It adds f

Re: [PATCH net-next 2/2] sctp: add support for MSG_MORE

2017-02-23 Thread Marcelo Ricardo Leitner
On Fri, Feb 24, 2017 at 02:16:02AM +0800, Xin Long wrote: > On Fri, Feb 24, 2017 at 1:40 AM, Marcelo Ricardo Leitner > wrote: > > On Thu, Feb 23, 2017 at 04:04:10PM +, David Laight wrote: > >> From: Xin Long > >> > Sent: 23 February 2017 03:46 > >> > On Tue, Feb 21, 2017 at 10:27 PM, David Lai

Re: [PATCH net-next 2/2] sctp: add support for MSG_MORE

2017-02-23 Thread Xin Long
On Fri, Feb 24, 2017 at 1:40 AM, Marcelo Ricardo Leitner wrote: > On Thu, Feb 23, 2017 at 04:04:10PM +, David Laight wrote: >> From: Xin Long >> > Sent: 23 February 2017 03:46 >> > On Tue, Feb 21, 2017 at 10:27 PM, David Laight >> > wrote: >> > > From: Xin Long >> > >> Sent: 18 February 2017

Re: [PATCH net-next 2/2] sctp: add support for MSG_MORE

2017-02-23 Thread Marcelo Ricardo Leitner
On Thu, Feb 23, 2017 at 04:04:10PM +, David Laight wrote: > From: Xin Long > > Sent: 23 February 2017 03:46 > > On Tue, Feb 21, 2017 at 10:27 PM, David Laight > > wrote: > > > From: Xin Long > > >> Sent: 18 February 2017 17:53 > > >> This patch is to add support for MSG_MORE on sctp. > > >> >

RE: [PATCH net-next 2/2] sctp: add support for MSG_MORE

2017-02-23 Thread David Laight
From: Xin Long > Sent: 23 February 2017 03:46 > On Tue, Feb 21, 2017 at 10:27 PM, David Laight > wrote: > > From: Xin Long > >> Sent: 18 February 2017 17:53 > >> This patch is to add support for MSG_MORE on sctp. > >> > >> It adds force_delay in sctp_datamsg to save MSG_MORE, and sets it after >

Re: [PATCH net-next 2/2] sctp: add support for MSG_MORE

2017-02-22 Thread Xin Long
On Tue, Feb 21, 2017 at 10:27 PM, David Laight wrote: > From: Xin Long >> Sent: 18 February 2017 17:53 >> This patch is to add support for MSG_MORE on sctp. >> >> It adds force_delay in sctp_datamsg to save MSG_MORE, and sets it after >> creating datamsg according to the send flag. sctp_packet_can

RE: [PATCH net-next 2/2] sctp: add support for MSG_MORE

2017-02-21 Thread David Laight
From: Xin Long > Sent: 18 February 2017 17:53 > This patch is to add support for MSG_MORE on sctp. > > It adds force_delay in sctp_datamsg to save MSG_MORE, and sets it after > creating datamsg according to the send flag. sctp_packet_can_append_data > then uses it to decide if the chunks of this

[PATCH net-next 2/2] sctp: add support for MSG_MORE

2017-02-18 Thread Xin Long
This patch is to add support for MSG_MORE on sctp. It adds force_delay in sctp_datamsg to save MSG_MORE, and sets it after creating datamsg according to the send flag. sctp_packet_can_append_data then uses it to decide if the chunks of this msg will be sent at once or delay it. Note that unlike [