Netdev Archive on lore.kernel.org
 help / color / Atom feed
* [net 1/2] tipc: re-configure queue limit for broadcast link
@ 2020-10-16  2:31 Hoang Huu Le
  2020-10-16  2:31 ` [net 2/2] tipc: fix incorrect setting window for bcast link Hoang Huu Le
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Hoang Huu Le @ 2020-10-16  2:31 UTC (permalink / raw)
  To: jmaloy, ying.xue, netdev

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(-)

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;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [net 2/2] tipc: fix incorrect setting window for bcast link
  2020-10-16  2:31 [net 1/2] tipc: re-configure queue limit for broadcast link Hoang Huu Le
@ 2020-10-16  2:31 ` Hoang Huu Le
  2020-10-16 21:18 ` [net 1/2] tipc: re-configure queue limit for broadcast link Jakub Kicinski
  2020-10-16 21:30 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Hoang Huu Le @ 2020-10-16  2:31 UTC (permalink / raw)
  To: jmaloy, ying.xue, netdev

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>
---
 net/tipc/bcast.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index c77fd13e2777..d4beca895992 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;
 }
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [net 1/2] tipc: re-configure queue limit for broadcast link
  2020-10-16  2:31 [net 1/2] tipc: re-configure queue limit for broadcast link Hoang Huu Le
  2020-10-16  2:31 ` [net 2/2] tipc: fix incorrect setting window for bcast link Hoang Huu Le
@ 2020-10-16 21:18 ` Jakub Kicinski
  2020-10-16 21:30 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Jakub Kicinski @ 2020-10-16 21:18 UTC (permalink / raw)
  To: Hoang Huu Le; +Cc: jmaloy, ying.xue, netdev

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!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [net 1/2] tipc: re-configure queue limit for broadcast link
  2020-10-16  2:31 [net 1/2] tipc: re-configure queue limit for broadcast link Hoang Huu Le
  2020-10-16  2:31 ` [net 2/2] tipc: fix incorrect setting window for bcast link Hoang Huu Le
  2020-10-16 21:18 ` [net 1/2] tipc: re-configure queue limit for broadcast link Jakub Kicinski
@ 2020-10-16 21:30 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2020-10-16 21:30 UTC (permalink / raw)
  To: Hoang Huu Le; +Cc: jmaloy, ying.xue, netdev

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-16  2:31 [net 1/2] tipc: re-configure queue limit for broadcast link Hoang Huu Le
2020-10-16  2:31 ` [net 2/2] tipc: fix incorrect setting window for bcast link Hoang Huu Le
2020-10-16 21:18 ` [net 1/2] tipc: re-configure queue limit for broadcast link Jakub Kicinski
2020-10-16 21:30 ` patchwork-bot+netdevbpf

Netdev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netdev/0 netdev/git/0.git
	git clone --mirror https://lore.kernel.org/netdev/1 netdev/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netdev netdev/ https://lore.kernel.org/netdev \
		netdev@vger.kernel.org
	public-inbox-index netdev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netdev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git