]> git.karo-electronics.de Git - linux-beck.git/commitdiff
hv_netvsc: Allocate the sendbuf in a NUMA aware way
authorK. Y. Srinivasan <kys@microsoft.com>
Fri, 29 May 2015 00:08:07 +0000 (17:08 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 31 May 2015 07:23:03 +0000 (00:23 -0700)
Allocate the send buffer in a NUMA aware way.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/netvsc.c

index d187965eba367bfe595fc4137655b84bb18ee625..06de98a056228261a9df982421c4137827dfda01 100644 (file)
@@ -326,7 +326,9 @@ static int netvsc_init_buf(struct hv_device *device)
 
        /* Now setup the send buffer.
         */
-       net_device->send_buf = vzalloc(net_device->send_buf_size);
+       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);
        if (!net_device->send_buf) {
                netdev_err(ndev, "unable to allocate send "
                           "buffer of size %d\n", net_device->send_buf_size);