Re: [Spice-devel] [PATCH 28/35] vdi port: redesign.

2010-05-18 Thread Gerd Hoffmann
Yes, you need an additional interface for throttle/unthrottle then. Works too. I don't mind much which way we pick. Two notes: * I need to check with virtio-serial, but it seems to me that when we throttle we should be able to access the pointer provided by havedata. I don't think virtio-

Re: [Spice-devel] [PATCH 28/35] vdi port: redesign.

2010-05-18 Thread Alon Levy
- "Gerd Hoffmann" wrote: > Hi, > > > I'm not sure how that should be done. My main dislike of the current > interface > > is that it forces either a copy from the driver to an intermediate, > like > > the code I had checked in, or it forces spice-server to consume > everything it gets. > >

Re: [Spice-devel] [PATCH 28/35] vdi port: redesign.

2010-05-18 Thread Gerd Hoffmann
Hi, I'm not sure how that should be done. My main dislike of the current interface is that it forces either a copy from the driver to an intermediate, like the code I had checked in, or it forces spice-server to consume everything it gets. No, it isn't all or nothing. You can delay the int

Re: [Spice-devel] [PATCH 28/35] vdi port: redesign.

2010-05-18 Thread Alon Levy
- "Gerd Hoffmann" wrote: > > To check this I'll have to compile the vdi_port driver, since back > > porting the spice_vmc.c file from qemu-kvm-rhel6 would be too much > > work (there is not virtio-serial in current qemu used in upstrea > > spice). But I'll try to do it and send the patch ove

Re: [Spice-devel] [PATCH 28/35] vdi port: redesign.

2010-05-18 Thread Gerd Hoffmann
To check this I'll have to compile the vdi_port driver, since back porting the spice_vmc.c file from qemu-kvm-rhel6 would be too much work (there is not virtio-serial in current qemu used in upstrea spice). But I'll try to do it and send the patch over. qemu on freedesktop.org has both vdi-port

Re: [Spice-devel] [PATCH 28/35] vdi port: redesign.

2010-05-17 Thread Gerd Hoffmann
Hi, -while (reds->agent_state.plug_ref != INVALID_VD_OBJECT_REF) { +sif = SPICE_CONTAINEROF(vdagent->base.sif, SpiceVDIPortInterface, base); +for (;;) { Changing a while to for(;;;) doesn't seem right. We can still hit: read_from_vdi_port()-> dispatch_vdi_port_data()-> defau

Re: [Spice-devel] [PATCH 28/35] vdi port: redesign.

2010-05-17 Thread Alon Levy
Hi, As long as we are changing the way SpiceVDIPortPlug (plug) works, we should have the read callback direction reversed: struct SpiceVDIPortInterface { +int (*have_data)(SpiceVDIPortInstance *sin, uint8_t *buf, int len); -int (*read)(SpiceVDIPortInstance *sin, uint8_t *buf, int len); }

Re: [Spice-devel] [PATCH 28/35] vdi port: redesign.

2010-05-17 Thread Alexander Larsson
On Wed, 2010-05-12 at 13:32 +0200, Gerd Hoffmann wrote: > -while (reds->agent_state.plug_ref != INVALID_VD_OBJECT_REF) { > +sif = SPICE_CONTAINEROF(vdagent->base.sif, SpiceVDIPortInterface, base); > +for (;;) { Changing a while to for(;;;) doesn't seem right. We can still hit: read_f

Re: [Spice-devel] [PATCH 28/35] vdi port: redesign.

2010-05-17 Thread Alexander Larsson
On Wed, 2010-05-12 at 13:32 +0200, Gerd Hoffmann wrote: > > +if (sif->state) > +sif->state(sin, reds->agent_state.connected); Lacks brackets around block. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Alexander Larsson

[Spice-devel] [PATCH 28/35] vdi port: redesign.

2010-05-12 Thread Gerd Hoffmann
Pretty straight forward. One thing we should think about is if and how we are going to deal with multiple ports here? With vdi port using virtio-serial as communication channel to the guest it is easy to have multiple ports, i.e. we might want to use a second instance for clipboard data. That im