From patchwork Tue Oct 27 13:44:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 289575 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=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 55964C838DA for ; Tue, 27 Oct 2020 15:48:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0A38422282 for ; Tue, 27 Oct 2020 15:48:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603813700; bh=GDDgLjCvdP9hJNwmJ1F7bl4nLQrkpUorMjVj4T51kKk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=jX72Qbs1MW374fn6G0AsVdglrBU9wplUZUapfuiE29xUQS3/ApTAyn/YhpCUHBfm2 s3IEZQ8WL9bA+OWwda4t42EhiEe3Nps2yLQ2gwBhDUuDmTBviMfBIJULnqIKmF+3da zgPHA8OV52JLgzUD9SM+iYbxKa6tnryNc6c6Psn8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1802402AbgJ0PsP (ORCPT ); Tue, 27 Oct 2020 11:48:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:56052 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1796444AbgJ0PSl (ORCPT ); Tue, 27 Oct 2020 11:18:41 -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 008922064B; Tue, 27 Oct 2020 15:18:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603811920; bh=GDDgLjCvdP9hJNwmJ1F7bl4nLQrkpUorMjVj4T51kKk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tJDkA8XM1XOrgUu8bs6gmYQ/NdQ6TwIJNXACY3wtz+7c9ACRATv7EvI+B+KGqLiAo rr1oGBH8HJnGKLo5VrSnd3pdyfwAgAKWTULEeqYKvq7vfGUCHkCPsc6M9oUTB/iatV T5zIqFU/86aZGOOtp0vLKNQ0HQijS5LsLjuy+gJw= 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 029/757] tipc: re-configure queue limit for broadcast link Date: Tue, 27 Oct 2020 14:44:39 +0100 Message-Id: <20201027135451.891158496@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 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Hoang Huu Le [ Upstream commit 75cee397ae6f1020fbb75db90aa22a51bc3318ac ] The queue limit of the broadcast link is being calculated base on initial MTU. However, when MTU value changed (e.g manual changing MTU on NIC device, MTU negotiation etc.,) we do not re-calculate queue limit. This gives throughput does not reflect with the change. So fix it by calling the function to re-calculate queue limit of the broadcast link. 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, 5 insertions(+), 1 deletion(-) --- a/net/tipc/bcast.c +++ b/net/tipc/bcast.c @@ -108,6 +108,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 i, mtu, prim; bb->primary_bearer = INVALID_BEARER_ID; @@ -121,8 +122,11 @@ static void tipc_bcbase_select_primary(s continue; mtu = tipc_bearer_mtu(net, i); - if (mtu < tipc_link_mtu(bb->link)) + if (mtu < tipc_link_mtu(bb->link)) { tipc_link_set_mtu(bb->link, mtu); + tipc_link_set_queue_limits(bb->link, max_win, + max_win); + } bb->bcast_support &= tipc_bearer_bcast_support(net, i); if (bb->dests[i] < all_dests) continue;