mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Haiyang Zhang <haiyangz@microsoft.com>
To: David Miller <davem@redhat.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	KY Srinivasan <kys@microsoft.com>,
	"olaf@aepfle.de" <olaf@aepfle.de>,
	"jasowang@redhat.com" <jasowang@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"driverdev-devel@linuxdriverproject.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 21:32:38 +0000	[thread overview]
Message-ID: <bbf016f1772245a6a08f92ea8346b8ff@DFM-DB3MBX15-08.exchange.corp.microsoft.com> (raw)
In-Reply-To: <20140814.142856.1220870703473741209.davem@redhat.com>



> -----Original Message-----
> From: David Miller [mailto:davem@redhat.com]
> Sent: Thursday, August 14, 2014 5:29 PM
> To: Haiyang Zhang
> Cc: netdev@vger.kernel.org; KY Srinivasan; 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()
> 
> 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.

I will change the patch to this way.
Thanks,

- Haiyang


      reply	other threads:[~2014-08-14 21:32 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
2014-08-14 21:32   ` Haiyang Zhang [this message]

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=bbf016f1772245a6a08f92ea8346b8ff@DFM-DB3MBX15-08.exchange.corp.microsoft.com \
    --to=haiyangz@microsoft.com \
    --cc=davem@redhat.com \
    --cc=driverdev-devel@linuxdriverproject.org \
    --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®