Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp305594pxx; Wed, 28 Oct 2020 05:30:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXRMoYft2rtg4KblILKz1HvEqCK3fQuE+yZdSxqM/bfE4vWS/H30OVu8pwyMQhROvsMuTE X-Received: by 2002:a17:906:d8ce:: with SMTP id re14mr1854160ejb.275.1603888234913; Wed, 28 Oct 2020 05:30:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603888234; cv=none; d=google.com; s=arc-20160816; b=Nw+YqImnHyca5rWHyCkA95troLtGFSUZWW96gatP1p6DVNPsLiActLIFK5zhzeVzW0 pUbAkt0h/mcvXTIrx9uaPJiFT8WvuPTLEBmy49nHsV/t3poE3vYJbQ/tqKIPYlXxzRUu 2A3KAkA6/TjbM5LJWipqmUfTOJe9rIx4dsKQEVDq0GOIf+mXLGi/5q8GLxOTomLm9qzr 5JywjKkWTp4egJK/eZ68wG1Fg+fJzNyHHqeocRxysg8pqcnYDdNXbRx4qYzCfTLm89QP P6O30/TqTC9GWtVPC1eL/wVgaEb+8AtEgbGLAGCk1BWxFBfEPK7kU8pjFzJo79hlrv02 cAXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=rx7J6zy/sE2UhlpSdhS0NyZqhjrsJp5O6+7zN9EwH2U=; b=rSrwt5vtly+BuSkwhUD6VA8Cp8j11c54NUuEBMcJs9AHm3bkfiWgeJFYGMwVjAlYAV 9VzEKnL5NelpkCDBW5h/RxFvrVafWZZQ7IPQl8EdR7eqDol3HU17tPcm7MA0ZKlN/wjT IcbVdpM6zJuhoMoETyMvMBcQIIEae/ANLODc0KI92fI4tPKlNV2IuJMIBKacuae1f1En YKinc3QWfnDjLk/dK761HX4QcAPdXwBHjbZwOGYSIPD1vvJnvLrrROdXyE6xCOMwyq0D ARG9oSIq9cMQJPNTKV6Atd6VUZBHxJNl+sw9GJb3GjTdvtl4tY9Egl8uB4Mbjp1VeqiP nAgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2arfxcRa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jr1si3058858ejb.164.2020.10.28.05.30.12; Wed, 28 Oct 2020 05:30:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2arfxcRa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1797064AbgJ0PVY (ORCPT + 99 others); Tue, 27 Oct 2020 11:21:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:56236 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1796450AbgJ0PSo (ORCPT ); Tue, 27 Oct 2020 11:18:44 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EC97C22275; Tue, 27 Oct 2020 15:18:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603811923; bh=slcNo6rQp0yZP8Y3cVBNuNxvl1o0ed4eHlue0K/A/kc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2arfxcRauUXcK6RUDNTnbFQ5jCr19cuU/OVhoTeAJ7U29tFEX3FRD/gXxGgOSO3Bj YTu6Jo6hBi5P0txdJzNOgoS/e24r4/wsRgfcEsuFpveO8P+7SN9xdgiF/4PwTsjzfx NG3iheBW7/NS6CYpq28sib7e22zba0wj0ka8Bm2g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jon Maloy , Hoang Huu Le , Jakub Kicinski Subject: [PATCH 5.9 030/757] tipc: fix incorrect setting window for bcast link Date: Tue, 27 Oct 2020 14:44:40 +0100 Message-Id: <20201027135451.938463545@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135450.497324313@linuxfoundation.org> References: <20201027135450.497324313@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hoang Huu Le [ Upstream commit ec78e31852c9bb7d96b6557468fecb6f6f3b28f3 ] In commit 16ad3f4022bb ("tipc: introduce variable window congestion control"), we applied the algorithm to select window size from minimum window to the configured maximum window for unicast link, and, besides we chose to keep the window size for broadcast link unchanged and equal (i.e fix window 50) However, when setting maximum window variable via command, the window variable was re-initialized to unexpect value (i.e 32). We fix this by updating the fix window for broadcast as we stated. Fixes: 16ad3f4022bb ("tipc: introduce variable window congestion control") Acked-by: Jon Maloy Signed-off-by: Hoang Huu Le Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/tipc/bcast.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/net/tipc/bcast.c +++ b/net/tipc/bcast.c @@ -109,6 +109,7 @@ static void tipc_bcbase_select_primary(s struct tipc_bc_base *bb = tipc_bc_base(net); int all_dests = tipc_link_bc_peers(bb->link); int max_win = tipc_link_max_win(bb->link); + int min_win = tipc_link_min_win(bb->link); int i, mtu, prim; bb->primary_bearer = INVALID_BEARER_ID; @@ -124,7 +125,8 @@ static void tipc_bcbase_select_primary(s mtu = tipc_bearer_mtu(net, i); if (mtu < tipc_link_mtu(bb->link)) { tipc_link_set_mtu(bb->link, mtu); - tipc_link_set_queue_limits(bb->link, max_win, + tipc_link_set_queue_limits(bb->link, + min_win, max_win); } bb->bcast_support &= tipc_bearer_bcast_support(net, i); @@ -589,7 +591,7 @@ static int tipc_bc_link_set_queue_limits if (max_win > TIPC_MAX_LINK_WIN) return -EINVAL; tipc_bcast_lock(net); - tipc_link_set_queue_limits(l, BCLINK_WIN_MIN, max_win); + tipc_link_set_queue_limits(l, tipc_link_min_win(l), max_win); tipc_bcast_unlock(net); return 0; }