Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlaf Hering <ohering@suse.de>2017-10-20 12:20:33 +0200
committerOlaf Hering <ohering@suse.de>2017-10-20 12:23:29 +0200
commit0aa3f1f664bf8a6b7b7bb496313a5eeb68e1307d (patch)
tree2bb09ba6ab87abfd1e1bc83efcf670780fdd0c24
parent084c6356f85527bdfb57776059351ed430fb2f8f (diff)
hv_netvsc: avoid unnecessary wakeups on subchannel creation
-rw-r--r--patches.suse/msft-hv-1462-hv_netvsc-avoid-unnecessary-wakeups-on-subchannel-cr.patch31
-rw-r--r--series.conf1
2 files changed, 32 insertions, 0 deletions
diff --git a/patches.suse/msft-hv-1462-hv_netvsc-avoid-unnecessary-wakeups-on-subchannel-cr.patch b/patches.suse/msft-hv-1462-hv_netvsc-avoid-unnecessary-wakeups-on-subchannel-cr.patch
new file mode 100644
index 0000000000..fee840dcc0
--- /dev/null
+++ b/patches.suse/msft-hv-1462-hv_netvsc-avoid-unnecessary-wakeups-on-subchannel-cr.patch
@@ -0,0 +1,31 @@
+From: Stephen Hemminger <stephen@networkplumber.org>
+Date: Wed, 6 Sep 2017 13:53:06 -0700
+Patch-mainline: v4.14-rc1
+Subject: hv_netvsc: avoid unnecessary wakeups on subchannel creation
+Git-commit: 8f2bb1de73344dbedd4195016b782bee7bf3598f
+References: fate#323887
+
+Only need to wakeup the initiator after all sub-channels
+are opened.
+
+Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Olaf Hering <ohering@suse.de>
+---
+ drivers/net/hyperv/rndis_filter.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/hyperv/rndis_filter.c b/drivers/net/hyperv/rndis_filter.c
+--- a/drivers/net/hyperv/rndis_filter.c
++++ b/drivers/net/hyperv/rndis_filter.c
+@@ -1048,8 +1048,8 @@ static void netvsc_sc_open(struct vmbus_channel *new_sc)
+ else
+ netdev_notice(ndev, "sub channel open failed: %d\n", ret);
+
+- atomic_inc(&nvscdev->open_chn);
+- wake_up(&nvscdev->subchan_open);
++ if (atomic_inc_return(&nvscdev->open_chn) == nvscdev->num_chn)
++ wake_up(&nvscdev->subchan_open);
+ }
+
+ /* Open sub-channels after completing the handling of the device probe.
diff --git a/series.conf b/series.conf
index da1322105a..6b5c3f0d51 100644
--- a/series.conf
+++ b/series.conf
@@ -1710,6 +1710,7 @@
patches.suse/msft-hv-1459-hv_netvsc-Simplify-the-limit-check-in-netvsc_set_cha.patch
patches.suse/msft-hv-1460-hv_netvsc-Fix-the-channel-limit-in-netvsc_set_rxfh.patch
patches.suse/msft-hv-1461-hv_netvsc-fix-deadlock-on-hotplug.patch
+ patches.suse/msft-hv-1462-hv_netvsc-avoid-unnecessary-wakeups-on-subchannel-cr.patch
patches.suse/suse-hv-guest-os-id.patch
patches.suse/suse-hv-kvp_on_msg.dbg.patch