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:27 +0200
commitcd4ccd3cb465026eea58fb414866af275655d273 (patch)
tree292210a24ed4a16220b7d7ce8c060a9e59f9b255
parent1ab71d889dbd4b2009cb74cd2907fdf8e9c35116 (diff)
netvsc: no need to allocate send/receive on numa node
-rw-r--r--patches.suse/msft-hv-1429-netvsc-no-need-to-allocate-send-receive-on-numa-node.patch58
-rw-r--r--series.conf1
2 files changed, 59 insertions, 0 deletions
diff --git a/patches.suse/msft-hv-1429-netvsc-no-need-to-allocate-send-receive-on-numa-node.patch b/patches.suse/msft-hv-1429-netvsc-no-need-to-allocate-send-receive-on-numa-node.patch
new file mode 100644
index 0000000000..e58a86a53c
--- /dev/null
+++ b/patches.suse/msft-hv-1429-netvsc-no-need-to-allocate-send-receive-on-numa-node.patch
@@ -0,0 +1,58 @@
+From: stephen hemminger <stephen@networkplumber.org>
+Date: Wed, 9 Aug 2017 17:46:07 -0700
+Patch-mainline: v4.14-rc1
+Subject: netvsc: no need to allocate send/receive on numa node
+Git-commit: 958333708f2877d3855e3bc31dad428e2f2c8096
+References: fate#323887
+
+The send and receive buffers are both per-device (not per-channel).
+The associated NUMA node is a property of the CPU which is per-channel
+therefore it makes no sense to force the receive/send buffer to be
+allocated on a particular node (since it is a shared resource).
+
+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/netvsc.c | 19 +++++--------------
+ 1 file changed, 5 insertions(+), 14 deletions(-)
+
+diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
+--- a/drivers/net/hyperv/netvsc.c
++++ b/drivers/net/hyperv/netvsc.c
+@@ -246,20 +246,13 @@ int netvsc_alloc_recv_comp_ring(struct netvsc_device *net_device, u32 q_idx)
+ static int netvsc_init_buf(struct hv_device *device,
+ struct netvsc_device *net_device)
+ {
+- int ret = 0;
+- struct nvsp_message *init_packet;
+ struct nvsp_1_message_send_receive_buffer_complete *resp;
+- struct net_device *ndev;
++ struct net_device *ndev = hv_get_drvdata(device);
++ struct nvsp_message *init_packet;
+ size_t map_words;
+- int node;
+-
+- ndev = hv_get_drvdata(device);
+-
+- node = cpu_to_node(device->channel->target_cpu);
+- net_device->recv_buf = vzalloc_node(net_device->recv_buf_size, node);
+- if (!net_device->recv_buf)
+- net_device->recv_buf = vzalloc(net_device->recv_buf_size);
++ int ret = 0;
+
++ net_device->recv_buf = vzalloc(net_device->recv_buf_size);
+ if (!net_device->recv_buf) {
+ netdev_err(ndev, "unable to allocate receive "
+ "buffer of size %d\n", net_device->recv_buf_size);
+@@ -340,9 +333,7 @@ static int netvsc_init_buf(struct hv_device *device,
+ goto cleanup;
+
+ /* Now setup the send buffer. */
+- net_device->send_buf = vzalloc_node(net_device->send_buf_size, node);
+- if (!net_device->send_buf)
+- net_device->send_buf = vzalloc(net_device->send_buf_size);
++ net_device->send_buf = vzalloc(net_device->send_buf_size);
+ if (!net_device->send_buf) {
+ netdev_err(ndev, "unable to allocate send "
+ "buffer of size %d\n", net_device->send_buf_size);
diff --git a/series.conf b/series.conf
index 4dc6f88b58..66ab839002 100644
--- a/series.conf
+++ b/series.conf
@@ -1679,6 +1679,7 @@
patches.suse/msft-hv-1426-netvsc-don-t-signal-host-twice-if-empty.patch
patches.suse/msft-hv-1427-netvsc-propagate-MAC-address-change-to-VF-slave.patch
patches.suse/msft-hv-1428-netvsc-check-error-return-when-restoring-channels-an.patch
+ patches.suse/msft-hv-1429-netvsc-no-need-to-allocate-send-receive-on-numa-node.patch
patches.suse/suse-hv-guest-os-id.patch
patches.suse/suse-hv-kvp_on_msg.dbg.patch