From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E81DC43381 for ; Thu, 28 Feb 2019 12:24:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EC3512171F for ; Thu, 28 Feb 2019 12:24:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731079AbfB1MYi (ORCPT ); Thu, 28 Feb 2019 07:24:38 -0500 Received: from charlotte.tuxdriver.com ([70.61.120.58]:38926 "EHLO smtp.tuxdriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727692AbfB1MYg (ORCPT ); Thu, 28 Feb 2019 07:24:36 -0500 Received: from cpe-2606-a000-111b-405a-9816-2c85-c514-8f7a.dyn6.twc.com ([2606:a000:111b:405a:9816:2c85:c514:8f7a] helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1gzKjg-0000Y1-OL; Thu, 28 Feb 2019 07:24:32 -0500 Date: Thu, 28 Feb 2019 07:23:56 -0500 From: Neil Horman To: Marcelo Ricardo Leitner Cc: David Miller , netdev@vger.kernel.org, lucien.xin@gmail.com Subject: Re: [PATCH RFC v3 4/5] sctp: Make sctp_enqueue_event tak an skb list. Message-ID: <20190228122356.GA26023@hmswarspite.think-freely.org> References: <20190227.170024.1735727318522180688.davem@davemloft.net> <20190228021958.GA13343@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190228021958.GA13343@localhost.localdomain> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Feb 27, 2019 at 11:19:58PM -0300, Marcelo Ricardo Leitner wrote: > 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 > > --- > > 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(). > I agree, it seems we canjust drop the msg_flags check and just key off of event being non-null, no? Neil > It's the only thing I noticed on the series. Will test it tomorrow. > > > } > > > > return event_eor; > ... >