netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: Xin Long <lucien.xin@gmail.com>
Cc: David Laight <David.Laight@aculab.com>,
	network dev <netdev@vger.kernel.org>,
	"linux-sctp@vger.kernel.org" <linux-sctp@vger.kernel.org>,
	Neil Horman <nhorman@tuxdriver.com>,
	Vlad Yasevich <vyasevich@gmail.com>,
	"davem@davemloft.net" <davem@davemloft.net>
Subject: Re: [PATCH net-next 2/2] sctp: add support for MSG_MORE
Date: Thu, 23 Mar 2017 13:42:26 -0300	[thread overview]
Message-ID: <20170323164225.GH23553@localhost.localdomain> (raw)
In-Reply-To: <CADvbK_cvPxk6c-vpqqo-UO5P4j6L4XK9wBPsgqpcJG_hc8Ztqw@mail.gmail.com>

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
> <marcelo.leitner@gmail.com> wrote:
> > On Wed, Mar 22, 2017 at 02:07:37PM +0000, David Laight wrote:
> >> Regardless of the MSG_MORE flags associated with any specific send()
> >> request there will always be protocol effects (like retransmissions
> >> or flow control 'on') that will generate different 'chunking'.
> >
> > Yes, those are the ones that may lead to some confusion on how it
> > actually works, and mangling them is not really desired for the
> > sideeffects that it might have.
> >
> > Sooner or later we could have bug reports like "hey this chunk shouldn't
> > have been packed with that." if we stick with the initial proposition,
> > while with David's view, we are only promising to not send packets with
> > a single chunk and as long as the application send more data fast enough.
> >
> > David, are we on the same page now? ;-)
> >
> > 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
> retransmission ?

That's not really what he meant by that, I think. That "ANY" in there is
a way to refer to the entire buf and not that msg sendmsg is sending.
Later I explained what I got from his explanation, which should be more
like:
"If MSG_MORE was used, and there are no packets in flight, do not send a
packet right away because the application is going to send more data."
Would have to handle the (Not-)Nagle situation too:
"If not using Nagle and using MSG_MORE, try to not generate a packet
right away." (because this may send packets with a single chunk even if
in_flight != 0)
In both cases, if the flush is generated by other triggers, it's okay.

Because if there are chunks already queued, they will be sent as soon as
in_flight reaches 0 or some other break is lifted (flow control).
Holding the chunk that was queued with MSG_MORE and sending a partial
packet in this case because of MSG_MORE is not good, it's possibly not
saving anything.

  Marcelo

  reply	other threads:[~2017-03-23 16:42 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-18 17:52 [PATCH net-next 0/2] sctp: support MSG_MORE flag when sending msg Xin Long
2017-02-18 17:52 ` [PATCH net-next 1/2] sctp: flush out queue once assoc state falls into SHUTDOWN_PENDING Xin Long
2017-02-18 17:52   ` [PATCH net-next 2/2] sctp: add support for MSG_MORE Xin Long
2017-02-21 14:27     ` David Laight
2017-02-23  3:45       ` Xin Long
2017-02-23 16:04         ` David Laight
2017-02-23 17:40           ` Marcelo Ricardo Leitner
2017-02-23 18:16             ` Xin Long
2017-02-23 18:39               ` Marcelo Ricardo Leitner
2017-02-24  6:43           ` Xin Long
2017-02-24 10:14             ` David Laight
2017-02-25  8:41               ` Xin Long
2017-02-27  4:49                 ` Xin Long
2017-02-27 10:48                   ` David Laight
2017-03-21 22:04               ` Marcelo Ricardo Leitner
2017-03-22 14:07                 ` David Laight
2017-03-22 17:33                   ` 'Marcelo Ricardo Leitner'
2017-03-23  4:35                     ` Xin Long
2017-03-23 16:42                       ` Marcelo Ricardo Leitner [this message]
2017-03-24 16:09                         ` Xin Long
2017-03-24 17:38                         ` David Laight
2017-03-28 10:29                 ` David Laight
2017-03-28 18:12                   ` 'Marcelo Ricardo Leitner'
2017-02-20 15:26 ` [PATCH net-next 0/2] sctp: support MSG_MORE flag when sending msg David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170323164225.GH23553@localhost.localdomain \
    --to=marcelo.leitner@gmail.com \
    --cc=David.Laight@aculab.com \
    --cc=davem@davemloft.net \
    --cc=linux-sctp@vger.kernel.org \
    --cc=lucien.xin@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=vyasevich@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).