diff mbox series

[net-next] hv_netvsc: Set tx_table to equal weight after subchannels open

Message ID 20171027193638.17823-1-haiyangz@exchange.microsoft.com
State Accepted, archived
Delegated to: David Miller
Headers show
Series [net-next] hv_netvsc: Set tx_table to equal weight after subchannels open | expand

Commit Message

Haiyang Zhang Oct. 27, 2017, 7:36 p.m. UTC
From: Haiyang Zhang <haiyangz@microsoft.com>

In some cases, like internal vSwitch, the host doesn't provide
send indirection table updates. This patch sets the table to be
equal weight after subchannels are all open. Otherwise, all workload
will be on one TX channel.

As tested, this patch has largely increased the throughput over
internal vSwitch.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
---
 drivers/net/hyperv/rndis_filter.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

David Miller Oct. 29, 2017, 3:09 a.m. UTC | #1
From: Haiyang Zhang <haiyangz@exchange.microsoft.com>
Date: Fri, 27 Oct 2017 12:36:38 -0700

> From: Haiyang Zhang <haiyangz@microsoft.com>
> 
> In some cases, like internal vSwitch, the host doesn't provide
> send indirection table updates. This patch sets the table to be
> equal weight after subchannels are all open. Otherwise, all workload
> will be on one TX channel.
> 
> As tested, this patch has largely increased the throughput over
> internal vSwitch.
> 
> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>

Applied to net-next, thanks.
diff mbox series

Patch

diff --git a/drivers/net/hyperv/rndis_filter.c b/drivers/net/hyperv/rndis_filter.c
index addf9f69c58c..0648eebda829 100644
--- a/drivers/net/hyperv/rndis_filter.c
+++ b/drivers/net/hyperv/rndis_filter.c
@@ -1114,6 +1114,9 @@  void rndis_set_subchannel(struct work_struct *w)
 	netif_set_real_num_tx_queues(ndev, nvdev->num_chn);
 	netif_set_real_num_rx_queues(ndev, nvdev->num_chn);
 
+	for (i = 0; i < VRSS_SEND_TAB_SIZE; i++)
+		ndev_ctx->tx_table[i] = i % nvdev->num_chn;
+
 	rtnl_unlock();
 	return;