lkml.org 
[lkml]   [2014]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH net-next,v2] hyperv: Increase the buffer length for netvsc_channel_cb()
From
From: Haiyang Zhang <haiyangz@microsoft.com>
Date: Wed, 13 Aug 2014 18:03:44 +0000

> When the buffer is too small for a packet from VMBus, a bigger buffer will be
> allocated in netvsc_channel_cb() and retry reading the packet from VMBus.
> Increasing this buffer size will reduce the retry overhead.
>
> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
> Reviewed-by: Dexuan Cui <decui@microsoft.com>
...
> - net_device = kzalloc(sizeof(struct netvsc_device), GFP_KERNEL);
> + net_device = vzalloc(sizeof(*net_device));

This isn't what I suggested that you do.

I said that the buffer inside of netvsc_device should be made an
indirect pointer and thus allocated seperately.

Thus you're still kzalloc() net_device, but net_device->cb_buffer
becomes "unsigned char *" and another allocation is made for it.


\
 
 \ /
  Last update: 2014-08-14 23:41    [W:0.036 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site