From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, lucien.xin@gmail.com, nhorman@tuxdriver.com
Subject: Re: [PATCH RFC v3 4/5] sctp: Make sctp_enqueue_event tak an skb list.
Date: Wed, 27 Feb 2019 23:19:58 -0300 [thread overview]
Message-ID: <20190228021958.GA13343@localhost.localdomain> (raw)
In-Reply-To: <20190227.170024.1735727318522180688.davem@davemloft.net>
On Wed, Feb 27, 2019 at 05:00:24PM -0800, David Miller wrote:
>
> Pass this, instead of an event. Then everything trickles down and we
> always have events a non-empty list.
>
> Then we needs a list creating stub to place into .enqueue_event for sctp_stream_interleave_1.
>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> ---
> net/sctp/stream_interleave.c | 44 +++++++++++++++++++++++++++---------
> 1 file changed, 33 insertions(+), 11 deletions(-)
>
> diff --git a/net/sctp/stream_interleave.c b/net/sctp/stream_interleave.c
> index b6b251b8b3cf..0bc3d9329d9a 100644
> --- a/net/sctp/stream_interleave.c
> +++ b/net/sctp/stream_interleave.c
...
> @@ -866,11 +867,15 @@ static int sctp_ulpevent_idata(struct sctp_ulpq *ulpq,
More context:
if (!(event->msg_flags & SCTP_DATA_UNORDERED)) {
event = sctp_intl_reasm(ulpq, event); [1]
if (event && event->msg_flags & MSG_EOR) { [2]
skb_queue_head_init(&temp);
__skb_queue_tail(&temp, sctp_event2skb(event));
event = sctp_intl_order(ulpq, event);
> }
> } else {
> event = sctp_intl_reasm_uo(ulpq, event);
> + if (event) {
> + skb_queue_head_init(&temp);
> + __skb_queue_tail(&temp, sctp_event2skb(event));
> + }
> }
>
> if (event) {
> event_eor = (event->msg_flags & MSG_EOR) ? 1 : 0;
> - sctp_enqueue_event(ulpq, event);
> + sctp_enqueue_event(ulpq, &temp);
[1] can return an event without MSG_EOR (a partial delivery), which
would skip the condition on [2] and cause temp to not be initialized
by here. Same applies to sctp_ulpq_tail_data().
It's the only thing I noticed on the series. Will test it tomorrow.
> }
>
> return event_eor;
...
next prev parent reply other threads:[~2019-02-28 2:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-28 1:00 [PATCH RFC v3 4/5] sctp: Make sctp_enqueue_event tak an skb list David Miller
2019-02-28 2:19 ` Marcelo Ricardo Leitner [this message]
2019-02-28 12:23 ` Neil Horman
2019-02-28 13:17 ` Marcelo Ricardo Leitner
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=20190228021958.GA13343@localhost.localdomain \
--to=marcelo.leitner@gmail.com \
--cc=davem@davemloft.net \
--cc=lucien.xin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.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).