Hi Ying, You're right. I'll fix this. Anyway, I just realized another improvement I could make, so I'll send a new version with both changes.
Regards ///jon > -----Original Message----- > From: Ying Xue <ying....@windriver.com> > Sent: 29-Oct-19 06:24 > To: Jon Maloy <jon.ma...@ericsson.com>; Jon Maloy <ma...@donjonn.com> > Cc: Mohan Krishna Ghanta Krishnamurthy > <mohan.krishna.ghanta.krishnamur...@ericsson.com>; > parthasarathy.bhuvara...@gmail.com; Tung Quang Nguyen > <tung.q.ngu...@dektech.com.au>; Hoang > Huu Le <hoang.h...@dektech.com.au>; Tuong Tong Lien > <tuong.t.l...@dektech.com.au>; Gordan > Mihaljevic <gordan.mihalje...@dektech.com.au>; > tipc-discussion@lists.sourceforge.net > Subject: Re: [net-next v3 1/1] tipc: add smart nagle feature > > On 10/29/19 1:37 AM, Jon Maloy wrote: > > @@ -3007,6 +3068,9 @@ static int tipc_setsockopt(struct socket *sock, int > > lvl, int opt, > > case TIPC_GROUP_LEAVE: > > res = tipc_sk_leave(tsk); > > break; > > + case TIPC_NODELAY: > > + tsk->nodelay = true; > > + break; > > default: > > res = -EINVAL; > > } > > Once user sets tsk->nodelay to true, there is no chance to set it back > to false. Although this scenario rarely happens for us, it's better that > we can provide the function. > > For example, below is how TCP supports TCP_NODELAY option: > > case TCP_NODELAY: > if (val) { > /* TCP_NODELAY is weaker than TCP_CORK, so that > * this option on corked socket is remembered, but > * it is not activated until cork is cleared. > * > * However, when TCP_NODELAY is set we make > * an explicit push, which overrides even TCP_CORK > * for currently queued segments. > */ > tp->nonagle |= TCP_NAGLE_OFF|TCP_NAGLE_PUSH; > tcp_push_pending_frames(sk); > } else { > tp->nonagle &= ~TCP_NAGLE_OFF; > } > break; _______________________________________________ tipc-discussion mailing list tipc-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tipc-discussion