diff mbox series

[net,1/2] tipc: re-configure queue limit for broadcast link

Message ID 20201016023119.5833-1-hoang.h.le@dektech.com.au
State New
Headers show
Series [net,1/2] tipc: re-configure queue limit for broadcast link | expand

Commit Message

Hoang Le Oct. 16, 2020, 2:31 a.m. UTC
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 <jmaloy@redhat.com>
Signed-off-by: Hoang Huu Le <hoang.h.le@dektech.com.au>
---
 net/tipc/bcast.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Jakub Kicinski Oct. 16, 2020, 9:18 p.m. UTC | #1
On Fri, 16 Oct 2020 09:31:18 +0700 Hoang Huu Le wrote:
> 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 <jmaloy@redhat.com>

> Signed-off-by: Hoang Huu Le <hoang.h.le@dektech.com.au>


Applied both, thanks!
patchwork-bot+netdevbpf@kernel.org Oct. 16, 2020, 9:30 p.m. UTC | #2
Hello:

This series was applied to netdev/net.git (refs/heads/master):

On Fri, 16 Oct 2020 09:31:18 +0700 you wrote:
> 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.

> 

> [...]


Here is the summary with links:
  - [net,1/2] tipc: re-configure queue limit for broadcast link
    https://git.kernel.org/netdev/net/c/75cee397ae6f
  - [net,2/2] tipc: fix incorrect setting window for bcast link
    https://git.kernel.org/netdev/net/c/ec78e31852c9

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
diff mbox series

Patch

diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index 940d176e0e87..c77fd13e2777 100644
--- a/net/tipc/bcast.c
+++ b/net/tipc/bcast.c
@@ -108,6 +108,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 i, mtu, prim;
 
 	bb->primary_bearer = INVALID_BEARER_ID;
@@ -121,8 +122,11 @@  static void tipc_bcbase_select_primary(struct net *net)
 			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;