This message generated a parse failure. Raw output follows here. Please use 'back' to navigate. From devnull@lkml.org Sat Apr 20 17:44:08 2024 Envelope-to: j@jasper.es Delivery-date: Wed, 20 Feb 2013 17:51:51 +0100 Received: from localhost ([127.0.0.1] helo=squeeze.vs19.net) by squeeze.vs19.net with esmtp (Exim 4.72) (envelope-from ) id 1U8CtZ-0001vu-Jj for j@jasper.es; Wed, 20 Feb 2013 17:51:50 +0100 Received: from pop3.telfort.nl [213.205.33.252] by squeeze.vs19.net with POP3 (fetchmail-6.3.18) for (single-drop); Wed, 20 Feb 2013 17:51:49 +0100 (CET) Received: from cmgw-nl-1 (10.39.115.161) by mda-nl-4.mail.tiscali.sys (8.5.142) id 4FC4EFAA05803841 for jasper@telfort.nl; Wed, 20 Feb 2013 17:39:15 +0100 Received: from cpsmtpb-ews02.kpnxchange.com ([213.75.39.5]) by cmgw-nl-1 with id 2gfF1l00106gH3H01gfFam; Wed, 20 Feb 2013 17:39:15 +0100 X-CNFS-Analysis: v=2.0 cv=IrKcgcDg c=1 sm=2 a=UK1r566ZdBxH71SXbqIOeA==:17 a=0wiOde9d68gA:10 a=s9QTTzf6cS4A:10 a=nDghuxUhq_wA:10 a=IkcTkHD0fZMA:10 a=pGLkceISAAAA:8 a=1v0RR-UgpuMA:10 a=cH6R9-kdAAAA:8 a=VwQbUJbxAAAA:8 a=W0vUJOdyAAAA:8 a=f9mOutJAjRiC1SkV3zMA:9 a=QEXdDO2ut3YA Received: from cpsps-ews15.kpnxchange.com ([10.94.84.182]) by cpsmtpb-ews02.kpnxchange.com with Microsoft SMTPSVC(7.5.7601.17514); Wed, 20 Feb 2013 17:37:53 +0100 Received: from vger.kernel.org ([209.132.180.67]) by cpsps-ews15.kpnxchange.com with Microsoft SMTPSVC(7.5.7601.17514); Wed, 20 Feb 2013 17:37:53 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934316Ab3BTQjI convert rfc822-to-quoted-printable (ORCPT ); Wed, 20 Feb 2013 11:39:08 -0500 Received: from mail-qa0-f41.google.com ([209.85.216.41]:56192 "EHLO mail-qa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750971Ab3BTQjD (ORCPT ); Wed, 20 Feb 2013 11:39:03 -0500 Received: by mail-qa0-f41.google.com with SMTP id bs12so787607qab.0 for ; Wed, 20 Feb 2013 08:39:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=zMxu7HBR8dRpPQ X-Received: by 10.229.198.22 with SMTP id em22mr2086086qcb.2.1361378341726; Wed, 20 Feb 2013 08:39:01 -0800 (PST) Received: from [192.168.98.106] (pool-70-109-140-46.cncdnh.east.myfairpoint.net. [70.109.140.46]) by mx.google.com with ESMTPS id 8sm30023154qed.6.2013.02.20.08.38.59 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 20 Feb 2013 08:39:00 -0800 Message-Id: <5124FC22.2090706@gmail.com> Date: Wed, 20 Feb 2013 11:38:58 -0500 From: Vlad Yasevich User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0 Mime-Version: 1.0 To: "Roberts, Lee A." Cc: "linux-sctp@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 2/3] sctp: fix association hangs due to reassembly/ordering logic References: <1361374925.3450.2.camel@laptop.lroberts> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-Id: X-Mailing-List: linux-kernel@vger.kernel.org X-OriginalArrivalTime: 20 Feb 2013 16:37:53.0471 (UTC) FILETIME=[A13224F0:01CE0F88] X-RcptDomain: telfort.nl On 02/20/2013 10:55 AM, Roberts, Lee A. wrote: > From: Lee A. Roberts > > Resolve SCTP association hangs observed during SCTP stress > testing. Observable symptoms include communications hangs > with data being held in the association reassembly and/or lobby > (ordering) queues. Close examination of reassembly queue shows > missing packets. > > In sctp_ulpq_renege_list(), do not renege packets below the > cumulative TSN ACK point. Events being reneged from the > ordering queue may correspond to multiple TSNs; identify > and renege all affected packets from the tsnmap. > > Patch applies to linux-3.8 kernel. > > Signed-off-by: Lee A. Roberts > --- > net/sctp/ulpqueue.c | 30 +++++++++++++++++++++++++----- > 1 file changed, 25 insertions(+), 5 deletions(-) > > diff -uprN -X linux-3.8-vanilla/Documentation/dontdiff linux-3.8-SCTP > +1/net/sctp/ulpqueue.c linux-3.8-SCTP+2/net/sctp/ulpqueue.c > --- linux-3.8-SCTP+1/net/sctp/ulpqueue.c 2013-02-18 16:58:34.00000000= 0 > -0700 > +++ linux-3.8-SCTP+2/net/sctp/ulpqueue.c 2013-02-20 08:17:53.67923336= 5 > -0700 > @@ -962,20 +962,40 @@ static __u16 sctp_ulpq_renege_list(struc > struct sk_buff_head *list, __u16 needed) > { > __u16 freed =3D 0; > - __u32 tsn; > - struct sk_buff *skb; > + __u32 tsn, last_tsn; > + struct sk_buff *skb, *flist, *last; > struct sctp_ulpevent *event; > struct sctp_tsnmap *tsnmap; > > tsnmap =3D &ulpq->asoc->peer.tsn_map; > > - while ((skb =3D __skb_dequeue_tail(list)) !=3D NULL) { > - freed +=3D skb_headlen(skb); > + while ((skb =3D skb_peek_tail(list)) !=3D NULL) { > event =3D sctp_skb2event(skb); > tsn =3D event->tsn; > > + /* Don't renege below the Cumulative TSN ACK Point. */ > + if (TSN_lte(tsn, sctp_tsnmap_get_ctsn(tsnmap))) > + break; > + > + /* Events in ordering queue may have multiple fragments > + * corresponding to additional TSNs. Find the last one. > + */ > + flist =3D skb_shinfo(skb)->frag_list; > + for (last =3D flist; flist; flist =3D flist->next) > + last =3D flist; > + if (last) > + last_tsn =3D sctp_skb2event(last)->tsn; > + else > + last_tsn =3D tsn; > + > + /* Unlink the event, then renege all applicable TSNs. */ > + __skb_unlink(skb, list); > + freed +=3D skb_headlen(skb); This is no longer correct. You are actually freeing more space if you=20 are reneging a reassembled event from the the ordered queue. Please separate the 2 patches since they fix 2 distinct bugs. Thanks -vlad > sctp_ulpevent_free(event); > - sctp_tsnmap_renege(tsnmap, tsn); > + while (TSN_lte(tsn, last_tsn)) { > + sctp_tsnmap_renege(tsnmap, tsn); > + tsn++; > + } > if (freed >=3D needed) > return freed; > } > > N=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BDr=EF=BF=BD=EF=BF=BDy=EF= =BF=BD=EF=BF=BD=EF=BF=BDb=EF=BF=BDX=EF=BF=BD=EF=BF=BD=C7=A7v=EF=BF=BD^=EF= =BF=BD)=DE=BA{.n=EF=BF=BD+=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD{=EF=BF=BD= =EF=BF=BD=EF=BF=BDi=EF=BF=BD{ay=EF=BF=BD=1D=CA=87=DA=99=EF=BF=BD,j=07=EF= =BF=BD=EF=BF=BDf=EF=BF=BD=EF=BF=BD=EF=BF=BDh=EF=BF=BD=EF=BF=BD=EF=BF=BD= z=EF=BF=BD=1E=EF=BF=BDw=EF=BF=BD=EF=BF=BD=EF=BF=BD=0C=EF=BF=BD=EF=BF=BD= =EF=BF=BDj:+v=EF=BF=BD=EF=BF=BD=EF=BF=BDw=EF=BF=BDj=EF=BF=BDm=EF=BF=BD=EF= =BF=BD=EF=BF=BD=EF=BF=BD=07=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BDzZ+=EF=BF= =BD=EF=BF=BD=DD=A2j"=EF=BF=BD=EF=BF=BD!tml=3D > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel"= in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/