From patchwork Tue Dec 3 06:30:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wangweidong X-Patchwork-Id: 296084 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3E0782C009D for ; Tue, 3 Dec 2013 17:31:16 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752240Ab3LCGbN (ORCPT ); Tue, 3 Dec 2013 01:31:13 -0500 Received: from szxga02-in.huawei.com ([119.145.14.65]:43031 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752106Ab3LCGbL (ORCPT ); Tue, 3 Dec 2013 01:31:11 -0500 Received: from 172.24.2.119 (EHLO szxeml211-edg.china.huawei.com) ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id BMJ48113; Tue, 03 Dec 2013 14:30:38 +0800 (CST) Received: from SZXEML410-HUB.china.huawei.com (10.82.67.137) by szxeml211-edg.china.huawei.com (172.24.2.182) with Microsoft SMTP Server (TLS) id 14.3.158.1; Tue, 3 Dec 2013 14:30:37 +0800 Received: from [127.0.0.1] (10.135.68.79) by szxeml410-hub.china.huawei.com (10.82.67.137) with Microsoft SMTP Server id 14.3.158.1; Tue, 3 Dec 2013 14:30:27 +0800 Message-ID: <529D7A82.3070207@huawei.com> Date: Tue, 3 Dec 2013 14:30:26 +0800 From: Wang Weidong User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: David Miller , Neil Horman , Vlad Yasevich CC: Michael Tuexen , , , Subject: [PATCH] sctp: disable max_burst when the max_burst is 0 References: <529C2E01.3090005@huawei.com> <20131202115640.GA10857@hmsreliant.think-freely.org> In-Reply-To: X-Originating-IP: [10.135.68.79] X-CFilter-Loop: Reflected Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org As Michael pointed out that when max_burst is 0, it just disable max_burst. It declared in rfc6458#section-8.1.24. so add the check in sctp_transport_burst_limited, when it 0, just do nothing. Suggested-by: Vlad Yasevich Suggested-by: Michael Tuexen Signed-off-by: Wang Weidong --- net/sctp/transport.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/sctp/transport.c b/net/sctp/transport.c index e332efb..e580e34 100644 --- a/net/sctp/transport.c +++ b/net/sctp/transport.c @@ -573,7 +573,8 @@ void sctp_transport_burst_limited(struct sctp_transport *t) u32 old_cwnd = t->cwnd; u32 max_burst_bytes; - if (t->burst_limited) + /* if the max_burst is 0, do notihing */ + if (t->burst_limited || !asoc->max_burst) return; max_burst_bytes = t->flight_size + (asoc->max_burst * asoc->pathmtu);