diff options
author | Hoang Huu Le <hoang.h.le@dektech.com.au> | 2020-10-16 05:31:19 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-10-29 12:07:04 +0300 |
commit | eb7ee70b922666701afdcf9f62235035947c2ec7 (patch) | |
tree | bf23b4e73213bc5095444c55e2544c04c70605f0 /net | |
parent | a52c1d9114f1d801cebc48c64ad1e08b4a79dc8c (diff) | |
download | linux-eb7ee70b922666701afdcf9f62235035947c2ec7.tar.xz |
tipc: fix incorrect setting window for bcast link
[ 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 <jmaloy@redhat.com>
Signed-off-by: Hoang Huu Le <hoang.h.le@dektech.com.au>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/tipc/bcast.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c index 49a8b7d6f6bb..f69fb54821e6 100644 --- a/net/tipc/bcast.c +++ b/net/tipc/bcast.c @@ -109,6 +109,7 @@ static void tipc_bcbase_select_primary(struct net *net) 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(struct net *net) 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(struct net *net, u32 max_win) 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; } |