virtqueue_add_buf

2010-12-13 Thread devi thapa
Hi Everybody, How to simulate the export function "virtqueue_add_buf"? I tried to invoke it by pinging to the host machine, but failed. Awaiting your replies ! Regards, Devi. ___ Virtualization mailing list Virtualization@lists.linux-foundati

Re: [GIT PULL net-next-2.6] vhost-net: tools, cleanups, optimizations

2010-12-13 Thread Rusty Russell
On Tue, 14 Dec 2010 03:54:47 am Michael S. Tsirkin wrote: > On Mon, Dec 13, 2010 at 12:44:13PM +0200, Michael S. Tsirkin wrote: > > Please merge the following tree for 2.6.38. > > Thanks! > > Um, I sent this out before I noticed the mail from Rusty > with some questions on the test code. I missed

[PATCH 1/1] hv: Use only one txf buffer per channel and kmalloc/GFP_KERNEL on initialize

2010-12-13 Thread Hank Janssen
Correct issue with not checking kmalloc return value. This fix now only uses one receive buffer for all hv_utils channels, and will do only one kmalloc on init and will return with a -ENOMEM if kmalloc fails on initialize. And properly clean up memory on failure. Thanks to Evgeniy Polyakov for

RE: [PATCH 1/1] hv: Use only one receive buffer per channel and kmalloc on initialize

2010-12-13 Thread Hank Janssen
> -Original Message- > From: Jesper Juhl [mailto:j...@chaosbits.net] > Sent: Monday, December 13, 2010 3:51 PM > To: Ky Srinivasan > > > + shut_txf_buf = kmalloc(PAGE_SIZE, GFP_ATOMIC); > > > + time_txf_buf = kmalloc(PAGE_SIZE, GFP_ATOMIC); > > > + hbeat_txf_buf = kmalloc(PAGE_SIZE, GFP_A

Re: [PATCH 1/1] hv: Use only one receive buffer per channel and kmalloc on initialize

2010-12-13 Thread Jesper Juhl
On Mon, 13 Dec 2010, Ky Srinivasan wrote: > > > >>> On 12/13/2010 at 3:34 PM, in message > <1292272498-29483-1-git-send-email-hjans...@microsoft.com>, Hank Janssen > wrote: > > Correct issue with not checking kmalloc return value. > > This fix now only uses one receive buffer for all hv_utils

RE: [PATCH 1/1] hv: Use only one txf buffer per channel and kmalloc on initialize

2010-12-13 Thread Hank Janssen
-Original Message- >From: Evgeniy Polyakov [mailto:z...@ioremap.net] >Sent: Monday, December 13, 2010 2:04 PM > >On Mon, Dec 13, 2010 at 01:14:21PM -0800, Hank Janssen >(hjans...@microsoft.com) wrote: >> +static u8 *shut_txf_buf; >> +static u8 *time_txf_buf; >> +static u8 *hbeat_txf_buf

Re: [PATCH 1/1] hv: Use only one receive buffer per channel and kmalloc on initialize

2010-12-13 Thread Ky Srinivasan
>>> On 12/13/2010 at 3:34 PM, in message <1292272498-29483-1-git-send-email-hjans...@microsoft.com>, Hank Janssen wrote: > Correct issue with not checking kmalloc return value. > This fix now only uses one receive buffer for all hv_utils > channels, and will do only one kmalloc on init and wi

Re: [PATCH 1/1] hv: Use only one receive buffer per channel and kmalloc on initialize

2010-12-13 Thread Ky Srinivasan
>>> On 12/13/2010 at 3:34 PM, in message <1292272498-29483-1-git-send-email-hjans...@microsoft.com>, Hank Janssen wrote: > Correct issue with not checking kmalloc return value. > This fix now only uses one receive buffer for all hv_utils > channels, and will do only one kmalloc on init and wi

Re: [PATCH 1/1] hv: Use only one txf buffer per channel and kmalloc on initialize

2010-12-13 Thread Evgeniy Polyakov
On Mon, Dec 13, 2010 at 01:14:21PM -0800, Hank Janssen (hjans...@microsoft.com) wrote: > +static u8 *shut_txf_buf; > +static u8 *time_txf_buf; > +static u8 *hbeat_txf_buf; Those are accessed without any kind of synchronization. I do not know exact context, but are you sure it is single-threaded?

Re: [PATCH 1/1] hv: Use only one txf buffer per channel and kmalloc on initialize

2010-12-13 Thread Greg KH
On Mon, Dec 13, 2010 at 09:31:09PM +, Hank Janssen wrote: > > > From: Jesper Juhl [mailto:j...@chaosbits.net] > > Sent: Monday, December 13, 2010 1:22 PM > > > > I can't spot any problems with these changes now, so feel free to add > > Reviewed-by: Jesper Juhl if you like. > > > > Thank

RE: [PATCH 1/1] hv: Use only one txf buffer per channel and kmalloc on initialize

2010-12-13 Thread Hank Janssen
> From: Jesper Juhl [mailto:j...@chaosbits.net] > Sent: Monday, December 13, 2010 1:22 PM > > I can't spot any problems with these changes now, so feel free to add > Reviewed-by: Jesper Juhl if you like. > Thank you for your help Jesper. Greg, do you want me to resubmit with the Reviewed by

Re: [PATCH 1/1] hv: Use only one txf buffer per channel and kmalloc on initialize

2010-12-13 Thread Jesper Juhl
On Mon, 13 Dec 2010, Hank Janssen wrote: > Correct issue with not checking kmalloc return value. > This fix now only uses one receive buffer for all hv_utils > channels, and will do only one kmalloc on init and will return > with a -ENOMEM if kmalloc fails on initialize. > > And properly clean u

RE: [PATCH 1/1] hv: Use only one receive buffer per channel and kmalloc on initialize

2010-12-13 Thread Jesper Juhl
On Mon, 13 Dec 2010, Hank Janssen wrote: > > > > -Original Message- > > From: Jesper Juhl [mailto:j...@chaosbits.net] > > Sent: Monday, December 13, 2010 12:48 PM > > You are leaking memory in the failure path. If for example one or two > > allocations succeed but one or two fail, then y

RE: [PATCH 1/1] hv: Use only one receive buffer per channel and kmalloc on initialize

2010-12-13 Thread Hank Janssen
> -Original Message- > From: Jesper Juhl [mailto:j...@chaosbits.net] > Sent: Monday, December 13, 2010 1:06 PM > On Mon, 13 Dec 2010, Hank Janssen wrote: > > > ... > > > > > > > Oops, you are correct. Resubmitting the patch in a few minutes. > > > Ohh and another little detail; shouldn't

[PATCH 1/1] hv: Use only one txf buffer per channel and kmalloc on initialize

2010-12-13 Thread Hank Janssen
Correct issue with not checking kmalloc return value. This fix now only uses one receive buffer for all hv_utils channels, and will do only one kmalloc on init and will return with a -ENOMEM if kmalloc fails on initialize. And properly clean up memory on failure. Thanks to Evgeniy Polyakov for

RE: [PATCH 1/1] hv: Use only one receive buffer per channel and kmalloc on initialize

2010-12-13 Thread Hank Janssen
> -Original Message- > From: Jesper Juhl [mailto:j...@chaosbits.net] > Sent: Monday, December 13, 2010 12:48 PM > You are leaking memory in the failure path. If for example one or two > allocations succeed but one or two fail, then you'll leak the two successful > allocations. > > I beli

Re: [PATCH 1/1] hv: Use only one receive buffer per channel and kmalloc on initialize

2010-12-13 Thread Jesper Juhl
On Mon, 13 Dec 2010, Hank Janssen wrote: > Correct issue with not checking kmalloc return value. > This fix now only uses one receive buffer for all hv_utils > channels, and will do only one kmalloc on init and will return > with a -ENOMEM if kmalloc fails on initialize. > > Thanks to Evgeniy Po

[PATCH 1/1] hv: Use only one receive buffer per channel and kmalloc on initialize

2010-12-13 Thread Hank Janssen
Correct issue with not checking kmalloc return value. This fix now only uses one receive buffer for all hv_utils channels, and will do only one kmalloc on init and will return with a -ENOMEM if kmalloc fails on initialize. Thanks to Evgeniy Polyakov for pointing this out. And thanks to Jesper Ju

Re: [PATCH 1/1] hv: Use only one receive buffer and kmalloc on initialize

2010-12-13 Thread Greg KH
On Mon, Dec 13, 2010 at 08:06:20PM +, Hank Janssen wrote: > > > > -Original Message- > > From: Greg KH [mailto:g...@kroah.com] > > Sent: Monday, December 13, 2010 11:41 AM > > > The current versions of Hyper-V support interrupt handling on CPU0 only. > > > I can make multiple buffers

RE: [PATCH 1/1] hv: Use only one receive buffer and kmalloc on initialize

2010-12-13 Thread Hank Janssen
> -Original Message- > From: Greg KH [mailto:g...@kroah.com] > Sent: Monday, December 13, 2010 11:41 AM > > The current versions of Hyper-V support interrupt handling on CPU0 only. > > I can make multiple buffers per channel, but because of Hyper-V > > implementation It does not really ma

Re: [PATCH 1/1] hv: Use only one receive buffer and kmalloc on initialize

2010-12-13 Thread Greg KH
On Mon, Dec 13, 2010 at 07:31:42PM +, Hank Janssen wrote: > > > > -Original Message- > > From: Greg KH [mailto:g...@kroah.com] > > Sent: Monday, December 13, 2010 10:35 AM > > > --- > > > drivers/staging/hv/hv_utils.c | 68 > > > +++-- > > --- > > >

RE: [PATCH 1/1] hv: Use only one receive buffer and kmalloc on initialize

2010-12-13 Thread Hank Janssen
> -Original Message- > From: Greg KH [mailto:g...@kroah.com] > Sent: Monday, December 13, 2010 10:35 AM > > --- > > drivers/staging/hv/hv_utils.c | 68 +++-- > --- > > 1 files changed, 32 insertions(+), 36 deletions(-) > > > > diff --git a/drivers/stagin

Re: [PATCH 1/1] hv: Use only one receive buffer and kmalloc on initialize

2010-12-13 Thread Greg KH
On Mon, Dec 13, 2010 at 09:45:50AM -0800, Hank Janssen wrote: > Correct issue with not checking kmalloc return value. > This fix now only uses one receive buffer for all hv_utils > channels, and will do only one kmalloc on init and will return > with a -ENOMEM if kmalloc fails on initialize. > >

[PATCH 1/1] hv: Use only one receive buffer and kmalloc on initialize

2010-12-13 Thread Hank Janssen
Correct issue with not checking kmalloc return value. This fix now only uses one receive buffer for all hv_utils channels, and will do only one kmalloc on init and will return with a -ENOMEM if kmalloc fails on initialize. Thanks to Evgeniy Polyakov for pointing this out. And thanks to Jesper Ju

Re: [GIT PULL net-next-2.6] vhost-net: tools, cleanups, optimizations

2010-12-13 Thread Michael S. Tsirkin
On Mon, Dec 13, 2010 at 12:44:13PM +0200, Michael S. Tsirkin wrote: > Please merge the following tree for 2.6.38. > Thanks! Um, I sent this out before I noticed the mail from Rusty with some questions on the test code. I missed that and assumed no comments -> no issues, perhaps wrongly. Rusty - I

Re: [PATCH 2/2] tools/virtio: virtio_test tool

2010-12-13 Thread Michael S. Tsirkin
On Mon, Dec 06, 2010 at 03:23:02PM +1030, Rusty Russell wrote: > On Tue, 30 Nov 2010 03:46:37 am Michael S. Tsirkin wrote: > > This is the userspace part of the tool: it includes a bunch of stubs for > > linux APIs, somewhat simular to linuxsched. This makes it possible to > > recompile the ring co

Re: [PATCH 2/2] tools/virtio: virtio_test tool

2010-12-13 Thread Michael S. Tsirkin
On Mon, Dec 06, 2010 at 02:37:05PM -0200, Thiago Farina wrote: > On Mon, Nov 29, 2010 at 3:16 PM, Michael S. Tsirkin wrote: > > +#define container_of(ptr, type, member) ({                     \ > > +       const typeof( ((type *)0)->member ) *__mptr = (ptr);    \ > > +       (type *)( (char *)__mp

Re: [Qemu-devel] SCSI Command support over VirtIO Block device

2010-12-13 Thread अनुज
Hi 2010/12/13 Stefan Hajnoczi : > > On Dec 13, 2010 5:14 AM, "अनुज" wrote: >> >> Hi >> >> I am trying to implement VirtIO support for a proprietary OS. And It >> would be great if I am able to process SCSI commands over VirtIO Block >> device. >> >> I tried to execute INQUIRY command but the stat

[GIT PULL net-next-2.6] vhost-net: tools, cleanups, optimizations

2010-12-13 Thread Michael S. Tsirkin
Please merge the following tree for 2.6.38. Thanks! The following changes since commit ad1184c6cf067a13e8cb2a4e7ccc407f947027d0: net: au1000_eth: remove unused global variable. (2010-12-11 12:01:48 -0800) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/m