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
commit7306a15685a4527a5e83ac54cc61659fdb2ce3b7 (patch)
tree344d2194a8d04f057f4b7e00279868a39d6238f5
parentd992a56f2df0e465f46653629ea922176580ffd6 (diff)
netvsc: no need to allocate send/receive on numa node
-rw-r--r--drivers/net/hyperv/netvsc.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
index b5fc8fb56b88..7407006f4e22 100644
--- 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);