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.3 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,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 87B95C10F13 for ; Thu, 11 Apr 2019 22:18:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 47FF52184B for ; Thu, 11 Apr 2019 22:18:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nstq19GL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726844AbfDKWSF (ORCPT ); Thu, 11 Apr 2019 18:18:05 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:53062 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726633AbfDKWSF (ORCPT ); Thu, 11 Apr 2019 18:18:05 -0400 Received: by mail-wm1-f65.google.com with SMTP id a184so8676930wma.2 for ; Thu, 11 Apr 2019 15:18:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=2stAtVOkTBRrZunvmtNLwaBBMJjvqfI+LBzqGMHJ6YU=; b=nstq19GLv0zAPnKpaQehdmp9y1rhx44WI8OeHDnpWSaCM+g0Sn5NpHoBV73pMq5iB4 blMbXxqKkcOMhUL3EUbdaUcivakCJfEPJ8yzJPYyhHDRI8YrCecYLz1z8Sr4HvwN3s8c kxqdjG3Xmb6h4ETVvMb6UyKr7h/opt/0UIa4AQObFNPUuJEDWygFQadLHtmCQDXjxes9 FsluQhmB2QwS603XNVDpLyg8a5JPju/AnxSjLHoq33qRuTjjeW/KhEY7kGQ+51j0fZiE ug76c86rbgFieEUR27yyvNyxZPVNtYSNOmnS6r4lXJTAuT1Vn5yHMqv8ZQA8zjT18CsA LLRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=2stAtVOkTBRrZunvmtNLwaBBMJjvqfI+LBzqGMHJ6YU=; b=t/vtZSF6+HZfe/yqOtuYusz0u9SFC3OQg8jSufMXrFs5jHyYKqGJu/bi2+HdJV49NW 79pqx8YnQUIAWSPp8TFmotMGj1JxAAVGVxwFqpXk0agXs9L+W7q73aenZVgSukKSZmCA Ed5sYwNkLv0mKXIcQSFzLd/G9LhbboN/d1AfIIbOxdBUC1lb0GUI0jSRUM1T8nKpnhpY t1Znm+vgQMZAvlkE03vIqRjyyaFbWsWEivkc/U1wSzTbftUx+eg3+6rhbbyC7FHZNfEI iEV5NVVYgakAAVOr3m9G/dkggbf5VYIQgmZNDCw9CZ5XZXZXvdU9+g5GeP+gBHOABBum tsLw== X-Gm-Message-State: APjAAAWmqmSkOjxRxMBccAhw0WjeKTdQ0wTaTB8s4BrtJo1+A4BsnAPl XN3nO8u2CZzfWFdOhQ2y2TM= X-Google-Smtp-Source: APXvYqwXt2jNUy/9hPT2VglgW4wE4pvMZ57k4CMRp907Vw8gyNWSS9vQDpJG2acHhjt7eUyViVZiOA== X-Received: by 2002:a1c:a184:: with SMTP id k126mr8038767wme.71.1555021083367; Thu, 11 Apr 2019 15:18:03 -0700 (PDT) Received: from localhost.localdomain ([194.42.141.29]) by smtp.gmail.com with ESMTPSA id o2sm31707262wrs.89.2019.04.11.15.18.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 11 Apr 2019 15:18:02 -0700 (PDT) Received: by localhost.localdomain (Postfix, from userid 1000) id 6CC4C180B5B; Thu, 11 Apr 2019 19:18:01 -0300 (-03) Date: Thu, 11 Apr 2019 19:18:01 -0300 From: Marcelo Ricardo Leitner To: David Miller Cc: netdev@vger.kernel.org, lucien.xin@gmail.com, nhorman@tuxdriver.com Subject: Re: [PATCH v5 2/5] sctp: Always pass skbs on a list to sctp_ulpq_tail_event(). Message-ID: <20190411221801.GN10452@localhost.localdomain> References: <20190411.150157.1608261572973187963.davem@davemloft.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190411.150157.1608261572973187963.davem@davemloft.net> 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 Thu, Apr 11, 2019 at 03:01:57PM -0700, David Miller wrote: > > This way we can simplify the logic and remove assumptions > about the implementation of skb lists. > > Signed-off-by: David S. Miller Acked-by: Marcelo Ricardo Leitner > --- > net/sctp/ulpqueue.c | 16 ++++++++++------ > 1 file changed, 10 insertions(+), 6 deletions(-) > > diff --git a/net/sctp/ulpqueue.c b/net/sctp/ulpqueue.c > index 0fecc1fb4ab7..b22f558adc49 100644 > --- a/net/sctp/ulpqueue.c > +++ b/net/sctp/ulpqueue.c > @@ -738,19 +738,19 @@ void sctp_ulpq_reasm_flushtsn(struct sctp_ulpq *ulpq, __u32 fwd_tsn) > static void sctp_ulpq_reasm_drain(struct sctp_ulpq *ulpq) > { > struct sctp_ulpevent *event = NULL; > - struct sk_buff_head temp; > > if (skb_queue_empty(&ulpq->reasm)) > return; > > while ((event = sctp_ulpq_retrieve_reassembled(ulpq)) != NULL) { > - /* Do ordering if needed. */ > - if (event->msg_flags & MSG_EOR) { > - skb_queue_head_init(&temp); > - __skb_queue_tail(&temp, sctp_event2skb(event)); > + struct sk_buff_head temp; > + > + skb_queue_head_init(&temp); > + __skb_queue_tail(&temp, sctp_event2skb(event)); > > + /* Do ordering if needed. */ > + if (event->msg_flags & MSG_EOR) > event = sctp_ulpq_order(ulpq, event); > - } > > /* Send event to the ULP. 'event' is the > * sctp_ulpevent for very first SKB on the temp' list. > @@ -1082,6 +1082,10 @@ void sctp_ulpq_partial_delivery(struct sctp_ulpq *ulpq, > event = sctp_ulpq_retrieve_first(ulpq); > /* Send event to the ULP. */ > if (event) { > + struct sk_buff_head temp; > + > + skb_queue_head_init(&temp); > + __skb_queue_tail(&temp, sctp_event2skb(event)); > sctp_ulpq_tail_event(ulpq, event); > sctp_ulpq_set_pd(ulpq); > return; > -- > 2.20.1 >