提交 75cee397 编写于 作者: H Hoang Huu Le 提交者: Jakub Kicinski

tipc: re-configure queue limit for broadcast link

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: NJon Maloy <jmaloy@redhat.com>
Signed-off-by: NHoang Huu Le <hoang.h.le@dektech.com.au>
Signed-off-by: NJakub Kicinski <kuba@kernel.org>
上级 9ff9b0d3
...@@ -108,6 +108,7 @@ static void tipc_bcbase_select_primary(struct net *net) ...@@ -108,6 +108,7 @@ static void tipc_bcbase_select_primary(struct net *net)
{ {
struct tipc_bc_base *bb = tipc_bc_base(net); struct tipc_bc_base *bb = tipc_bc_base(net);
int all_dests = tipc_link_bc_peers(bb->link); int all_dests = tipc_link_bc_peers(bb->link);
int max_win = tipc_link_max_win(bb->link);
int i, mtu, prim; int i, mtu, prim;
bb->primary_bearer = INVALID_BEARER_ID; bb->primary_bearer = INVALID_BEARER_ID;
...@@ -121,8 +122,11 @@ static void tipc_bcbase_select_primary(struct net *net) ...@@ -121,8 +122,11 @@ static void tipc_bcbase_select_primary(struct net *net)
continue; continue;
mtu = tipc_bearer_mtu(net, i); 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_mtu(bb->link, mtu);
tipc_link_set_queue_limits(bb->link, max_win,
max_win);
}
bb->bcast_support &= tipc_bearer_bcast_support(net, i); bb->bcast_support &= tipc_bearer_bcast_support(net, i);
if (bb->dests[i] < all_dests) if (bb->dests[i] < all_dests)
continue; continue;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册