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 <[email protected]> > Sent: 29-Oct-19 06:24 > To: Jon Maloy <[email protected]>; Jon Maloy <[email protected]> > Cc: Mohan Krishna Ghanta Krishnamurthy > <[email protected]>; > [email protected]; Tung Quang Nguyen > <[email protected]>; Hoang > Huu Le <[email protected]>; Tuong Tong Lien > <[email protected]>; Gordan > Mihaljevic <[email protected]>; > [email protected] > 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 [email protected] https://lists.sourceforge.net/lists/listinfo/tipc-discussion
