]> www.infradead.org Git - users/jedix/linux-maple.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)
committerChuck Anderson <chuck.anderson@oracle.com>
Fri, 26 Feb 2016 02:28:48 +0000 (18:28 -0800)
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>
(cherry picked from commit 5defde5946676ee23cd6a9d0e1de899410f4a33f)

Orabug: 21886720
Signed-off-by: Jason Luo <zhangqing.luo@oracle.com>
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);