From: David Miller <davem@redhat.com>
To: haiyangz@microsoft.com
Cc: netdev@vger.kernel.org, kys@microsoft.com, olaf@aepfle.de,
jasowang@redhat.com, linux-kernel@vger.kernel.org,
driverdev-devel@linuxdriverproject.org
Subject: Re: [PATCH net-next,v2] hyperv: Increase the buffer length for netvsc_channel_cb()
Date: Thu, 14 Aug 2014 14:28:56 -0700 (PDT) [thread overview]
Message-ID: <20140814.142856.1220870703473741209.davem@redhat.com> (raw)
In-Reply-To: <1407953024-35191-1-git-send-email-haiyangz@microsoft.com>
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.
next prev parent reply other threads:[~2014-08-14 21:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-13 18:03 Haiyang Zhang
2014-08-14 21:28 ` David Miller [this message]
2014-08-14 21:32 ` Haiyang Zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140814.142856.1220870703473741209.davem@redhat.com \
--to=davem@redhat.com \
--cc=driverdev-devel@linuxdriverproject.org \
--cc=haiyangz@microsoft.com \
--cc=jasowang@redhat.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olaf@aepfle.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®