From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCHv2 net] sctp: change to save MSG_MORE flag into assoc Date: Tue, 28 Mar 2017 17:56:28 -0700 (PDT) Message-ID: <20170328.175628.2142642924151397064.davem@davemloft.net> References: <6faab86dbae351f6ae3994c77dbaf56ac2d98ecf.1490545275.git.lucien.xin@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, linux-sctp@vger.kernel.org, marcelo.leitner@gmail.com, nhorman@tuxdriver.com, david.laight@aculab.com To: lucien.xin@gmail.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:39792 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932654AbdC2A4f (ORCPT ); Tue, 28 Mar 2017 20:56:35 -0400 In-Reply-To: <6faab86dbae351f6ae3994c77dbaf56ac2d98ecf.1490545275.git.lucien.xin@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Xin Long Date: Mon, 27 Mar 2017 00:21:15 +0800 > David Laight noticed the support for MSG_MORE with datamsg->force_delay > didn't really work as we expected, as the first msg with MSG_MORE set > would always block the following chunks' dequeuing. > > This Patch is to rewrite it by saving the MSG_MORE flag into assoc as > David Laight suggested. > > asoc->force_delay is used to save MSG_MORE flag before a msg is sent. > All chunks in queue would not be sent out if asoc->force_delay is set > by the msg with MSG_MORE flag, until a new msg without MSG_MORE flag > clears asoc->force_delay. > > Note that this change would not affect the flush is generated by other > triggers, like asoc->state != ESTABLISHED, queue size > pmtu etc. > > v1->v2: > Not clear asoc->force_delay after sending the msg with MSG_MORE flag. > > Fixes: 4ea0c32f5f42 ("sctp: add support for MSG_MORE") > Signed-off-by: Xin Long Applied, thanks.